-
Notifications
You must be signed in to change notification settings - Fork 255
implement libm::exp and its variants for i586 with inline assembly #1023
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
Conversation
libm/src/math/arch/i586.rs
Outdated
|
|
||
| macro_rules! x87exp { | ||
| ($float_ty:ident, $word_size:literal, $fn_name:ident, $load_op:literal) => { | ||
| pub fn $fn_name(mut x: $float_ty) -> $float_ty { unsafe { | ||
| core::arch::asm!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mentioned async and at #1021 that the results can be platform-dependent. I think this is worth putting in a comment in case anybody runs into it. Hopefully nobody ever will, but a hint would be nice if it shows up.
Otherwise, LGTM.
|
That’s more detail than I was expecting, looks great :)
|
… fix precision issues
Co-authored-by: Juho Kahala <57393910+quaternic@users.noreply.github.com>
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Resolve the severe imprecision (~2%) that is due to inconsistent rounding.
Closes: #1021