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 EqFloat to actually work correctly #1370

Merged
merged 1 commit into from
May 30, 2017

Conversation

fingolfin
Copy link
Member

This always returned false for machine floats in the past, due to a missing argument.

@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label May 30, 2017
Copy link
Contributor

@ChrisJefferson ChrisJefferson left a comment

Choose a reason for hiding this comment

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

Apart from a random extra semi-colon, this is obviously correct.

@@ -145,6 +145,10 @@ gap> -MakeFloat(1.0, infinity) = neginf;
true
gap> MakeFloat(1.0, -infinity) = neginf;
true
gap> EqFloat(1.0, 1.1);
false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Random extra semicolon here

@codecov
Copy link

codecov bot commented May 30, 2017

Codecov Report

Merging #1370 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1370      +/-   ##
==========================================
- Coverage   61.78%   61.77%   -0.01%     
==========================================
  Files        1034     1034              
  Lines      356652   356551     -101     
  Branches    14284    14250      -34     
==========================================
- Hits       220345   220253      -92     
- Misses     132654   132657       +3     
+ Partials     3653     3641      -12
Impacted Files Coverage Δ
src/macfloat.c 77.77% <ø> (+1.38%) ⬆️
lib/files.gi 36.47% <0%> (-17.63%) ⬇️
lib/files.gd 56.98% <0%> (-5.38%) ⬇️
src/system.c 51.03% <0%> (-3.74%) ⬇️
src/objects.h 68.42% <0%> (-2.42%) ⬇️
hpcgap/pkg/gapdoc/PackageInfo.g 33.33% <0%> (-1.29%) ⬇️
lib/pager.gi 7.27% <0%> (-0.61%) ⬇️
src/hpc/traverse.c 79.45% <0%> (-0.39%) ⬇️
lib/init.g 45.38% <0%> (-0.28%) ⬇️
src/hpc/threadapi.c 30.85% <0%> (-0.2%) ⬇️
... and 9 more

@codecov
Copy link

codecov bot commented May 30, 2017

Codecov Report

Merging #1370 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1370   +/-   ##
=======================================
  Coverage   61.78%   61.78%           
=======================================
  Files        1034     1034           
  Lines      356652   356652           
  Branches    14284    14283    -1     
=======================================
  Hits       220345   220345           
  Misses     132654   132654           
  Partials     3653     3653
Impacted Files Coverage Δ
src/macfloat.c 77.77% <ø> (+1.38%) ⬆️
src/vars.h 92% <0%> (-4%) ⬇️
src/system.c 54.08% <0%> (-0.69%) ⬇️
src/hpc/threadapi.c 30.65% <0%> (-0.4%) ⬇️
src/funcs.c 64.2% <0%> (+0.27%) ⬆️
src/objset.c 39.88% <0%> (+1.12%) ⬆️
src/hpc/tls.h 67.5% <0%> (+2.5%) ⬆️

@laurentbartholdi
Copy link
Contributor

All OK, Thanks!
Can you add a few extra cases to testall? The point about EqFloat is that NaN != NaN, so
gap> EqFloat(0.0/0.0,0.0/0.0);
false
gap> EqFloat(0.0,0.0/0.0);
false

@fingolfin
Copy link
Member Author

@laurentbartholdi good point, done!

@fingolfin fingolfin requested a review from markuspf May 30, 2017 15:54
@markuspf markuspf merged commit 2878546 into gap-system:master May 30, 2017
@fingolfin fingolfin deleted the mh/fix-EqFloat branch May 31, 2017 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants