You are viewing a single comment's thread from:

RE: Floating point math is the devil!

in LeoFinance4 years ago (edited)

made me wonder what my fav language would handle this..

marc@vishnu ~> tclsh
% proc myAdd x {
expr { $x * 125 }
}
% myAdd 0.001
0.125
% myAdd 0.00000001
1.25e-6

tcl returned value in scientific notation to be correct, would cause formatting errors, no calc errors.

i love programming, have fun, keep light.