0
Naprawione

Roots of negative numbers

Michael_ 10 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 10 lat temu 2
Hello.

The following statement does not work in multiprecision:

mp(-1)^(1/2) = nan

sqrt(mp(-1)) = 0 + 1i (but this is only an option for the square root)

Maybe it is not a Bug, but it is real necessary to implement it.

Thank you.
W trakcie analizy
Hello Michael,

Thank you for the reports.

This is a bug and it has been fixed, please download updated version from our website - 3.7.1.7229.

(The reason - in matrix power function "^" we didn't fall back to coefficient-wise power operator ".^" when both arguments are scalars. Instead we were using the generic "pow" function limited in functionality. Not it has been fixed.)

Now I am investigating "bessely". Bessel functions have mature implementation for real arguments and preliminary support for complex arguments. Will update you asap.