Click or drag to resize

RoundingSplitIntoDecimalMantissaAndExponent Method

Decomposes a double-precision floating-point number into its decimal mantissa and exponent.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public static (double mantissa, int exponent) SplitIntoDecimalMantissaAndExponent(
	double x
)

Parameters

x  Double
The number to decompose. Must be a finite value or zero.

Return Value

ValueTupleDouble, Int32
A tuple containing the decimal mantissa and exponent. The mantissa is a double-precision value in the range -10 < mantissa < 10, and the exponent is an integer representing the power of 10 such that x == mantissa * 10^exponent approximates the input value.
Remarks
If the input value is NaN, PositiveInfinity, NegativeInfinity, or zero, the method returns the input value as the mantissa and 0 as the exponent.
See Also