On Fri, 15 Apr 2005 08:11:27 +0900, Ilmari Heikkinen wrote: > Either do fixed-point decimals with integers and decimal point > divisor (100 => 1.00*100; 100 + 20 + 20 + 20 - 160 => 0) > or pick an error threshold and check that (a - b) < threshold > (1.0 + 0.2 + 0.2 + 0.2 - 1.6) < 0.01 > => true Just use BigDecimal. No need to get tricky. -- Neil Stevens - neil / hakubi.us 'A republic, if you can keep it.' -- Benjamin Franklin