From: oinkoink+unet@... (Bret Jolly) Date: 2003-06-26T06:47:46+09:00 Subject: Re: Decimal builtin? Holden Glova wrote in message news:<200306242007.59017.dsafari@paradise.net.nz>... > I am curious what people use to represent decimals when with no rounding > error? I have a need for this and have come up against a brick wall. I was > hoping for something that was similar to BigDecimal in Java - does Ruby have > anything like this? Shigeo Kobayashi's BigFloat module (and also its successor BigDecimal) does arbitrary-precision arithmetic, and does it internally in decimal, so you avoid the "penny math" errors from converting decimal to binary. It's useful, though a bit short on advanced functionality (I had to write my own logarithm method). You can get the BigFloat from the RAA (http://raa.ruby-lang.org/) and I think BigDecimal is still sitting somewhere in the Ruby development CVs. Regards, Bret