sedna icon indicating copy to clipboard operation
sedna copied to clipboard

Incorrect floating point behaviour

Open Beyley opened this issue 1 year ago • 0 comments

Applications compiled with Clang/LLVM tend to have incorrect floating point behaviour when running under sedna Attached is the source code for one such application (written against Zig 0.12.0-dev.1802+56deb5b05) Archive.tar.gz When run on real hardware against this file (run with ./minecraft-printer Sample.gcode.txt) it runs correctly with output that ends in

info: plot { 33, 41, 2 }
info: Moving head to position { 33, 42, 2 }
info: plot { 33, 42, 2 }
info: Moving head to position { 32, 43, 2 }
info: plot { 32, 43, 2 }
info: Moving head to position { 33, 43, 2 }
info: plot { 33, 43, 2 }
info: Setting extrude state to false
error: TODO: handle END_PRINT macro

When run under sedna, it gets stuck in an infinite loop due to incorrect math. A temporary workaround is to use software-floats, which gets around the issue, but this heavily decreases performance.

Here is a copy of the compiled program which exhibits the issue minecraft-printer.tar.gz

Beyley avatar Dec 12 '23 04:12 Beyley