IEEE floats suck and mathematicals reals are in general not computable.
A constructible real number is essentially a suspendable computer program that outputs the next digit of the number whenever you ask for it, in finite time. With some work you can define operations like addition and multiplication of such objects. But if you try to define an equality test, you will find that the algorithm will correctly differentiate distinct numbers in finite time, but will not terminate on equal numbers (how many digits have to agree before you know they are the same?). Deciding equality here requires a halting oracle.
0.1 + 0.2 != 0.3
is one of many little problems that adds up to them giving up the possibility of using software to put their skills on wheels. Like many reforms in computing, performance is used as an excuse to maintain the status quo of the priesthood. IBM is the only company in the industry that's taken this seriously, seeYou mean IEEE745 Decimals?
Decimals also have serious pitfalls. For many applications they are just worse and lead to more problems.
In the end they are at least as confusing as floats. And switching to them as the default would make programs generally worse.
> Like many reforms in computing, performance is used as an excuse to maintain the status quo of the priesthood.
Very silly argument. Performance is not the issue.
Floats are useful because of their range. Even if input and output are small, intermediate results can easily be very large and exceed the representable decimals.
Every programmer has to learn that the computer does not understand real numbers and that expecting it to is entirely misguided. No different representation will change that.
Someone here said recently: It is rarely a good idea to compare finite representations of real numbers for equality. I am inclined to agree.
https://aperiodical.com/2022/03/now-im-calculating-with-cons...
Having a fixed size datatype which can emulate the reals to a degree satisfying most applications is really amazing. They are one of the best designed datatypes.
You can also use just floats to calculate mathematical true results.