// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.math.BigDecimal;

public class Rounding {
    public static void test(double x) {
        System.out.printf("%30.24f\n", x);
        BigDecimal xx = new BigDecimal(x);
        System.out.println(xx);
    }
    public static void main(String[] args) {
        test(6108.675);
        test(4886.94 * 1.25);
        test(141.075);
    }
}
