Repository navigation
Implement all core_float_math functions using core::intrinsics - #668
Open
mikwielgus wants to merge 1 commit into
Open
mikwielgus wants to merge 1 commit into
mikwielgus wants to merge 1 commit into
Conversation
mikwielgus
requested review from
Firestar99,
LegNeato and
eddyb
as code owners
October 10, 2026 19:00
mikwielgus
force-pushed
the
core-float-math
branch
from
October 10, 2026 20:02
c97b527 to
3f6a1a9
Compare
This implements all the methods listed in rust-lang/rust#137578 for `f32` and `f64` in a no-`std` environment using functions from `core::intrinsics` and with the help of the `#[rustc_allow_incoherent_impl]` internal rustc attribute. For test coverage, I have updated the math_ops difftest to use the new functions (for that I used Cursor Auto). `powi` test output again marginally changed, so I blessed it again. These are not all missing functions yet. There is also `log`, `log10`, `exp`, and a few more, which are not part of `core_float_math`. These will probably follow afterwards. Follow-up from c087f99.
mikwielgus
force-pushed
the
core-float-math
branch
from
October 10, 2026 20:03
3f6a1a9 to
aa642e1
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements all the methods listed in
rust-lang/rust#137578
for
f32andf64in a no-stdenvironment using functions fromcore::intrinsicsand with the help of the#[rustc_allow_incoherent_impl]internal rustc attribute.For test coverage, I have updated the math_ops difftest to use the new functions (for that I used Cursor Auto).
powitest output again marginally changed, so I blessed it again.These are not all missing functions yet. There is also
log,log10,exp, and a few more, which are not part ofcore_float_math. These will probably follow afterwards.Follow-up from c087f99.