realmax

Largest finite floating-point number.

Category: Language Fundamentals > Data Types

Syntax

realmax

Largest finite double, about 1.7977e+308.

realmax('single')

Largest finite single, about 3.4028e+38.

Description

Results above realmax overflow to Inf. The value is the end of the representable range, not the largest integer that is stored exactly; for that, see flintmax.

Input arguments

classname
'double' (default) or 'single'.

Output arguments

x
Scalar of the requested class.

Example

realmax
realmax('single')
class(realmax('single'))
realmax * 10
Output
ans = 1.7977e+308
ans = single
   3.4028e+38
ans = 'single'
ans = Inf

See also

realmin flintmax intmax eps Inf