[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-math] Selection of roots
From: |
Francois Maltey |
Subject: |
Re: [Axiom-math] Selection of roots |
Date: |
Fri, 31 Oct 2008 16:44:03 +0100 |
User-agent: |
Thunderbird 2.0.0.17 (X11/20080925) |
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