• 1 Post
  • 2 Comments
Joined 1Y ago
cake
Cake day: Jul 23, 2023

help-circle
rss

Heather Net should better go back to her networking course.


Found in a python tutorial on [guru99.com](https://www.guru99.com/de/python-regular-expressions-complete-tutorial.html). For the non german speaking: The noun "research" translates to "Forschung" in german.
fedilink

Well that’s how floating point units work.

The following is more a explanation about the principle than a precise description of float values in programming, since working with binary values has its own quirks, especially with values lower than one, but anyways:

Think about a number noted by a base and an exponent, like
1.000.000
can be represented as 1*10^6.

1.000.001 now becomes 1,000001*10^6.

If you want more precision or bigger numbers maintaining the same precision, you will have to add further and further decimal places and that hits a limit at a certain amount.

So basically you can either get really high numbers in a floating point unit or you can store really precise small numbers. But you cannot achieve both at the same time.