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

Accept small differences in floating-point results between C & Go lua implementations #138

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

detaoin
Copy link

@detaoin detaoin commented Dec 16, 2024

When testing the C lua compiler (binary dump) differences, the test failed TestParserExhaustively in lua-tests/attrib.lua with parser_test.go:134: 153: 1.0000000000000001e+33 != 1e+33.
This is caused by different implementations of math.Pow in Go, and C pow functions.

I also replaced calls to executable luac with luac5.2; at least on recent Debian and Ubuntu versions, lua version 5.2 compiler is named so. (otherwise lua 5.4 would be used today)

Diego Joss added 3 commits December 16, 2024 22:17
At least on Debian (and derived distributions), the luac compiler for
version 5.2 is explicitly named luac5.2. Otherwise, today, version 5.4
is used instead.
It is known that the Go stdlib math functions may give different results
than the C equivalents. See golang/go#25270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant