Skip to content

Fix-up coefficients and smallest denormal value for ieeeDouble in exp()#3514

Merged
MartinNowak merged 1 commit intodlang:stablefrom
MartinNowak:fix14732
Jul 23, 2015
Merged

Fix-up coefficients and smallest denormal value for ieeeDouble in exp()#3514
MartinNowak merged 1 commit intodlang:stablefrom
MartinNowak:fix14732

Conversation

@MartinNowak
Copy link
Member

@ibuclaw
Copy link
Member

ibuclaw commented Jul 23, 2015

Note, though doesn't actually fix the bug. The problem is with the test itself.

@MartinNowak
Copy link
Member Author

Note, though doesn't actually fix the bug. The problem is with the test itself.

Can you make a pull to fix the test then?
And let's please merge this.

@ibuclaw
Copy link
Member

ibuclaw commented Jul 23, 2015

According to @kinke - the test works on LDC+Win64 and when using LLVM intrinsics. However I get an "off by one" precision difference when using this function with GDC+Linux (-mlong-double-64), when using GLibc, and when using GCC builtins.

I think the conclusive result might be to ensure that we are accurate up to mantissa bits - 1? This would mean that all tests would be affected.

@MartinNowak
Copy link
Member Author

I think the conclusive result might be to ensure that we are accurate up to mantissa bits - 1? This would mean that all tests would be affected.

I understand too little of the topic to make that decision and lack the time to go into the details.
Why would our implementation fail to deliver the correct result?

Can we already merge this PR which seems to fix some constants, then follow-up on the test failure.

MartinNowak added a commit that referenced this pull request Jul 23, 2015
Fix-up coefficients and smallest denormal value for ieeeDouble in exp()
@MartinNowak MartinNowak merged commit 3e5e14b into dlang:stable Jul 23, 2015
@MartinNowak MartinNowak deleted the fix14732 branch July 23, 2015 22:55
@ibuclaw
Copy link
Member

ibuclaw commented Jul 24, 2015

Why would our implementation fail to deliver the correct result?

I don't know. When I run the test using GDC to build, I get the same result back as when using GCC to call the libm function. @kinke used LDC and LLVM and got back a different result (albeit, on a different platform).

It might be purely down to a conflict between compiler backends/C runtimes.

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

Successfully merging this pull request may close these issues.

2 participants