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
externcrate num;use num::rational::Ratio;fnmain(){let big = Ratio::new(128u8,1);let small = big.recip();assert!(big > small);}
fails the assertion. (It's comparing 128 with 1/128.)
This, or something similar, happens for any type that can overflow (I guess one could argue that fixed size types are "unsupported" for rational numbers, and so this overflow leads to unspecified behaviour).