-
Notifications
You must be signed in to change notification settings - Fork 13k
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 doc aliases for trigonometry and other f32,f64 methods. #114971
Conversation
These are common alternate names, usually a less-abbreviated form, for the operation; e.g. `arctan` instead of `atan`. Prompted by <https://users.rust-lang.org/t/64-bit-trigonometry/98599>
(rustbot has picked a reviewer for you, use r? to override) |
Is it possible to add multiple aliases? Could be good to add things like "arctangent" too |
Yes, that's supported (you can see an example in my other PR #114977).
I'm a little skeptical that that will be useful because AFAIK no other programming languages or notations use the unabbreviated names. I don't see a strong reason not to add them either, but they will enlarge the doc search index a bit more. Any third opinions out there? |
From the std dev guide:
I think, as you say, "arctangent" fails that test. At the very least I would expect that people would search for the short form first. And as the docs say, the point of the alias is to answer questions like: "what did Rust call mkdir?". |
@bors r+ rollup |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#114953 (Add myself back to review rotation) - rust-lang#114958 (`ignore-cross-compile` on `optimization-remarks-dir-pgo` test) - rust-lang#114971 (Add doc aliases for trigonometry and other f32,f64 methods.) - rust-lang#114972 (Add a test to check that inline const is in required_consts) - rust-lang#114977 (Add `modulo` and `mod` as doc aliases for `rem_euclid`.) r? `@ghost` `@rustbot` modify labels: rollup
docs: add alias log1p to ln_1p This is what the function is called in several other languages: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p * https://numpy.org/doc/stable/reference/generated/numpy.log1p.html * https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/log1p-log1pf-log1pl2?view=msvc-170 It also confused people at URLO: https://users.rust-lang.org/t/64-bit-trigonometry/98599/27 Similar to: * rust-lang#114971 * rust-lang#114977
These are common alternate names, usually a less-abbreviated form, for the operation; e.g.
arctan
instead ofatan
. Prompted by https://users.rust-lang.org/t/64-bit-trigonometry/98599