JVM Languages
jbigdec.txt
Associated article: Fixed, Floating, and Exact Computation with Java's Bigdecimal
Tags: JVM Languages
Published source code accompanying the article by Mike Cowlishaw, Joshua Bloch, and Joseph D. Darcy in which they examine the features in the J2SE 1.5 BigDecimal class makes calculations easy.
Fixed, Floating, & Computation with BigDecimal
by Mike Cowlishaw, Joshua Bloch, and Joseph D. Darcy
Example 1:
BigDecimal rate=new BigDecimal("1.05");
BigDecimal cost=new BigDecimal("0.70");
System.out.println(rate.multiply(cost).setScale(2, BigDecimal.ROUND_HALF_UP));
// displays 0.74
...


