Important: The information in this document is obsolete and should not be used for new development.
Converting Between Floating-Point Formats
In the C programming language, conversions between floating-point formats are automatic when you assign a floating-point number of one type to a variable of another type.
float f = 0.0f; /* single format */ double d = 1.1; long double ld; /* double-double format */ f = d; /* double 1.1 converted to single format */ ld = f; /* single 1.1 converted to double-double format */ d = ld; /* double-double 1.1 converted to double format */