numbers
2 tutorials tagged “numbers”.
- BigInteger and BigDecimal in JavaExact decimal money math with BigDecimal and unlimited whole numbers with BigInteger: creating them, rounding, comparing, and an immutable Money class.
- Integer Overflow and Floating-Point PrecisionWhy Integer.MAX_VALUE + 1 becomes negative, why 0.1 + 0.2 isn't 0.3, how to detect overflow with Math.addExact, and how to handle money correctly.