Ask Your Question

naderi's profile - activity

2017-07-18 04:02:24 -0600 received badge  Popular Question (source)
2015-11-29 03:41:34 -0600 received badge  Student (source)
2015-11-28 16:10:34 -0600 asked a question Rounding error in sqrt(2) in Sage

In the following code,

sage: floor(sqrt(2)*sqrt(2.)/2)==1
True
sage: (sqrt(2.)*sqrt(2.)/2)==1.0
False
sage: (sqrt(2.)*sqrt(2.)/2)
1.00000000000000
sage :((2^(1/2.))== sqrt(2.))
True
sage: (((2.^(1/2))* sqrt(2.)) == 2.)
False

why is there an approximation error?