Commits


Antoine Pitrou authored and GitHub committed 0d8c8d9581c
GH-44915: [C++] Add WithinUlp testing functions (#44906) ### Rationale for this change When testing math-related functions, we might want to check that some results are very close to an expected value, but not necessarily exactly equal. ### What changes are included in this PR? Add functions that test whether two floating-point values are within N ulps. ("ulp" stands for "unit in the last place": https://en.wikipedia.org/wiki/Unit_in_the_last_place) ### Are these changes tested? Yes. ### Are there any user-facing changes? Potentially more useful error messages. * GitHub Issue: #44915 Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>