#10087: bug with fast_float, imag and sqrt : NotANumber isn't fine.
-------------------------+--------------------------------------------------
   Reporter:  fmaltey    |       Owner:  burcin
       Type:  defect     |      Status:  new   
   Priority:  major      |   Milestone:        
  Component:  symbolics  |    Keywords:        
     Author:             |    Upstream:  N/A   
   Reviewer:             |      Merged:        
Work_issues:             |  
-------------------------+--------------------------------------------------
 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.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10087>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to