See also the FAQ at
http://www2.hursley.ibm.com/decimal/
for why it's a good idea to avoid binary floating-point. There's also a link there to the Perl BigNum library:
http://dev.perl.org/perl6/pdd/pdd14_bignum.html
which follows the General Arithmetic Specification.
mfc