Am Sonntag, den 17.01.2010, 10:14 -0500 schrieb Raymond Toy:
> These were sent to me by Jim FitzSimons, who wrote the bigfloat
> implementation of elliptic integrals that I translated into Lisp.
>
> bfloat(sqrt(%i)) -> 1.0b0*(-1)^(1/4)
>
> Should this be more like .707+.707*%i?
>
> Another issue is
>
> float(polarform(sqrt(1+%i))) -> 1.18*2.718^(%i*%pi/8)
>
> But
>
> bfloat(polarform(sqrt(1+%i))) -> 1.18*(3.82b-1*%i+9.23b-1)
>
> Not sure which is the correct answer. In some ways, the float result is
> better since it preserves the polarform, but doesn't float the phase
> part. The bfloat result is better since everything is a bfloat, but the
> polarform is converted to rectangular.
Yes, I think we have a lot of more inconsistencies because the numerical
evaluation of the power function is not implemented as complete as might
be necessary.
At first, the power function evaluates numerically for float and
bigfloat values as base or exponent. But not for complex values. This is
not the convention we have for the numerical evaluation of functions.
On the other side some specific cases (the sqrt function and the exp
function) have been implemented to evaluate numerically for complex
numbers too. This causes inconsistencies.
I think at first we should implement a more complete and consistent
numerical evaluation for the power function. A lot of problems might
vanish if we do so.
Dieter Kaiser