I hate floating point operations
-
That's one way of putting it. :omg:
Anna :rose: Linting the day away :cool: Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"
-
K(arl) wrote:
I hate floating point operations
So do we. Any data type where "equality of values" is ill-defined is clearly half-baked. Someone should have put a more thought and less transistors into the matter.
The concept of numerical equality is a human concept that you are trying to enforce on a world where it doesn't exist. Two lengths are never exactly equal. Any collection of particles will always have virtual particles which are constantly being created and destroyed. If you say I have two baseballs or 5 nails, none of those objects are the same, you are only counting the number of objects that fit the abstract concept of baseball or nail. Exact equality only works with these abstract concepts. If you take that approach, floating point values are a good representation of lengths because lengths get the same errors when you add and multiply them using physical tools like a straightedge and compass. Integers and scaled are a better fit for abstract concepts like money which isn't a real thing.
Using the GridView is like trying to explain to someone else how to move a third person's hands in order to tie your shoelaces for you. -Chris Maunder
-
There are an awful lot of irrational numbers out there. I think I would rather have my planes and bridges built using a floating point approximation of PI rather than 355/113 >In either case, the concept of "equal values" can be defined and implemented with rigor, consistency, and reliability. It's a pity these concepts don't actually appear in real life. You postulate that the universe isn't continous but is discrete, implying you believ in quantum theory, yet the basis of quantum theory itself is that there is an inherent uncertainty in all measurements. >Secondly, as popular as the metric system may be in many countries, we find it much less effective in everyday life than the English system. That's because you live in a country that uses the Imperial system. I buy food that is weighed in grams, and buy petrol and milk in litres, and need to know how many kilometres there are till my turnoff. If I ever talk in halves or quarters I mean it in a vague way ("half a loaf of bread, please") and there is no need for accuracy.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Also don't forget - There is a wave nature to light. The universe may be considered discreet for SOME applications, but there is a duality to matter. Every object has a wavelength... I suppose we don't need calculus anymore - what use are derivatives anyway? We'll just cut everything into super tiny rectangles, since a wave can't have a continuous curve...What was Newton thinking?