Skip to content
Prev 31445 / 63424 Next

Inaccurate result for 0. (PR#13538)

G?bor Cs?rdi wrote:
hmm, an interesting quote:

"
To quote from ?The Elements of Programming Style? by Kernighan and Plauger:

    /10.0 times 0.1 is hardly ever 1.0/. 

"

so here's one example where 10.0 times 0.1 *is* 1.0:

perl -Mbignum -le 'print (10.0 * 0.1 == 1.0)'
# 1, for true

not an isolated idiosyncrazy, for that matter.

vQ