pineappl 1.4.2

PineAPPL is not an extension of APPLgrid
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[expect(
    clippy::cast_possible_truncation,
    reason = "we want that truncation to happen"
)]
#[expect(clippy::cast_sign_loss, reason = "we want to get rid of the sign")]
pub const fn usize_from_f64(x: f64) -> usize {
    x.max(0.0) as usize
}

pub fn f64_from_usize(x: usize) -> f64 {
    f64::from(u32::try_from(x).unwrap())
}