Expand description

Implementations of PartialOrdAbs (a trait for comparing the absolute values of numbers by order) for Integers and primitive floats.

§partial_cmp_abs

use malachite_base::num::basic::floats::PrimitiveFloat;
use malachite_base::num::basic::traits::NegativeInfinity;
use malachite_base::num::comparison::traits::PartialOrdAbs;
use malachite_nz::integer::Integer;

assert!(Integer::from(-123).gt_abs(&-122.5f32));
assert!(Integer::from(123).lt_abs(&f32::NEGATIVE_INFINITY));

assert!((-122.5f32).lt_abs(&Integer::from(-123)));
assert!(f32::NEGATIVE_INFINITY.gt_abs(&Integer::from(123)));