-----maxima-bounces at math.utexas.edu wrote: -----
>Here's?an?example?of?what?I?am?trying?to?do:?I?am?writing?a?function?
>that?expands?a?rational?function?to?a?particular?form?of?a?sum.?It?
>expects?a?rational?function?as?input?and?returns?the?expansion?of?that?
>rational?function.
Such schemes exist, I think; you might examine the source code for cf and cfdisrep:
(%i6) cfdisrep(cf(1/3 + sqrt(5)));
(%o6) 2+1/(1+1/(1+1/(2+1/2)))
(%i7) ?print(%);
((MPLUS SIMP CF) 2 ((MEXPT SIMP) ((MPLUS SIMP CF) 1 ((MEXPT SIMP) ((MPLUS SIMP CF) 1 ((MEXPT SIMP) ((MPLUS SIMP CF) 2 ((RAT SIMP) 1 2)) -1)) -1)) -1))
(%o7) 2+1/(1+1/(1+1/(2+1/2)))
You would also need to investigate how the cf flag alters simplification (maybe the cf flag is
ignored when it shouldn't be. I don't know.)
--Barton