Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

math.h functions support #634

Open
manicpop opened this issue Nov 20, 2024 · 0 comments
Open

math.h functions support #634

manicpop opened this issue Nov 20, 2024 · 0 comments

Comments

@manicpop
Copy link

manicpop commented Nov 20, 2024

Using build 101324-178.

Below is the status of the following math.h functions. These don't necessarily all need to be working if no modules use them, but I'm trying to be thorough as possible. I tested each one by hand with a few values, so this is far from an exhaustive test.

Of these, only pow() is non-functional and also used in Galactic Empire.

acos() -- works as intended (used in Galactic Empire)
asin() -- works as intended
atan() -- seems to return the input value as output, doesn't do anything, but doesn't crash
atan2() -- returns incorrect values, doesn't crash
cos() -- works as intended (used in Galactic Empire)
cosh() -- returns incorrect values, doesn't crash
sin() -- works as intended (used in Galactic Empire)
sinh() -- module crashes ('Unsupported OpCode: Fabs')
tan() -- module crashes ('Unsupported OpCode: Fsincos')
tanh() -- module crashes ('Unsupported OpCode: Fabs')
exp() -- seems to return the input value as output, doesn't do anything, but doesn't crash
frexp() -- module crashes ('Unsupported OpCode: Fxtract')
ldexp() -- works as intended
log() -- seems to fail silently, does not crash anything, module continues on as if nothing happened
log10() -- seems to return the input value as output, doesn't do anything, but doesn't crash
modf() -- works as intended (used in Galactic Empire)
pow() -- seems to handle integers fine, floating point values kick you out of the current module but it doesn't crash (used in Galactic Empire)
sqrt() -- works as intended (used in Galactic Empire)
ceil() -- works as intended
fabs() -- works as intended
floor() -- works as intended
fmod() -- module crashes ('Unsupported OpCode: Fprem')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant