Being a bit nasty... ;-)
Why do you say it is broken?
Modulo an error bound of 10^(-15) it looks OK.
Do you expect exact values when you compute with floating point numbers?
Ralf
(7) -> a := (-1.0 :: Complex(Float))^(0.5)
(7) 0.2022266248_7959507324 E -20 + %i
Type: Complex(Float)
(8) -> b := (-1.0 :: Complex(DoubleFloat))^(0.5)
(8) 6.123233995736766e-17 - %i
Type: Complex(DoubleFloat)
(9) -> a^2
(9) - 1.0 + 0.4044532497_5919014648 E -20 %i
Type: Complex(Float)
(10) -> b^2
(10) - 1.0 - 1.2246467991473532e-16 %i
Type: Complex(DoubleFloat)
On 18.02.21 22:55, Tobias Neumann wrote:
> Thank you. As it turns out, complex exponentiation (^ : % -> %) with a
> Complex(DoubleFloat) exponent is also broken:
>
> Good:
> (7) -> (-1.0 :: Complex(Float))^(0.5)
>
> (7) 0.2022266248_7959507324 E -20 + %i
> Type:
> Complex(Float)
>
> Broken:
> (6) -> (-1.0 :: Complex(DoubleFloat))^(0.5)
>
> (6) 6.123233995736766e-17 - %i
> Type:
> Complex(DoubleFloat)
>
>
>>
>
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/d540695f-c238-fad0-c052-1c67821be013%40hemmecke.org.