-
Notifications
You must be signed in to change notification settings - Fork 62
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
Change use of long double to double. #1246
Change use of long double to double. #1246
Conversation
We'd have to change the uses of |
What about |
I think we can consider changing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this fix the test on WSL? I thought that the problem was that on WSL the long double
was being treated as a double
. If so, using double
will still create the incorrect result.
How about we instead update the test to test for relative error, and not absolute error? I would like to keep the explicit, more accurate, compile time long double
if possible.
My issue with It's not too stringent a requirement, I think, that we demand IEEE double precision semantics everywhere for correctness and reproducibility, but expecting |
Question: What was the rationale for using long double in the first place? |
Rationale was that it was at least as accurate as double, likely more so. If we were going to do folding, might as well make it accurate. That was before I knew what I know now. |
The PR at present does make the unit-modcc test pass on Windows WSL. |
Change from
long double
todouble
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