• 1 Post
  • 2 Comments
Joined 1 year ago
cake
Cake day: July 23rd, 2023

help-circle


  • 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.