[Maxima] (1.0+%i)^0.5 does not evaluate numerically

Dieter Kaiser drdieterkaiser at web.de
Sat Jul 4 17:17:34 CDT 2009

```Am Samstag, den 04.07.2009, 07:00 -0700 schrieb Richard Fateman:
> I think this issue is that the original programmers hesitated to make a
> single choice of a multi-valued function.
>
> For example, (-1)^(1/3)   is simplified to -1. Arguably, wrong.
>
> (-1)^(1/3.0)
> rectform(%)
> gives 0.86602540378444*%i+0.5
>
> That is another possibility.
>
> If you plunge ahead and replace (-1)^(1/3.0) with  0.866*%i+0.5 you will
> undoubtedly get some answers more
> directly. Probably you will be closer to what Mathematica does under
> similar circumstances.
> You will presumably also get inconsistencies, as presumably does
> Mathematica.
>
> Note that Mathematica does NOT do (-1)^(1/3) --> -1.

Yes, the multiple-valued functions are a special problem.

But Maxima does not even numerically evaluate more simple cases with
complex arguments, e.g.

(%i21) (1.0+%i)^2.0;
(%o21) (%i+1.0)^2.0
(%i22) (1.0b0+%i)^2.0b0;
(%o22) (%i+1.0b0)^2.0b0

In contrast the numerically evaluation of the power function works for
real values even in the multiple-valued case using the real branch:

(%i63) 4.0^0.5;
(%o63) 2.0

(%i64) 4.0^0.25;
(%o64) 1.414213562373095

(%i65) 4.0^2.0;
(%o65) 16.0

Dieter Kaiser

```