4 ms·
What is interesting about this is how it forces one to deal with a lack of precision. Computers are inherently imprecise in many situations, leading to non-comm
by bmh100 12y ago
What is interesting about this is how it forces one to deal with a lack of precision. Computers are inherently imprecise in many situations, leading to non-commutative multiplication. I wonder if a language like this would be helpful for programming with approximate processors. They are supposed to be much faster at a cost of precision.
- zwegner 12y agoPedantic aside: I guess you mean non-associative multiplication? That is, ax(bxc) versus (axb)xc. Since rounding happens at different times, they can give different results. Floating point multiplication is indeed non-commutative as well, but that has to do with NaN handling, not imprecision.
- bmh100 12y agoYes, good catch! I did indeed mean non-associative multiplication based on the timing of the rounding.
- logician76 12y agoComputers are inherently imprecise? Floating point is imprecise, yeah lets generalize that to the entire computer..
- mbq 12y agoFloat operations are actually precise, the catch is that floats are not real real numbers.
- meowface 12y agoIs there any part of a computer that could actually be considered imprecise? Perhaps only if there is a hardware malfunction.
- Xixi 12y agoYou could argue that float/int arithmetic is inherently imprecise. It is, however, fully deterministic. Of course as you hint in your comment, at a lower level hardware is prone to failures and lack determinism: bugs in the cpu, ram corruption (ECC-ram is of course better), data corruption everywhere on storage/network/data links, etc. Ever heard a gamer bitching about Windows 7 instability? That's not Windows, but overclocking not quite under control and/or insufficient cooling... And when all is under control a cosmic ray might still wreak your bits havoc.
- tedunangst 12y agoIt's deterministic at some level, but can be very difficult to predict when a compiler will decide to spill 80-bit float registers to 64-bit doubles in memory.