FloatingPoint.nan constructor

FloatingPoint.nan({
  1. required int exponentWidth,
  2. required int mantissaWidth,
  3. bool explicitJBit = false,
  4. bool subNormalAsZero = false,
})

Construct a FloatingPoint that represents NaN.

Implementation

factory FloatingPoint.nan(
    {required int exponentWidth,
    required int mantissaWidth,
    bool explicitJBit = false,
    bool subNormalAsZero = false}) {
  final signLogic = Const(0);
  final exponent = Const(1, width: exponentWidth, fill: true);
  final mantissa = Const(1, width: mantissaWidth);
  return FloatingPoint._(
      signLogic, exponent, mantissa, explicitJBit, subNormalAsZero);
}