Well, I didn't want to anymore, but now I'm going to answer.
It's not that simple (which is also in life).
The basic definition was given by IEEE 754-1985(https://standards.ieee.org/standard/754-2019.html) standard extended in 2008 and last I guess 2019.
If we look at the first extension in 2008 it defined the numbers this way(I will allow the tables to remain in my language)
Figure1.
Which represents the range
fig2.
Ways to store floating point numbers
Computer systems take advantage of the fact that a selected subset of real numbers can be expressed as
XFP = (-1)S × bexponent-bias × m
Different computer systems use different bases, and different representations of the mantissa and exponent
Fig3
Anyone who uses C or C++ for programming knows that they have to decide what they want at the beginning of their own program. Turning translation optimization on to the expected result can mess with your head pretty good.
It's even more interesting with interpreted languages. For example, Python 2 behaves quite differently than Python3 when rounding.
It's just a fringe thing, and he knows I'm way off topic.
Those of us who do this for a living already know this(and that it costs a lot of nerves) and the rest of us have to put up with it. It is interesting that even the manufacturers of the various PLCs each take a different approach to the problem and prefer not to point it out. Such a PID control setup is often nerve wracking.
RS
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum