I'm on a blackberry, so can't check source or reply at length, but...
1) It is always wrong to give an exact (rational) result for a float
calculation. Even 2.0-2.0 should give 0.0, not 0 . Float intrinsically
means approximate.
2) In particular, Maxima shouldn't rationalize except when explicitly
asked to (eg with rat).
3) Branch choice for fractional powers is a complletely independent
issue but we should be consistent between floats and exacts.
-s
On 8/5/07, Barton Willis <willisb at unk.edu> wrote:
> Either I never knew about number_pbranch, or I had forgotten about it.
> I think the function exprl needs some work -- it seems to be the cause
> of the (negative float)^rational bug. It's too late to fix it for
> 5.13. We'll need to decide how numer_pbranch and domain should work.
> That will take some time.
>
> (%i1) numer_pbranch : true$
> (%i2) domain : complex$
>
> (%i3) (-4.2)^(2/3);
> (%o3) (1.0*(-1)^(2/3)*21^(2/3))/5^(2/3)
>
> (%i4) rectform(%);
> (%o4) (0.5*sqrt(3)*21^(2/3)*%i)/5^(2/3)-(0.5*21^(2/3))/5^(2/3)
>
> (%i5) float(%);
> (%o5) 2.254395758285868*%i-1.301575997906296
>
>
> Barton
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>