/*
3419229223372036854775809.23343
3419229223372036854775805.23343
1709614611686018427387903.616715
false
3419229223372036854775807.23343
3419229223372036854775807.23343
2.0
1.23343
*/
import java.math.BigDecimal;
public class MainClass {
public static void main(String argv[]) {
BigDecimal first = new BigDecimal("3419229223372036854775807.23343");
BigDecimal second = new BigDecimal("2.0");
System.out.println(first.add(second));
System.out.println(first.subtract(second));
System.out.println(first.divide(second));
System.out.println(first.equals(second));
System.out.println(first.abs());
System.out.println(first.max(second));
System.out.println(first.min(second));
System.out.println(first.remainder(second));
}
}
|