Name:
exponent
returns the scaled binary exponent of a number.
Usage:
exponent
(
x
) :
constant
->
integer
Parameters:
x
is a dyadic number.
Description:
exponent
(x) is by definition 0 if x is one of 0, NaN, or Inf.
If
x
is not zero, it can be uniquely written as x = m*2^e where m is an odd integer and e is an integer.
exponent
(x) returns e.
Example 1:
> a=round(Pi,20,RN);
> e=exponent(a);
> e;
-17
> m=mantissa(a);
> a-m*2^e;
0
See also:
mantissa
,
precision
Go back to the list of commands