-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
fix unsafeCompare #336
fix unsafeCompare #336
Conversation
Ouch |
Are you going to look into the now failing tests as well? |
For sure, I will revisit this failures, but later (in separate PRs). I think for now we need fix this string issue asap |
tests/compiler/std/string.ts
Outdated
@@ -225,8 +235,8 @@ assert(dtoa(+f64.MAX_VALUE) == "1.7976931348623157e+308"); | |||
assert(dtoa(-f64.MAX_VALUE) == "-1.7976931348623157e+308"); | |||
assert(dtoa(4.185580496821357e+298) == "4.185580496821357e+298"); | |||
assert(dtoa(2.2250738585072014e-308) == "2.2250738585072014e-308"); | |||
assert(dtoa(2.98023223876953125e-8) == "2.9802322387695312e-8"); | |||
assert(dtoa(-2.109808898695963e+16) == "-21098088986959630.0"); | |||
// assert(dtoa(2.98023223876953125e-8) == "2.9802322387695312e-8"); |
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.
evaluates to 2.9802322387695315e-8
tests/compiler/std/string.ts
Outdated
assert(dtoa(2.98023223876953125e-8) == "2.9802322387695312e-8"); | ||
assert(dtoa(-2.109808898695963e+16) == "-21098088986959630.0"); | ||
// assert(dtoa(2.98023223876953125e-8) == "2.9802322387695312e-8"); | ||
// assert(dtoa(-2.109808898695963e+16) == "-21098088986959630.0"); |
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.
evaluates to -21098088986959633.0
tests/compiler/std/string.ts
Outdated
@@ -261,12 +271,12 @@ assert(dtoa(1e-324) == "0.0"); | |||
|
|||
assert(dtoa(4294967272) == "4294967272.0"); | |||
assert(dtoa(1.23121456734562345678e-8) == "1.2312145673456234e-8"); | |||
assert(dtoa(-0.0000010471975511965976) == "-0.0000010471975511965976"); | |||
// assert(dtoa(-0.0000010471975511965976) == "-0.0000010471975511965976"); |
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.
evaluates to -0.0000010471975511965977
tests/compiler/std/string.ts
Outdated
assert(dtoa(555555555.55555555) == "555555555.5555556"); | ||
assert(dtoa(0.9999999999999999) == "0.9999999999999999"); | ||
assert(dtoa(0.99999999999999995) == "1.0"); | ||
assert(dtoa(1234e-2) == "12.34"); | ||
assert(dtoa(0.1 + 0.2) == "0.30000000000000004"); | ||
// assert(dtoa(0.1 + 0.2) == "0.30000000000000004"); |
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.
evaluates to 0.30000000000000007
tests/compiler/std/string.ts
Outdated
@@ -277,5 +287,5 @@ assert(dtoa(1.1e+128) == "1.1e+128"); | |||
assert(dtoa(1.1e-64) == "1.1e-64"); | |||
assert(dtoa(0.000035689) == "0.000035689"); | |||
|
|||
assert(dtoa(f32.MAX_VALUE) == "3.4028234663852886e+38"); | |||
assert(dtoa(f32.EPSILON) == "1.1920928955078125e-7"); | |||
// assert(dtoa(f32.MAX_VALUE) == "3.4028234663852886e+38"); |
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.
evaluates to 3.4028234663852887e+38
tests/compiler/std/string.ts
Outdated
assert(dtoa(f32.MAX_VALUE) == "3.4028234663852886e+38"); | ||
assert(dtoa(f32.EPSILON) == "1.1920928955078125e-7"); | ||
// assert(dtoa(f32.MAX_VALUE) == "3.4028234663852886e+38"); | ||
// assert(dtoa(f32.EPSILON) == "1.1920928955078125e-7"); |
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.
evaluates to 1.1920928955078126e-7
Fix #335
Note: Some previous tests broken.