Fred Cisin wrote:
On Wed, 30 Sep 2009, Guy Sotomayor wrote:
<rant>
Why do people always seem to want to have elapsed time as a floating
point number?
</rant>
Because some of the CRAP that they learned in school makes them think that
truncation (or even rounding) to an int value "isn't the RIGHT answer".
In the XenoSoft Sales Tax Genie, I wrote a very small TSR that calculated
the sales tax of every California jurisdiction (based on ZIPCODE), rounded
appropriately to an "exact" cents amount. I NEVER used floating point.
I do not HAVE any "fraction of a cent" coins!
--
Grumpy Ol' Fred cisin at
xenosoft.com
I think that both of you are making assumptions about my education,
upbringing, etc. that are not true and I'd like you to calm down.
I've used that trick in all of my other TCP/IP apps so far - they all
report elapsed time (sometimes with decimal points), and I managed to do
it without ever linking in the floating point library.
I was using this to explore other methods ..
I don't know what CRAP you learned, but I would try to be more gracious ...
Mike