On Wed, Feb 17, 2021 at 10:26:55AM -0800, Tobias Neumann wrote:
> There seems to be a bug in Complex with domains Float or DoubleFloat:
>
> Working:
> (68) -> (-1 :: Complex(MachineFloat))^(3/2)
>
> (68) - %i
> Type:
> Expression(Complex(MachineFloat))
>
> But for Float it's not working as expected:
> (65) -> (-1 :: Complex(Float))^(3/2)
>
> (65) %i
> Type:
> Complex(Float)
> (this is fine:)
> (64) -> (-1 :: Complex(Float))^(1/2)
>
> (64) %i
> Type:
> Complex(Float)
>
> Neither working for DoubleFloat:
> (69) -> (-1 :: Complex(DoubleFloat))^(3/2)
>
> (69) %i
> Type:
> Complex(DoubleFloat)
>
> I looked at the Complex implementation and there is some special case
> "if R is Float or R is DoubleFloat then" but I don't see how this would
> lead to wrong results.
>
> A temporary workaround for me is to convert the exponent to Float first.
Thanks for the report. Should be fixed now in the trunk.
--
Waldek Hebisch
--
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/20210218013542.GB39860%40math.uni.wroc.pl.