-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Tracking Issue for more_float_constants
#103883
Comments
On constants defined like:
Clippy raises a "float has excessive precision" using this lint: https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision |
The lint also triggers for like every other constant in the |
As for the question of additional constants: SQRT_5, which is an element in the proposed PHI and also used for various geometric and trigonometric calculations. PHI probably covers the most common usage of SQRT_5, but it wouldn't hurt to include it as it is relatively common (more so than EGAMMA I would argue). Just my 2 cents. |
… of an existing one) (#9181) Adding more float constants for when rust-lang/rust#103883 is accepted and merged. And fixing a small conflation in the description of the Euler number. Please take a look and let me know if I've missed or screwed up anything.
Add additional float constants Initial implementation of this ACP: rust-lang/libs-team#119. [Accepted] Tracking issue: rust-lang#103883 The values for the constants are copied from the [`libstdc++` source code](https://github.com/gcc-mirror/gcc/blob/16e2427f50c208dfe07d07f18009969502c25dc8/libstdc%2B%2B-v3/include/std/numbers#L57-L120).
When this is getting added ? |
FRAC_1_SQRT_2PI should probably be named FRAC_1_SQRT_TAU since the already existing constant for 2pi is named TAU. |
Feature gate:
#![feature(more_float_constants)]
This is a tracking issue for additional constants in the
{f32,f64}::consts
modules.ACP: rust-lang/libs-team#119
Public API
Steps / History
Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: