-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add tau to the f64 and f32 constants. #1486
Comments
|
Tau was proposed (and not landed) in rust-lang/rust#15248.
(Tau is 2 pi, not 2/pi.) |
FWIW, TC39 rejected a proposal to add https://esdiscuss.org/topic/math-tau |
👎 Rust is supposed to be a practical -- not esoteric -- language. If I have to be a mathematician (or resort to using a search engine) to know what you mean by "tau" and "phi", it's probably not appropriate for Rust. |
I'd +1 this. I get the comments above, but what does it hurt including a few "common" math constants?! Does anyone seriously subtract points from a PL for having too many math constants? The argument about it not being known is silly IMO because the samw could be said about literally anything in std which isn't familiar to the programmer. They'll either gloss over it or if interested do some quick googling. ...full disclosure I've got a project where I could use this 😉 |
Seems to me that the main sources of friction for implementing something like
There's also the "too many constants" argument, but compared to the size of the standard library, a few more constants is barely anything. Either way, there's clearly a desire from people to include Regarding |
I don't understand why having a lot of constants would be a problem. It's not like anyone would have to maintain them. We also don't have a disk space shortage. (apologies to people still using floppy disks) |
|
I think that's fair. Let's stick to discussing |
Tau is pretty niche, it doesn't even have its own Wikipedia article. https://en.wikipedia.org/wiki/Turn_%28geometry%29#Tau_proposals |
@x13machine Oh, please no. |
I wanted to point out that we’re arguing about the wrong thing and what this whole discussion should’ve been about all along is addition of constant That being said, |
I really hope we get a WRT |
π or 2π is not exactly going to go away any time soon. A sensible proposal would be to add either just |
FWIW, Python recently added |
Adding |
Happy Pi Day! ;) |
|
Closed the rfc instead of the issue 😂 |
Seems like it's gotten quite popular in Python since then: https://github.com/search?l=Python&q=%22math.tau%22&type=Code |
This issue has been open for almost four years now. What needs to happen to move it forward? Does the library team have to discuss this? Does it need more motivation or support first, and if so, in what form? Something else? |
This seems like a minor thing to the point where you could probably just send a PR and the libs team then decided whether to merge it or not. |
Okay, sent rust-lang/rust#66769. |
Maybe even phi. I dunno
The text was updated successfully, but these errors were encountered: