Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section 3. Floating-Point Arithmetic

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