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

Missing f32::ceil on #![no_std] #99708

Closed
ivan770 opened this issue Jul 25, 2022 · 1 comment
Closed

Missing f32::ceil on #![no_std] #99708

ivan770 opened this issue Jul 25, 2022 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@ivan770
Copy link

ivan770 commented Jul 25, 2022

Hi! Is there a reason for f32::ceil to be missing in core? Its intrinsic counterpart seems to work just fine:

#![no_std]
#![feature(core_intrinsics)]

use core::intrinsics::ceilf32;

pub fn hello() {
    let abc = 2.5f32;

    // Doesn't work.
    // let val = abc.ceil();

    // Works.
    let val = unsafe { ceilf32(abc) };

    assert_eq!(val, 3f32);
}
@ivan770 ivan770 added the C-bug Category: This is a bug. label Jul 25, 2022
@ivan770
Copy link
Author

ivan770 commented Jul 25, 2022

Closing, found #27823

@ivan770 ivan770 closed this as completed Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant