Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pr is a mixed bag of stuff. Its main target is to fix the enormous amount of clippy lints, but also to fix some wrong special case formulas in the Gamma function, as well as introduce the crate
approx
to get a coherent handling of floating-point comparisons. Lastly it bumps dependencies.In short, there are three possible ways to compare floating-point numbers: By absolute difference, by relative difference and by ulps, which are explained in the
approx
doc links. Absolute difference is almost never what one would want, unless some degenerate case occurs like comparing with 0. This pr introduces comparisons by ulps to be the default for inputs, while relative precision would make more sense for outputs when adapting the tests to the new changes and picking a sensible precision to target. This would fix most of the remaining 237 clippy warnings.Two clippy warnings are silenced by default: Excessive precision and too many single-character variable names, because I didn't have access to the papers describing the algorithms and thus couldn't check whether they could have been named more descriptively.