Re: [AOLSERVER] Tcl rounding question

2008-05-03 Thread Tom Jackson
You have to remember that floating point math is done in base 2, but your are inputing your numbers in base 10. Another weired thing to keep in mind is that the default precision in Tcl has changed in Tcl 8.5, so some answers are now different than they were in 8.4. Another thing to keep in mi

Re: [AOLSERVER] Tcl rounding question

2008-05-03 Thread Dossy Shiobara
On 2008.05.03, William Scott Jordan <[EMAIL PROTECTED]> wrote: > Yuck. Okay, so is there any practical work-around for getting X.XX5 to > consistently round up? I suppose I could do something like add > 0.001 to any number that I'm rounding, but that seems pretty sloppy. > Is there a

Re: [AOLSERVER] "Fun, free applications for building personal sites."

2008-05-03 Thread Thorpe Mayes
That is not a bad idea, provided you have some documentation prepared for AOLServer. It will not do anyone any good to have a fun, free application if they cannot figure out how to install the software. The documentation does not have to be absolutely comprehensive. How about this: how

Re: [AOLSERVER] Tcl rounding question

2008-05-03 Thread William Scott Jordan
Yuck. Okay, so is there any practical work-around for getting X.XX5 to consistently round up? I suppose I could do something like add 0.001 to any number that I'm rounding, but that seems pretty sloppy. Is there a best practice for dealing with this? -William Dossy Shiobara wrote: On

Re: [AOLSERVER] Tcl rounding question

2008-05-03 Thread Alex
It does explain it, but still results are not obvious :) For example, this code: === set bn [set rn 0] for {set i 0} {$i < 1000} {incr i} { set f "${i}.005" set r [format %.2f $f] set d [expr $r - $i] if {$d > 0.0} { incr bn } else { incr rn } } puts

Re: [AOLSERVER] Tcl rounding question

2008-05-03 Thread Bas Scheffers
The plot thickens: % format %.2f 18.0051 18.01 No ideas, though. Bas. On 04/05/2008, at 8:01 AM, 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 "1

Re: [AOLSERVER] "Fun, free applications for building personal sites."

2008-05-03 Thread Alex
As a matter of fact I am working on something somewhat similar to that to some degree :) Basing on my AOLServer experiences while making one of the sites (www.tolk-i-polza.ru if you ask, but you got to learn Russian to use it) I am trying to make a framework that might help newbies. 1) It shall b

Re: [AOLSERVER] Tcl rounding question

2008-05-03 Thread Jeff Rogers
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?

Re: [AOLSERVER] Tcl rounding question

2008-05-03 Thread Juan José del Río
On Sat, 2008-05-03 at 15:31 -0700, 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 > gue

Re: [AOLSERVER] Tcl rounding question

2008-05-03 Thread Dossy Shiobara
On 2008.05.03, William Scott Jordan <[EMAIL PROTECTED]> wrote: > 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

[AOLSERVER] Tcl rounding question

2008-05-03 Thread William Scott Jordan
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 matte

[AOLSERVER] "Fun, free applications for building personal sites."

2008-05-03 Thread Dossy Shiobara
Back in Feburary 2005, Dan Chak at MIT said something to me that I just haven't had the motivation to pursue. However, I really would like to hear what folks think of his statement: > What AOLServer "community" needs is a bunch of fun, free > applications for building personal sites. It