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.ceil often gives wrong result on device #722

Open
natevw opened this issue Mar 27, 2015 · 1 comment
Open

Math.ceil often gives wrong result on device #722

natevw opened this issue Mar 27, 2015 · 1 comment

Comments

@natevw
Copy link
Contributor

natevw commented Mar 27, 2015

I have a calculation like this:

var res = Math.ceil((92 + 0) / 64);
console.log(res);
console.log(Math.ceil(0.9), Math.ceil(1.4), Math.ceil(2.5), Math.ceil(3.9));

And it's right under POSIX colony but wrong on device:

postel:runtime natevw$ node t_ceil.js 
2
1 2 3 4
postel:runtime natevw$ colony t_ceil.js 
2
1 2 3 4
postel:runtime natevw$ tessel run -s t_ceil.js 
TESSEL! Connected to TM-00-02-f0009a30-005d4757-6c8045c2.
WARN Warning. Deploying just this file.
INFO Bundling directory /Users/natevw/Desktop/Clients/Technical_Machine/runtime
INFO Deploying bundle (3.50 KB)...
INFO Running script...
1
1 2 2 4
natevw added a commit to natevw/sdcard that referenced this issue Mar 27, 2015
@natevw
Copy link
Contributor Author

natevw commented Mar 27, 2015

What's intriguing is that this simply calls Lua's math.ceil — bug in LuaJIT for this arch?

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