Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with fast_float, imag and sqrt : NotANumber isn't fine. #10087

Open
sagetrac-fmaltey mannequin opened this issue Oct 6, 2010 · 1 comment
Open

bug with fast_float, imag and sqrt : NotANumber isn't fine. #10087

sagetrac-fmaltey mannequin opened this issue Oct 6, 2010 · 1 comment

Comments

@sagetrac-fmaltey
Copy link
Mannequin

sagetrac-fmaltey mannequin commented Oct 6, 2010

I'm looking at the float result of y by fast_float for m=0.0 :

var('m')
y=imag(sqrt(1+sqrt(m-1)))
fast_float (y, m)(0)     # I get nan

Now I try the constant function (without m),
the value must be the previous one for m=0.

z=imag(sqrt(1+sqrt(-1)))
fast_float(z,m)(0)  # I get the right 0.45...=2^(1/4)*sin(pi/8)

I feel (but I can't prove) that this bug is near from the #7165 bug I found in parametric_plot [that maybe calls fast_float in this case].

When I read the y.imag() value, there is at the end a fuzzy ...*sqrt(abs(sqrt(m-1)+1))
This sqrt(m-1) is Not_A_Number if m=0 because fast_float only uses real numbers. So this call might be replaced by an other expression, with real part and imaginary part.

There is no expression as sqrt(1+sqrt(-1)) in z.imag() and Sage runs right.

F.

Component: symbolics

Stopgaps: todo

Issue created by migration from https://trac.sagemath.org/ticket/10087

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Aug 25, 2015

Stopgaps: todo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant