Ask Your Question

naderi's profile - activity

1 year ago received badge  Famous Question (source)
1 year ago received badge  Notable Question (source)
7 years ago received badge  Popular Question (source)
9 years ago received badge  Student (source)
9 years ago 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?