Expand description

Comparison of Integers and primitive floats.

partial_cmp

extern crate malachite_base;

use malachite_base::num::basic::floats::PrimitiveFloat;
use malachite_nz::integer::Integer;

assert!(Integer::from(-123) < -122.5f32);
assert!(Integer::from(123) < f32::POSITIVE_INFINITY);
assert!(-122.5f32 > Integer::from(-123));
assert!(f32::POSITIVE_INFINITY > Integer::from(123));