Skip to content

Fix fmod(x, INFINITY) #6414

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

Merged
merged 2 commits into from
Oct 25, 2021
Merged

Fix fmod(x, INFINITY) #6414

merged 2 commits into from
Oct 25, 2021

Conversation

peterschrammel
Copy link
Member

The case where the second argument of fmod is +-inf does not give the correct result with the current implementation in float_utils.rem.
I've added a regression test that does basic checks on the most important cases.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

fmod is notoriously buggy. We are going to fix one case in the
next commit.
The case where the second argument is +-inf was wrongly
implemented by float_utils.rem.
@codecov
Copy link

codecov bot commented Oct 24, 2021

Codecov Report

Merging #6414 (c4deb56) into develop (093a216) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6414   +/-   ##
========================================
  Coverage    75.98%   75.98%           
========================================
  Files         1524     1524           
  Lines       164242   164244    +2     
========================================
+ Hits        124801   124809    +8     
+ Misses       39441    39435    -6     
Impacted Files Coverage Δ
src/solvers/floatbv/float_utils.cpp 95.71% <100.00%> (+0.01%) ⬆️
src/ansi-c/c_typecheck_expr.cpp 74.72% <0.00%> (+0.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7eff1e...c4deb56. Read the comment docs.

@kroening kroening merged commit 62dc70a into diffblue:develop Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants