BigDecimal provides arbitrary-precision floating point decimal
arithmetic. Copyright (C) 2002 by Shigeo Kobayashi
<firstname.lastname@example.org>. You may distribute under the
terms of either the GNU General Public License or the Artistic
License, as specified in the README file of the BigDecimal
distribution. Documented by mathew <email@example.com>. Ruby
provides built-in support for arbitrary precision integer
arithmetic. For example: 42**13 -> 1265437718438866624512
BigDecimal provides similar support for very large or very
accurate floating point numbers. Decimal arithmetic is also
useful for general calculation, because it provides the correct
answers people expect–whereas normal binary floating point
arithmetic often introduces subtle errors because of the
conversion between base 10 and base 2. For example, try: sum = 0
for i in (1..10000) sum = sum + 0.0001 end print sum and
contrast with the output from: require 'bigdecimal' sum =
BigDecimal.new("0") for i in (1..10000) sum = sum +
BigDecimal.new("0