From: "trans. (T. Onoma)" Date: 2004-10-30T14:48:22+09:00 Subject: Re: Rounding error, (100.0 * 9.95).to_i == 994 On Saturday 30 October 2004 01:30 am, Hal Fulton wrote: | trans. (T. Onoma) wrote: | > Honestly, you're way overstating this and undervaluing the problem. Many | > persons have wasted hour upon hour compensating for this. This whole | > thread kept going b/c of an overlooked rounding error, that could have | > easily propagated into live code and been a real headache for someone | > --what value do you put on all those efforts? | | I'm not overstating or undervaluing anything. | | Floating point arithmetic is a perfectly good tool with its limitations. | Any good craftsman knows the limitations of his tools. Too often nowadays | we find craftsmen who do not know those limitations. As for valuing efforts | -- I value efforts more highly when people understand the tools they are | using and thus use them appropriately. In those cases, the headaches you | describle will not happen. | | End of thread for me. And by the way, pg. 41 of your book the Ruby Way, has a couple of those "misunderstandings" on it. T.