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

fix unsafeCompare #336

Merged
merged 2 commits into from
Nov 19, 2018
Merged

fix unsafeCompare #336

merged 2 commits into from
Nov 19, 2018

Conversation

MaxGraey
Copy link
Member

Fix #335

Note: Some previous tests broken.

@dcodeIO
Copy link
Member

dcodeIO commented Nov 19, 2018

Ouch

@dcodeIO
Copy link
Member

dcodeIO commented Nov 19, 2018

Are you going to look into the now failing tests as well?

@MaxGraey
Copy link
Member Author

MaxGraey commented Nov 19, 2018

For sure, I will revisit this failures, but later (in separate PRs). I think for now we need fix this string issue asap

@@ -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");
Copy link
Member

@dcodeIO dcodeIO Nov 19, 2018

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

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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evaluates to -21098088986959633.0

@@ -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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evaluates to -0.0000010471975511965977

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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evaluates to 0.30000000000000007

@@ -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");
Copy link
Member

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

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");
Copy link
Member

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

@dcodeIO dcodeIO merged commit 6393921 into AssemblyScript:master Nov 19, 2018
@MaxGraey MaxGraey deleted the fix-string branch November 19, 2018 11:24
@dcodeIO dcodeIO mentioned this pull request Nov 19, 2018
willemneal pushed a commit to willemneal/assemblyscript that referenced this pull request Dec 26, 2018
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