Skip to content

Add some docs to nums. #10435

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

Merged
merged 4 commits into from
Nov 12, 2013
Merged

Add some docs to nums. #10435

merged 4 commits into from
Nov 12, 2013

Conversation

jayanderson
Copy link
Contributor

This fills in some missing docs in the nums package. Let me know if this is on the right track for what's wanted for docs. I can probably fill in more in the future. Thanks.

(As a side note the precedence of the unary negative operator '-' tripped me up for a bit. Essentially I would expect -25.0f32.sqrt() to result in NaN instead of -5.0.)

/// Hyperbolic sine function.
#[inline(always)] pub fn sinh<T: Hyperbolic>(value: T) -> T { value.sinh() }
/// Hyperbolic cosine function.
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch.

@jayanderson
Copy link
Contributor Author

Thanks for the comment. I switched it to use f32::consts::PI.

bors added a commit that referenced this pull request Nov 12, 2013
This fills in some missing docs in the nums package. Let me know if this is on the right track for what's wanted for docs. I can probably fill in more in the future. Thanks.

(As a side note the precedence of the unary negative operator '-' tripped me up for a bit. Essentially I would expect `-25.0f32.sqrt()` to result in NaN instead of `-5.0`.)
@bors bors closed this Nov 12, 2013
@bors bors merged commit 8a4be80 into rust-lang:master Nov 12, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 6, 2023
…llogiq

Fix `nonminimal_bool` `#[allow]` attributes.

Closes rust-lang#10435
changelog: [`nonminimal_bool`]: Fix false-positive where the lint ignore `#[allow]` attributes.

r? `@llogiq`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants