View Single Post
Old Jul 6th, 2006, 5:36 PM   #15
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
There are actual quantities and then there are representations of quantities and the failings thereof. Grab your hand calculator and compare 1/3*3 with 1*3/3. Everyone knows they're the same (except your calculator). Another kind of problem is that floating point methods store a much larger range of numbers in the same space as integers with a much smaller range. A second's thought will raise suspicions that something had to go, in the tradeoff. Your machine likes to scale numbers using powers of 2, whereas most of us like to scale numbers using powers of 10. Things won't always work out cleanly.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote