Scientific

constructor(minIntegerDigits: UInt, maxIntegerDigits: UInt = minIntegerDigits, minFractionDigits: UInt, maxFractionDigits: UInt, minExponent: UInt, maxExponentForDecimalNotation: UInt? = null, roundingMode: RoundingMode = RoundingMode.HalfEven)

Parameters

minIntegerDigits

The minimum number of integer digits to show in the mantissa. Defaults to 1U.

maxIntegerDigits

The maximum number of integer digits to show in the mantissa. If this is greater than minIntegerDigits, it forces the exponent to be a multiple of maximum number of integer values. Otherwise the minimum number of integer digits is achieved by adjusting the exponent. Defaults to minIntegerDigits

minFractionDigits

The minimum number of decimal digits to show in the mantissa. Defaults to 1U.

maxFractionDigits

The maximum number of decimal digits to show in the mantissa. Defaults to 16U.

minExponent

The minimum number of digits to show in the exponent. Defaults to 1U. Values below 1U are treated as 1U (a scientific format always shows at least one exponent digit).

maxExponentForDecimalNotation

When set, a value whose base-10 exponent magnitude is at most this is rendered in plain decimal notation instead of scientific (e.g. 6U keeps 1E-6 through 1E6 inclusive in plain decimal, using the mantissa's minFractionDigits/maxFractionDigits as its fraction digits). When null (the default) scientific notation is always used.

roundingMode

The RoundingMode to be applied. Defaults to RoundingMode.HalfEven.