Computes the IEEE-754-2019 minimum of two floats. The result is NaN if either operand is
NaN; otherwise it is the smaller operand, where -0 is considered smaller than +0.
Important: this operation only works correctly if the two inputs are in
canonical form for a common format (see the docstring for UnpackedFloat for details.)
Equations
- Float.Model.UnpackedFloat.notANumber.minimum x✝ = Float.Model.UnpackedFloat.notANumber
- x✝.minimum Float.Model.UnpackedFloat.notANumber = Float.Model.UnpackedFloat.notANumber
- (Float.Model.UnpackedFloat.zero Float.Model.UnpackedFloat.Sign.negative).minimum (Float.Model.UnpackedFloat.zero sign) = Float.Model.UnpackedFloat.zero Float.Model.UnpackedFloat.Sign.negative
- (Float.Model.UnpackedFloat.zero Float.Model.UnpackedFloat.Sign.positive).minimum (Float.Model.UnpackedFloat.zero s) = Float.Model.UnpackedFloat.zero s
- x✝¹.minimum x✝ = if x✝¹.le x✝ = true then x✝¹ else x✝
Instances For
Computes the IEEE-754-2019 minimumNumber of two floats. A NaN operand is ignored in favor of
the other operand, so the result is NaN only if both operands are NaN; otherwise it is the
smaller operand, where -0 is considered smaller than +0.
Important: this operation only works correctly if the two inputs are in
canonical form for a common format (see the docstring for UnpackedFloat for details.)
Equations
- One or more equations did not get rendered due to their size.
- Float.Model.UnpackedFloat.notANumber.minimumNumber x✝ = x✝
- x✝.minimumNumber Float.Model.UnpackedFloat.notANumber = x✝
- (Float.Model.UnpackedFloat.zero Float.Model.UnpackedFloat.Sign.positive).minimumNumber (Float.Model.UnpackedFloat.zero s) = Float.Model.UnpackedFloat.zero s
- x✝¹.minimumNumber x✝ = if x✝¹.le x✝ = true then x✝¹ else x✝
Instances For
Computes the IEEE-754-2019 maximum of two floats. The result is NaN if either operand is
NaN; otherwise it is the larger operand, where -0 is considered smaller than +0.
Important: this operation only works correctly if the two inputs are in
canonical form for a common format (see the docstring for UnpackedFloat for details.)
Equations
- Float.Model.UnpackedFloat.notANumber.maximum x✝ = Float.Model.UnpackedFloat.notANumber
- x✝.maximum Float.Model.UnpackedFloat.notANumber = Float.Model.UnpackedFloat.notANumber
- (Float.Model.UnpackedFloat.zero Float.Model.UnpackedFloat.Sign.positive).maximum (Float.Model.UnpackedFloat.zero sign) = Float.Model.UnpackedFloat.zero Float.Model.UnpackedFloat.Sign.positive
- (Float.Model.UnpackedFloat.zero Float.Model.UnpackedFloat.Sign.negative).maximum (Float.Model.UnpackedFloat.zero s) = Float.Model.UnpackedFloat.zero s
- x✝¹.maximum x✝ = if x✝¹.le x✝ = true then x✝ else x✝¹
Instances For
Computes the IEEE-754-2019 maximumNumber of two floats. A NaN operand is ignored in favor of
the other operand, so the result is NaN only if both operands are NaN; otherwise it is the
larger operand, where -0 is considered smaller than +0.
Important: this operation only works correctly if the two inputs are in
canonical form for a common format (see the docstring for UnpackedFloat for details.)
Equations
- One or more equations did not get rendered due to their size.
- Float.Model.UnpackedFloat.notANumber.maximumNumber x✝ = x✝
- x✝.maximumNumber Float.Model.UnpackedFloat.notANumber = x✝
- (Float.Model.UnpackedFloat.zero Float.Model.UnpackedFloat.Sign.negative).maximumNumber (Float.Model.UnpackedFloat.zero s) = Float.Model.UnpackedFloat.zero s
- x✝¹.maximumNumber x✝ = if x✝¹.le x✝ = true then x✝ else x✝¹