You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the modcc unit tests on a Win10+WSL+Ubuntu 20.04 build has 1 test failing (all other tests are OK):
/home/user/arbor/test/unit-modcc/test_parser.cpp:663: Failure
The difference between eval(e.get()) and test_case.second is 7.4505805969238281e-09, which exceeds 1e-10, where
eval(e.get()) evaluates to -63281459.031249993,
test_case.second evaluates to -63281459.03125, and
1e-10 evaluates to 1e-10.
A bug has been filed in the WSL repo: microsoft/WSL#830. long double is assumed to be 80 bit, but is 64 bit in WSL.
Since as of today WSL still installs v1 rather than v2 by default, and this is a minor bug, we can change the test to a relative error, e.g.: EXPECT_TRUE(near_relative(eval(e.get()), test_case.second, 1e-10));
We can instead not assume assumptions about long double, and change eval() accordingly.
The text was updated successfully, but these errors were encountered:
Change from long double to double for storing floating point values in modcc.
WSL, and Windows generally, treats long double differently than Linux, which leads to inconsistencies in literal numeric values in code generated by modcc on the two platforms.
Fixes#1245
Running the modcc unit tests on a Win10+WSL+Ubuntu 20.04 build has 1 test failing (all other tests are OK):
A bug has been filed in the WSL repo: microsoft/WSL#830.
long double
is assumed to be 80 bit, but is 64 bit in WSL.Since as of today WSL still installs v1 rather than v2 by default, and this is a minor bug, we can change the test to a relative error, e.g.:
EXPECT_TRUE(near_relative(eval(e.get()), test_case.second, 1e-10));
We can instead not assume assumptions about
long double
, and changeeval()
accordingly.The text was updated successfully, but these errors were encountered: