-
Notifications
You must be signed in to change notification settings - Fork 1
Floating point arithmetic support #4
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
Comments
@rafael2k Can you please elaborate? In order to implement a program that uses sin and cos which version of Lua source is OK? I see the main version here is 5.1, but you also release 5.5 experimental as well. Where is the source for 5.5? |
Yes, it already is with the Lua55 binary (from Lua 5.5)
Lua 5.1 I compiled to be integer-only. sin() and cos() already work in the float Lua version (lua55) and will not work on the integer-only version (simply because they do not make sense in the integer-only Lua).
There is no problem with the math functions, they are working fine. |
I just created a lua-5.1 branch with floating point support and your patch added. I see the cubes turning. |
Nice! Does this mean that the routines in lmathlib.c didn't work, but the OWC math library routines I recently added do? Or were there other changes made? |
lmathlib is just a wrapper to the libc-provided functions. The integer-only Lua build explicitly exclude most mathlib functions on purpose. |
Now it works for 5.5 in https://github.com/rafael2k/lua/pulls !!!!!!!!!!!!!!!!!!!!! |
Yay! Applied. |
The Lua 5.5 executable is too times bigger than the 5.1. It runs out of memory fot life.lua. So at this stage both are needed. Also 5.5 seems to always print an error at the end of its execution. It works, but it complains "attempt to call a nil value" or "attempt to comapre number with nil". It should be something about an exit code in 5.5. |
Indeed, Lua 5.4/5.5 is much bigger. Lua 5.1 is very stable and we can have at least two customization depending on the needs (speed, but integer only), or "full" Lua 5.1.5. |
Uh oh!
There was an error while loading. Please reload this page.
So there will be support for float numbers in the future (any float arithmetic I mean)?
Will it be possible to use sin() and cos() par example?
Single and double precision are supported in Lua 5.1 which this fork is based on, right?
So it is just a question of ironing out the code to support floating point arithmetic and sun() and cos()?
What is exactly the nature of the problem with the math functions? Problem with Watcom compiler or other?
The text was updated successfully, but these errors were encountered: