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

NSDecimalNumber.Subtraction2 test fails on OSX #1726

Closed
ms-jihua opened this issue Jan 18, 2017 · 2 comments
Closed

NSDecimalNumber.Subtraction2 test fails on OSX #1726

ms-jihua opened this issue Jan 18, 2017 · 2 comments

Comments

@ms-jihua
Copy link
Contributor

[ RUN ] NSDecimalNumber.Subtraction2
NSDecimalNumberTests.mm:268: Failure
Value of: result
Actual: 974636452495.999872
Expected: [[[NSDecimalNumber alloc] initWithDouble:974636452496] autorelease]
Which is: 974636452496
NSDecimalNumberTests.mm:272: Failure
Value of: result
Actual: 8589803518.000000512
Expected: [[[NSDecimalNumber alloc] initWithDouble:8589803518] autorelease]
Which is: 8589803518
NSDecimalNumberTests.mm:276: Failure
Value of: result
Actual: 8286760429.999998976
Expected: [[[NSDecimalNumber alloc] initWithDouble:8286760430] autorelease]
Which is: 8286760430
[ FAILED ] NSDecimalNumber.Subtraction2 (0 ms)

@msft-Jeyaram
Copy link
Contributor

msft-Jeyaram commented Jan 18, 2017

I'm curious when these started to fail.
The issue here is that in reference platform their subtraction introduces precision anomalies.

e.g 1186805866786 - 212169414290 = 974636452495.999872 vs 974636452496

@msft-Jeyaram
Copy link
Contributor

#1908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants