Long double

From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search

In C and related programming languages, long double refers to a floating point data type that is often more precise than double precision.

On the x86 architecture, most compilers implement long double as the 80-bit extended precision type supported by that hardware (sometimes stored as 12 or 16 bytes to maintain data structure alignment). An exception is Microsoft Visual C++ for x86, which makes long double a synonym for double.[1] (The Intel C++ compiler on Microsoft Windows supports extended precision, but requires the /Qlong‑double switch to access the hardware's extended precision format.[2])

On some other architectures, such as Macintosh PowerPC, compilers may use long double for a 128-bit quadruple precision type, which may be implemented in hardware or purely in software. Otherwise, long double is simply a synonym for double (double precision). The long double type may or may not conform to the IEEE floating-point standard.

The long double type was standardized in the 1999 revision of the C standard, or C99, which defined its interactions with other floating-point types and extended the standard library to include mathematical functions operating on long double.

See also


  1. MSDN homepage, about Visual C++ compiler [1]
  2. Intel Developer Site [2]
pl:Long double
Personal tools

Served in 0.042 secs.