Skip to content

Commit

Permalink
Update Data Types.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinctofel authored Jan 22, 2025
1 parent 401d950 commit 2c9e893
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Programming/Java/Data Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@
## Numerical Precision

A float value has a precision of about 9 significant digits, and a double value has a precision of about 17 significant digits. It is generally best to assume that the last digit of any float or double value is rounded and may not be exact.

## Floating point literals

A floating-point literal using scientific notation is written using an e preceding the power-of-10 exponent, as in 6.02e23 to represent 6.02 x 1023. The e stands for exponent. Likewise, 0.001 is 1 x 10-3 and can be written as 1.0e-3. For a floating-point literal, good practice is to make the leading digit non-zero.

0 comments on commit 2c9e893

Please sign in to comment.