XboxDev / nxdk-pdclib

The Public Domain C Library (adapted for original Xbox / nxdk toolchain)
http://pdclib.rootdirectory.de
Creative Commons Zero v1.0 Universal
19 stars 9 forks source link

xbox: Fix tan() implementation #37

Closed thrimbor closed 3 years ago

thrimbor commented 3 years ago

tan() messed up the FPU stack and computed wrong results, because the parameter was not stated as an input in the asm statement. I checked the compiler generated assembly for correctness and compared results with glibc, everything seems to work now.

This was a pretty sneaky error, we may have more cases of this elsewhere.

Fixes #36.