Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why is a==b False?

Please see the following code. Why is a==b False? Thanks!

Input:

a=n(1/2*sqrt(5) - 1/2,digits=15)
b=n(1-a^2,digits=15)
print a
print b
a==b

Output:

0.618033988749895
0.618033988749895
False