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

Fix number rounding with MinGW #28

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@
#define MALLOC_OVERHEAD 8
#endif

#if !defined(_WIN32)
/* define it if printf uses the RNDN rounding mode instead of RNDNA */
#define CONFIG_PRINTF_RNDN
#endif

#if !defined(EMSCRIPTEN)
/* enable stack limitation */
Expand Down
5 changes: 0 additions & 5 deletions tests/test_builtin.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,6 @@ function test_number()
assert(Number.isNaN(Number("-")));
assert(Number.isNaN(Number("\x00a")));

// TODO: Fix rounding error on MinGW.
if (std.getenv('MSYSTEM')) {
return;
}

assert((25).toExponential(0), "3e+1");
assert((-25).toExponential(0), "-3e+1");
assert((2.5).toPrecision(1), "3");
Expand Down
Loading