Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Make extensive tests exhaustive if there are enough iterations available #416

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

beetrees
Copy link
Contributor

@beetrees beetrees commented Jan 7, 2025

Currently the extensive tests will only check values within a functions domain (or that are non-NaN for multi-argument functions), even when there are enough iterations available to check every single possible value. This PR fixes that. There was also a bug where trying to exhaustively test fma/fmaf on 32-bit targets would immediately panic as the test case count doesn't fit in a 32-bit usize: this PR changes get_test_cases to use a separate u64 instead of ExactSizeIterator to fix this.

This also fixes #409.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Thanks for all the fixes here, this looks great.

@tgross35 tgross35 merged commit 43d21a5 into rust-lang:master Jan 7, 2025
35 checks passed
@tgross35
Copy link
Contributor

tgross35 commented Jan 7, 2025

Just as a note I'm currently planning to rework some of this so that the domain_logspace and extensive generators can use the same code, but that is pretty early on still #415.

Also if you're currently running this locally you need to skip the jn* and yn* tests, MPFR often throws an allocation failure that I haven't yet looked into.

@beetrees beetrees deleted the exhaustive-if-possible branch January 9, 2025 09:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extensive tests for integers need to use intervals
2 participants