As far as I can tell, this behavior is not new. The (default) choice
made for the square root of an integer is to return an exact answer
rather than an approximation. Thus sqrt(9) = 3, sqrt(10) = sqrt(10) and
sqrt(12) = 2*sqrt(3). On the other hand, a floating point number is
viewed as an approximation of a real number so the value returned by
sqrt is then an approximation of the square root.
Note that the default behavior for integers can be changed using
optional parameters:
sage: sqrt(10, prec=100)
3.1622776601683793319988935444
sage: sqrt(10, prec=100, all=True)
[3.1622776601683793319988935444, -3.1622776601683793319988935444]
Regards,
Bruno
Le 14/11/2018 à 09:20, Henri Girard a écrit :
HI,
I am calculating a square root sqrt(9)=3
But at 10 and over I got this answer sqrt(10)= sqrt(10) except
sqrt(16)=4 when it's a right square
but sqrt(10.0)=3.16... Is it a normal answer ?
sqrt(16)=4 works
Any explaination ?
Regards
Henri
--
You received this message because you are subscribed to the Google Groups
"sage-release" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-release+unsubscr...@googlegroups.com.
To post to this group, send email to sage-release@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-release.
For more options, visit https://groups.google.com/d/optout.