Francois Maltey <[EMAIL PROTECTED]> writes:
> 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].
You are saying you get different results for the same input? This doesn't seem
to happen here - I always get the same 3 radical roots, and actually, the whole
thing works as nicely as it could here: (FriCAS, svn revision around 430)
(1) -> LR := radicalSolve (p^3-p+1/10=0,p)
(1)
+------------------+2
| +-+ +-----+
+---+ |- 3\|3 + \|- 373
(- 3\|- 3 + 3) |------------------ - 2
3| +-+
\| 60\|3
[p= -----------------------------------------,
+------------------+
| +-+ +-----+
+---+ |- 3\|3 + \|- 373
(3\|- 3 + 3) |------------------
3| +-+
\| 60\|3
+------------------+2
| +-+ +-----+
+---+ |- 3\|3 + \|- 373
(- 3\|- 3 - 3) |------------------ + 2
3| +-+
\| 60\|3
p= -----------------------------------------,
+------------------+
| +-+ +-----+
+---+ |- 3\|3 + \|- 373
(3\|- 3 - 3) |------------------
3| +-+
\| 60\|3
+------------------+2
| +-+ +-----+
|- 3\|3 + \|- 373
3 |------------------ + 1
3| +-+
\| 60\|3
p= ---------------------------]
+------------------+
| +-+ +-----+
|- 3\|3 + \|- 373
3 |------------------
3| +-+
\| 60\|3
Type: List(Equation(Expression(Integer)))
(2) -> map(eq +-> numeric rhs eq, LR)
>> Error detected within library code:
Can only compute the numerical value of a constant, real-valued Expression
(2) -> map(eq +-> numeric real rhs eq, LR)
(2)
[0.1010312578 8101081769,- 1.0466805318 046022612,0.9456492739 2359144347]
Type: List(Float)
(3) -> map(eq +-> numeric imag rhs eq, LR)
(3)
[0.4890347001 0975238236 E -21, 0.4890347001 0975238236 E -21,
- 0.4890347001 0975238236 E -21]
Type: List(Float)
> I don't understand why map (eq +-> numerical rhs eq) fails.
because it should be map (eq +-> numeric rhs eq, LR)? Or are you asking why
numeric is not provided for Konvert Complex Float? The latter might indeed make
sense, I think.
Martin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---