Closed steventroughtonsmith closed 6 years ago
Could be worse... SC compiles it down to 0.807692 or 062500.000000, depending on if it's a compile time constant or not.
Aha! Not just me then 🙃 So it's not just the one tool, rather something in the emulation outright? Anything I can do to help triage?
I haven't looked into it much, but Petter recently committed a fix for 64-bit division in the WinFellow code - you might try and see if this fixes it?
https://github.com/petschau/WinFellow/commit/f5eeb1a1f729477f9920d2c25173b88bad9527bc
I can confirm that the above patch does not fix the issue here, from what I can tell.
I fixed some problems with the SANE FX2DEC formatting which should fix this issue (but not the 1.0/16.0 = 0.807692 SC issue).
It works! Safe to close this on my end. Thanks!
Hey there! I'm seeing a reproducible MrC bug with mpw 0.8.0/MrC C Compiler 4.1.0f1c1; floating point division does not work properly.
test.c
Compiling
With the above, running MrC on real hardware emits code that prints '0.062500'. Running MrC under mpw prints '625.000000'.
I am running a slightly older build of mpw so my apologies if you're already on top of this! =)