MATLAB Function Reference |
Largest positive floating-point number
Syntax
Description
returns the largest floating-point number representable on your computer. Anything larger overflows. n = realmax
realmax('double')
is the same as realmax
with no arguments.
realmax('single')
is the largest single precision floating point number representable on your computer. Anything larger overflows to single(Inf)
.
Examples
realmax
is one bit less than 2
1024 or about 1.7977e+308
.
Algorithm
The realmax
function is equivalent to pow2(2-eps,maxexp)
, where maxexp
is the largest possible floating-point exponent.
Execute type
realmax
to see maxexp
for various computers.
See Also
reallog | realmin |
© 1994-2005 The MathWorks, Inc.