William Scott Jordan wrote:
Hey all!
This is really more of a tcl question, but I'm hoping that someone on
the list might have an explanation. Why does [format %.2f 18.005] round
down to "18.00" and [format %.2f 1.415] round up to "1.42"? Any
guesses? Am I missing something obvious here?
Tcl version 8.4, if it matters.
Thanks!
-William
Set tcl_precision to 17 to see the fullest expansion of the value that
tcl will work with.
% set tcl_precision 17
17
% expr 18.005
18.004999999999999
% expr 1.415
1.415
%
The rounding I think is obvious at that point.
-J
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.