RE: Floating point math is the devil!

avatar
(Edited)

You are viewing a single comment's thread:

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.



0
0
0.000
0 comments