Skip to content
Snippets Groups Projects

add ctype dependent tolerance to grid tests

All threads resolved!

Summary

Change the fixed hard coded tolerances in grid tests with something related to numeric_limits<ctype>::epsilon().

Details

Many tolerances in the grid tests are hard coded to something like 1.e-8. Those tests will fail if ctype=float. Thus, all those comparisons are changed to either sqrt(numeric_limits<ctype>::epsilon()) or numeric_limits<ctype>::epsilon(), depending on the previous value.

Discussion

The tolerance values seem quite arbitrary. Sometimes it is compared against 1.e-8, sometimes 1.e-7 or 1.e-6 or 1e3*numeric_limits<ctype>::epsilon(). Maybe it would be cleaner to use the FloatCmp utilities and clearly define what's the expected accuracy.

Edited by Simon Praetorius

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Thanks, Simon! The nit-picker in me opines that the commit should be split in two: one for the tolerances and one for the ADL stuff. But that is not a blocking objection.

  • added 1 commit

    • 39501e40 - add ctype dependent tolerance to grid tests

    Compare with previous version

  • Simon Praetorius changed the description

    changed the description

  • Simon Praetorius resolved all threads

    resolved all threads

  • added 1 commit

    • 2b557f8a - add ctype dependent tolerance to grid tests

    Compare with previous version

  • So, the ADL stuff is gone. This MR now only includes type dependent tolerances.

  • merged

  • Oliver Sander mentioned in commit ff36065a

    mentioned in commit ff36065a

  • Please register or sign in to reply
    Loading