Skip to content

Adjust expected result of test to match ARM and others#3819

Merged
dnadlinger merged 1 commit intodlang:masterfrom
ibuclaw:arm_exptest
Nov 19, 2015
Merged

Adjust expected result of test to match ARM and others#3819
dnadlinger merged 1 commit intodlang:masterfrom
ibuclaw:arm_exptest

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Nov 19, 2015

From the conversation and comparing of results in #3483 - the following was found for the result of exp(-0x1.64p+9L):

Win64 ARM ARM libm (expl) x86 (double) x86 libm (exp) LLVM intrinsic GCC intrinsic
0x0.06f84920bb2d3p-1022 0x0.06f84920bb2d4p-1022 0x0.06f84920bb2d4p-1022 0x0.06f84920bb2d4p-1022 0x0.06f84920bb2d4p-1022 0x0.06f84920bb2d4p-1022 0x0.06f84920bb2d4p-1022

With feqrel giving the following number of mantissa bits in common (53 means identical to 0x0.06f84920bb2d3p-1022L).

Win64 ARM ARM libm (expl) x86 (double) x86 libm (exp) LLVM intrinsic GCC intrinsic
53 51 51 51* 51* 51 36*

[*] UPDATE: Whoops, I forgot to set rounding mode as per unittest. These are now correct, except for the GCC intrinsic, which const-folded the result. :-)

Changing the test to the mode result returned yields (53 means identical to 0x0.06f84920bb2d4p-1022L

Win64 ARM ARM libm (expl) x86 (double) x86 libm (exp) LLVM intrinsic GCC intrinsic
51 53 53 53 53 53 53

So Win64 is the odd one out (but we are not sure why) and the rest produce the exact same result.

@kinke
Copy link
Contributor

kinke commented Nov 19, 2015

Without rechecking the LDC results with the new expected value, but given how feqrel() works for subnormals, Win64 should yield 51 and the LLVM intrinsic (at least on Win64) 53. I.e., the tests still pass. I'm 99.999% sure about that. ;)

@ibuclaw
Copy link
Member Author

ibuclaw commented Nov 19, 2015

Thanks @kinke - updated.

@dnadlinger
Copy link
Contributor

Auto-merge toggled on

dnadlinger added a commit that referenced this pull request Nov 19, 2015
Adjust expected result of test to match ARM and others
@dnadlinger dnadlinger merged commit c82ddfe into dlang:master Nov 19, 2015
@ibuclaw
Copy link
Member Author

ibuclaw commented Nov 19, 2015

Thanks.

@ibuclaw ibuclaw deleted the arm_exptest branch November 19, 2015 12:51
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.

3 participants