Skip to main content

core_math_rs/f16/
utils.rs

1use std::hint::black_box;
2
3pub fn snanf16() -> f16 {
4    // signal invalid and return sNaN
5    //
6    // use black_box to force evaluation at runtime
7    // and ensure equivalent behaviour with C
8    black_box(0.0) / black_box(0.0)
9}