-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix a bug of strtold #8441
fix a bug of strtold #8441
Conversation
if input is -1e308,The output should be -100000000...... but the output is -inf
Indeed this PR fixed the issue, and tests were able to move forward. However, now there is a new Lua test failing. Please have a look bellow:
|
@flyingfish89 I tried the above change, and indeed it fixes the issue. The tests move forward. However, I get a new failure at: assert(tonumber'+ 0.01' == nil and tonumber'+.e1' == nil and
tonumber'1e' == nil and tonumber'1.0e+' == nil and
tonumber'.' == nil) After commenting out the failing tests, I get a new failure at: assert(f(tonumber(' ')) == nil) (And maybe there are more after that...) |
Can you show me how to build your test program, and then I will fix the rest of the bugs as soon as possible |
I ’m sorry about this. @fjpanag |
Don't worry! So, I am using the official Lua tests suite. I am using Lua v5.2.4, so I am running these tests. Note that the NuttX config is for Lua v5.4, while I am running v5.2. So, you may just try on Feel free to ask for anything that you may need me to test out, or for any Lua-related help. |
As a side note, the Lua tests are quite extensive. They test both the language itself but also the system it runs on. Lua depends on standards compliance, and the tests exercise this in many places. I think that it would be a great addition to have CI run these tests. It seems of great value. |
ok,thanks for your suggestion and I'll use it in my future work. |
Summary
if input is -1e308,The output should be -100000000......
but the output is -inf
See discussion here: #7992
Impact
Testing
sim:lua