getSpecialNumberString method

String? getSpecialNumberString()

Returns the string for this value if it has a known representation. (E.g. NaN or 0.0)

@return the string for this special number or null if the number is not a special number

Implementation

String? getSpecialNumberString() {
  if (isZero()) return "0.0";
  if (isNaN()) return "NaN ";
  return null;
}