Alejandro Jakubi wrote: > I wonder how it is done in Axiom the selection of roots of a > polynomial with some property. As in this example, select the positive > roots out of the list of three roots generated by: > > radicalSolve(p^3-p+1/10=0,p)
With fricas I get a mysterious result and a fuzzy bug. First I get 3 radical roots, second I get [p=3/20] and third I get [p=(10pl3+1)/10]. With open-axiom I test LR := radicalSolve (p^3-p+1/10=0,p) then a map for a numerical value shows three real roots with map (eq +-> (rhs eq)::Complex Float, LR) I believe that the ... +/- 1.0e-20*%i is a rounding numerical error. So LR.2 < LR.1 < LR.3 for my open-axiom. I don't understand why map (eq +-> numerical rhs eq) fails. But reduce ('+, map (eq +-> (rhs eq)::Complex Float, LR)) is about 0 and reduce ('*, map (eq +-> (rhs eq)::Complex Float, LR)) is arround -0.1... perfect ! You can play with real positive radix with the domain RealClosure Fraction Integer, but it seems impossible here because there are complex root during the internal computation. The internal axiom algebraic number don't know real properties and sign. It's why I use the coerce to Complex Float above. Try RCFI := RealClosure sqrt (3::RCFI) sqrt(-3::RCFI) --- and get an error sqrt 3 sqrt (-3) I ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel