I made the foolish mistake of using binary fractions internally, while providing approximate decimal equivalents in the user interface. I should have defined a scaled point to be 1/100000 of a printer's point, thereby making internal and external representations coincide. This anomaly, which is discussed further in [5], is the only real regret that I have today about TeX's original design.The gods are fallible, too :)
Companies I worked for have been burned by this issue a surprising number of times. The most memorable case I ran into was a company that implemented an electronic stock and option trading platform that used binary floating point math to hold monetary values. Big, big problems resulted. To fix it, I had to do battle with a dozen or so senior engineers – very experienced and generally competent folks – who had a great deal of trouble accepting the simple fact that binary floating point numbers are incapable of exactly representing a great many decimal fractions...
No comments:
Post a Comment