operator == method
- Object other
override
Return the bias of this FP format
Implementation
// int bias() => FloatingPointValue.computeBias(exponent.width);
@override
bool operator ==(Object other) {
if (other is! FloatingPointValue) {
return false;
}
if ((exponent.width != other.exponent.width) |
(mantissa.width != other.mantissa.width)) {
return false;
}
// IEEE 754: -0 an +0 are considered equal
if ((exponent.isZero && mantissa.isZero) &&
(other.exponent.isZero && other.mantissa.isZero)) {
return true;
}
return (sign == other.sign) &
(exponent == other.exponent) &
(mantissa == other.mantissa);
}