Skip to content

Implement all core_float_math functions using core::intrinsics - #668

Open
mikwielgus wants to merge 1 commit into
Rust-GPU:mainfrom
mikwielgus:core-float-math
Open

mikwielgus wants to merge 1 commit into
Rust-GPU:mainfrom
mikwielgus:core-float-math

Conversation

@mikwielgus

Copy link
Copy Markdown
Contributor

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.

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.

This branch has not been deployed

No deployments
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.

1 participant