-----maxima-bounces at math.utexas.edu wrote: -----
>To: Maxima at math.utexas.edu
>From: "van Nek" <van.nek at arcor.de>
>Sent by: maxima-bounces at math.utexas.edu
>Date: 09/08/2007 06:19AM
>Subject: topoly vs. to_poly
>
>Hi (Barton),
>
>can you please give me a hint, how to use the new to_poly function and how
>I can get the same result as before with topoly?
Sure, I think the new function you want is 'elim_allbut.' Try something
like:
(%i7) load(topoly)$
(%i8) load(polynomialp)$
(%i9) eq : 0.478+0.237*sqrt(v)-0.0124*v = 1$
(%i10) to_poly(eq);
`rat' replaced -0.522 by -261/500 = -0.522
`rat' replaced 0.237 by 237/1000 = 0.237
`rat' replaced -0.0124 by -31/2500 = -0.0124
(%o10) [[-0.0124
*v+0.237*%g1-0.522,v=%g1^2],[-%pi/2<carg(%g1),carg(%g1)<=%pi/2]]
(%i11) elim_allbut(first(%),[v]);
`rat' replaced -0.522 by -261/500 = -0.522
`rat' replaced 0.237 by 237/1000 = 0.237
`rat' replaced -0.0124 by -31/2500 = -0.0124
(%o11) [[3844*v^2-1080585*v+6812100],[62*v-1185*%g1+2610]]
You might try this with keepfloat set to true. Or you might try
a call to rationalize from the start.
BW