Floating point: Doing all internal math in decimal would be a more faithful simulation
I don't have any plans to do this now, but as noted in #74, doing the mathematical operations internally in binary floating point and rounding to a 10-digit decimal mantissa can lead to some counter-intuitive behavior at the margins.
Doing all the math myself in decimal floating point is certainly doable, and any performance impact would be totally negligible. That would be a moderately significant undertaking. Kind of fun, mind you -- actually implementing tan and sqrt and y^x and all the rest from the ground up would be a fun project; I might even give it a whirl some day.
Fully agree that this is enhancement with negligible impact. Still impressed and happy with the excellent level of the simulation. Many thanks. KR P
I think I'll leave this issue open, as a collecting point if other folks find other places where it's worth it to convert to decimal math. I think #78 is the low hanging fruit, but maybe there are others?
Implementing decimal multiplication and division improved the fidelity of rounding behavior, at least in a few areas I was able to spot. I was surprised at how far I was able to go with just add, subtract, multiply and divide being done in decimal floating point. For things like sqrt and trig functions, any benefit of decimal FP seems nonexistent; any rounding differences would, AFAIK, be nearly undetectable (except the special cases like cos(90 degrees) that are already handled).
I think it's fair to call this resolved, with this putback: d89456c
As you stated, if someone needs the exact match, the ROM emulator is only the way to go. Some glitches and special cases is difficult to recognize without knowing all internal special massaging. I am also very impressed how faithful already previous versions are. Is the decimal multiplication and division already included in 2.1.15.2 or will they be in 2.1.16?
Good job, thank you. KR P
2.1.16, which I'm planning to release in beta on Android and Linux today or tomorrow. I'll probably put the beta on the web too.
Published in 2.1.16