Skip to content

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

Closed
Closed
@ivan770

Description

@ivan770

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions