Skip to content
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 an implemetation of asin #95

Closed
wants to merge 3 commits into from

Conversation

vjackson725
Copy link
Contributor

@vjackson725 vjackson725 commented Jul 14, 2018

Fixes #7

Additionally adds inline functions for macros dealing with low and high words of f64s to the root module.
I'm not sure if you want these, but they seem sufficiently different to get_bits to merit a separate function.

Tell me if I need to change anything!

Fixes rust-lang#7

Additonally adds inline functions for macros dealing with low and high words of f64s to the root module.

Also, the muslc code used a hexdecimal float. This shouldn't be needed because Rust implements
floating point parsing well.
@vjackson725
Copy link
Contributor Author

Whoops, I misinterpreted the hex floating point literal as a subtraction. Fixed now.

Copy link
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

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

Mostly LGTM. Just two nits to fix.

}

#[inline]
pub fn with_set_high_word(f: f64, hi: u32) -> f64 {
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be more rustic to write this as fn set_high_word(f: &mut f64, hi: u32).

Copy link
Member

Choose a reason for hiding this comment

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

Actually, this is fine given how it's actually used

}

#[inline]
pub fn with_set_low_word(f: f64, lo: u32) -> f64 {
Copy link
Member

Choose a reason for hiding this comment

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

above comment applies here as well

This was referenced Jul 14, 2018
bors bot added a commit that referenced this pull request Jul 14, 2018
107: add an implemetation of asin r=japaric a=japaric

Fixes #7

Additonally adds inline functions for macros dealing with low and high words of f64s to the root module.

Also, the muslc code used a hexdecimal float. This shouldn't be needed because Rust implements
floating point parsing well.

---

rebased version of #95
closes #95
Thanks @vjackson725 for the original PR!

Co-authored-by: vjackson725 <vjackson725@users.noreply.github.com>
@bors bors bot closed this in #107 Jul 14, 2018
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.

2 participants