Skip to content

Commit

Permalink
Binary representation of the floating-point numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
trekhleb committed Jul 16, 2021
1 parent b2d1ec8 commit badf301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/math/binary-floating-point/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Binary representation of floating-point numbers

Have you ever wondered how computers store the floating-point numbers like `3.1415` (𝝿) or `9.109 × 10⁻³¹` (the mass of the electron in kg) in the memory which is limited by a finite number of ones and zeroes (aka bits)?
Have you ever wondered how computers store the floating-point numbers like `3.1416` (𝝿) or `9.109 × 10⁻³¹` (the mass of the electron in kg) in the memory which is limited by a finite number of ones and zeroes (aka bits)?

It seems pretty straightforward for integers (i.e. `17`). Let's say we have 16 bits (2 bytes) to store the number. In 16 bits we may store the integers in a range of `[0, 65535]`:

Expand Down

0 comments on commit badf301

Please sign in to comment.