Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Issue 2247553002: Fix a test to not expect NaNs to be bitwise identical. (Closed)

Created:
4 years, 4 months ago by Florian Schneider
Modified:
4 years, 4 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix a test to not expect NaNs to be bitwise identical. Different implementations may use different bit-patterns for NaN. e.g. NAN from math.h can be different from 0.0/0.0 (which is used in double.dart) We should assert that NaNs are bitwise identical in general. BUG=#26887 R=lrn@google.com Committed: https://github.com/dart-lang/sdk/commit/2d5e87482c5e680978b7b58b3f2f6450764dd744

Patch Set 1 #

Total comments: 3

Patch Set 2 : can't use == with NaN #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -3 lines) Patch
M tests/lib/lib.status View 1 chunk +0 lines, -1 line 0 comments Download
M tests/lib/math/double_pow_test.dart View 1 3 chunks +14 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
Florian Schneider
4 years, 4 months ago (2016-08-12 23:31:07 UTC) #3
Lasse Reichstein Nielsen
https://codereview.chromium.org/2247553002/diff/1/tests/lib/math/double_pow_test.dart File tests/lib/math/double_pow_test.dart (right): https://codereview.chromium.org/2247553002/diff/1/tests/lib/math/double_pow_test.dart#newcode121 tests/lib/math/double_pow_test.dart:121: Expect.equals(pow(0.0, d), pow(-0.0, d)); I'm not sure that's what ...
4 years, 4 months ago (2016-08-12 23:52:38 UTC) #4
Florian Schneider
https://codereview.chromium.org/2247553002/diff/1/tests/lib/math/double_pow_test.dart File tests/lib/math/double_pow_test.dart (right): https://codereview.chromium.org/2247553002/diff/1/tests/lib/math/double_pow_test.dart#newcode121 tests/lib/math/double_pow_test.dart:121: Expect.equals(pow(0.0, d), pow(-0.0, d)); On 2016/08/12 23:52:38, Lasse Reichstein ...
4 years, 4 months ago (2016-08-13 00:01:30 UTC) #5
Lasse Reichstein Nielsen
That looks correct. LGTM. I'm still a little sad that we actually generate different NaNs. ...
4 years, 4 months ago (2016-08-13 12:14:59 UTC) #6
Florian Schneider
4 years, 4 months ago (2016-08-16 22:57:51 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
2d5e87482c5e680978b7b58b3f2f6450764dd744 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698