mathsignificand Method (Single) |
Gets the significand of the specified floating-point number.
Namespace:
C
Assembly:
C.math (in C.math.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static float significand(
float number
)
Public Shared Function significand (
number As Single
) As Single
public:
static float significand(
float number
)
static member significand :
number : float32 -> float32
Parameters
- number
- Type: SystemSingle
A floating-point number.
Return Value
Type:
SingleThe significand of the specified floating-point
number, or
number if it not normal or subnormal.
Remarks
The significand is a number in the interval [1, 2) so that
number = significand(Single)(number) * 2^logb(Single)(number).
If number is subnormal, it is normalized so that the significand falls in the interval [1, 2).
ExamplesAssert.IsTrue(math.significand(0F) == 0F);
Assert.IsTrue(math.significand(-0F) == -0F);
Assert.IsTrue(math.significand(1F) == 1F);
Assert.IsTrue(math.significand(4F) == 1F);
Assert.IsTrue(math.significand(6F) == 1.5F);
Assert.IsTrue(math.significand(7F) == 1.75F);
Assert.IsTrue(math.significand(8F) == 1F);
Assert.IsTrue(math.significand(math.FLT_DENORM_MIN) == 1F);
Assert.IsTrue(math.significand(0F) = 0F);
Assert.IsTrue(math.significand(-0F) = -0F);
Assert.IsTrue(math.significand(1F) = 1F);
Assert.IsTrue(math.significand(4F) = 1F);
Assert.IsTrue(math.significand(6F) = 1.5F);
Assert.IsTrue(math.significand(7F) = 1.75F);
Assert.IsTrue(math.significand(8F) = 1F);
Assert.IsTrue(math.significand(math.FLT_DENORM_MIN) = 1F);
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also