RealExponent[x]
gives
.
RealExponent[x,b]
gives
.
RealExponent
RealExponent[x]
gives
.
RealExponent[x,b]
gives
.
Details
- If x is an approximate number consistent with zero, then RealExponent[x] gives -Accuracy[x].
- For any approximate number x, RealExponent[x] is equal to Precision[x]-Accuracy[x]. »
- RealExponent automatically threads over lists.
Examples
open all close allBasic Examples (1)
The base 10 exponent for a number
:
x = 123.456;
y = RealExponent[123.456]This is the number
such that
:
{y == Log[10, Abs[x]], 10 ^ y == Abs[x]}y = RealExponent[x, 2]This is the number
such that
:
{y == Log[2, Abs[x]], 2 ^ y == Abs[x]}Scope (8)
The real exponent for an arbitrary-precision number:
x = N[E, 32]RealExponent[x]The result of RealExponent is given as a machine number whatever the precision of
:
MachineNumberQ[%]The real exponent for an exact number:
RealExponent[987654321 / 123456789]The real exponent for an exact numeric quantity:
RealExponent[Pi ^ Pi]RealExponent[0.]This is -Accuracy[x]:
Accuracy[0.]The same is true for arbitrary-precision zeros:
x = 0``47;RealExponent[x]RealExponent[0]The real exponent for different bases:
Table[RealExponent[Pi, b], {b, {2, 3, 5, 7, 10}}]{2, 3, 5, 7, 10} ^ %The base can be any number strictly greater than 1:
RealExponent[Pi, 1. + $MachineEpsilon]The base can be an exact numeric quantity:
RealExponent[Pi, E]RealExponent automatically threads over lists:
RealExponent[Range[20]]RealExponent[Pi, {2, 3, 4, 7, 10}]Applications (2)
Determine quickly if a power will overflow:
RealExponent[Pi] * 500000000This predicts that the power can be represented:
% > RealExponent[$MaxNumber]N[Pi ^ 500000000]RealExponent[Pi] * 5000000000000000% > RealExponent[$MaxNumber]N[Pi ^ 5000000000000000]Determine quickly the largest power tower
that will not overflow for a given number:
n[b_] := Module[{k = 0, x = $MaxNumber}, While[x > 1, x = RealExponent[x, b];k++];k - 1]Apply[Power, ConstantArray[3., n[3.]]]Apply[Power, ConstantArray[3., n[3.] + 1]]Plot[n[p], {p, 2, 10}]Properties & Relations (4)
For any approximate number x, RealExponent[x] is equal to Precision[x]-Accuracy[x]:
x = RandomReal[] * 10 ^ RandomInteger[{-300, 300}]RealExponent[x] == Precision[x] - Accuracy[x]Also true for arbitrary-precision numbers:
x = RandomReal[WorkingPrecision -> 47] * 10 ^ RandomInteger[{-10 ^ 5, 10 ^ 5}]RealExponent[x] == Precision[x] - Accuracy[x]If x is an approximate zero, then RealExponent[x] gives -Accuracy[x]:
x = N[1 + 1 / GoldenRatio - GoldenRatio, 47]PossibleZeroQ[x]RealExponent[x] == -Accuracy[x]This is the same as saying that the identity RealExponent[x] is equal to Precision[x]-Accuracy[x]:
RealExponent[x] == Precision[x] - Accuracy[x]Since precision is zero for approximate zeros:
Precision[x]The real exponent of a product is the sum of the real exponents:
x = RandomReal[WorkingPrecision -> 20] * 10 ^ RandomInteger[{-10 ^ 5, 10 ^ 5}]
y = RandomReal[WorkingPrecision -> 20] * 10 ^ RandomInteger[{-10 ^ 5, 10 ^ 5}]RealExponent[x y] == RealExponent[x] + RealExponent[y]The real exponent of a power is the real exponent of the base times the power:
b = 2.1;p = 1000000000;RealExponent[b] p == RealExponent[b ^ p]See Also
Log10 Log MantissaExponent IntegerExponent Accuracy Precision
Related Guides
History
Text
Wolfram Research (2007), RealExponent, Wolfram Language function, https://reference.wolfram.com/language/ref/RealExponent.html.
CMS
Wolfram Language. 2007. "RealExponent." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RealExponent.html.
APA
Wolfram Language. (2007). RealExponent. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RealExponent.html
BibTeX
@misc{reference.wolfram_2026_realexponent, author="Wolfram Research", title="{RealExponent}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/RealExponent.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_realexponent, organization={Wolfram Research}, title={RealExponent}, year={2007}, url={https://reference.wolfram.com/language/ref/RealExponent.html}, note=[Accessed: 13-June-2026]}