bfloat(sqrt(%i))?



Am Freitag, den 30.10.2009, 14:49 -0400 schrieb Raymond Toy:

> In 5.17, sqrt(%i) returnes (-1)^(1/4).  Which is right, but not what I
> would want.

Some first observations:

In all versions (Maxima 5.14 - 5.19.2)  sqrt(%i) simplifies to
(-1)^(1/4).

Up to Maxima 5.18.1 bfloat((-1)^(1/4)) simplifies to a complex number,
but not float((-1)^(1/4)).

I have seen the following difference between version 5.18.1 and 5.19.2:

When I trace the functions nrthk and simpexpt I observe the following
calls with Maxima 5.18.1. The expression is transformed to the polarform
and then evaluated numerically:

2. Trace: (NRTHK '-1 '4)
3. Trace: (SIMPEXPT '((MEXPT) $%E ((MTIMES) ((RAT) 1 4) $%PI $%I)) '1
'NIL)

In Maxima 5.19.2 I no longer can observe this transformation:

2. Trace: (NRTHK '-1 '4)
3. Trace: (SIMPEXPT '((MEXPT) -1 ((RAT) 1 4)) '1 'NIL)

I can see this transformation with the following Lisp call

(%i43) :lisp (let ($domain ($m1pbranch t)) (nrthk -1 4))
1. Trace: (NRTHK '-1 '4)
2. Trace: (SIMPEXPT '((MEXPT) $%E ((MTIMES) ((RAT) 1 4) $%PI $%I)) '1
'NIL)

Do we have a change of the values or the use of the global flags $domain
and $m1pbranch?

Dieter Kaiser