The last two cases is where one can see the difference that bigrat makes, but should the comparison in the second case not yield false?perl -e 'print 201/10 == 20.10000000000000000 ? "eq" : "ne"' eq perl -Mbigrat -e 'print 201/10 == 20.10000000000000000 ? "eq" : "ne"' eq perl -e 'print 201/10 == 20.10000000000000142 ? "eq" : "ne"' eq perl -Mbigrat -e 'print 201/10 == 20.10000000000000142 ? "eq" : "ne" +' ne
In reply to Re^6: floating point addition
by morgon
in thread floating point addition
by kresike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |