You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fraction::floor rounds negative Fractions upwards (towards zero), and Fraction::ceil rounds negative fractions towards negative infinity. Since the docs says that floor should "Returns the largest integer less than or equal to the value" I'm assuming this is unintentional
let f = Fraction::new_neg(1u8,2u8);println!("{} {}", f.floor(), f.ceil());
This example prints -0 -1 when the output should be -1 -0
The text was updated successfully, but these errors were encountered:
Fraction::floor
rounds negative Fractions upwards (towards zero), andFraction::ceil
rounds negative fractions towards negative infinity. Since the docs says thatfloor
should "Returns the largest integer less than or equal to the value" I'm assuming this is unintentionalThis example prints
-0 -1
when the output should be-1 -0
The text was updated successfully, but these errors were encountered: