realmin

Smallest normalized floating-point number

Description

example

f = realmin returns the smallest positive normalized floating-point number in IEEE® double precision. This is equal to 2^(-1022).

example

f = realmin(precision) returns the smallest positive normalized floating-point number in IEEE single or double precision. This is equal to realmin for double precision, and to single(2^(-126)) for single precision.

Examples

collapse all

Set the output format to long scientific notation. Return the smallest positive normalized floating-point number in IEEE® double precision.

format long e
f = realmin
f = 
    2.225073858507201e-308

Return the smallest positive normalized floating-point number in IEEE® single precision.

f = realmin('single')
f = single
    1.1755e-38

Check the class of f.

class(f)
ans = 
'single'

Input Arguments

collapse all

Floating-point precision type, specified as 'double' or 'single'.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced before R2006a