3. Floating-Point Arithmetic
This section concerns arithmetic on the floating-point types: float and double.
3.1. Floating-point arithmetic is inexact
Prescription: Don’t use floating-point where exact results are required; instead, use an integral type or BigDecimal.
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.
Start a Free Trial