![first 32 bit borland c compiler first 32 bit borland c compiler](http://2.bp.blogspot.com/-bowp0UAoiwE/UAub7rrMx0I/AAAAAAAAF18/9rZuIXtX1cI/s1600/Borland_C+++2.jpg)
If you want to write portable code, don't depend on its representation - keep it away from interfaces and binary I/O. The only thing you can be sure about it, is that it is at least equivalent to double. So the bottom line is, implementation of long double varies across platforms.
First 32 bit borland c compiler mac os#
A 32/64/16-bit Pascal compiler for Win32/64/CE, Linux, Mac OS X/iOS, Android, FreeBSD, OS/2, Game Boy Advance, Nintendo NDS and DOS semantically compatible with Delphi, Borland Pascal and Mac Pascal (partially) with extra features, e.g. Even on x87 some compilers have sizeof(long double) = 10, while others pad it for alignment, so that it is 12 or 16 (of 8 if long double is double). Free 32/64/16-bit multi-platform Pascal and Object Pascal compiler. Some other architectures have 128-bit quad-precision types. And even if it does (like x87), some compilers still make long double equivalent to double (like M$VC), while others expose the extended precision type as long double (like Borland and GCC).Įven if the compiler exposes the extended precision type, there is still no standard on what exactly "extended-precision" means. Which means that if an architecture does not support anything more, long double type is identical to double. The standard requires that long double has at least as much range and precision as double.
![first 32 bit borland c compiler first 32 bit borland c compiler](https://www.codeproject.com/KB/database/bdedatabase/BdeDatabase.jpg)
Things are slightly more tricky with long double, as not many architectures support floating-point types of higher-than-double precision. Which they are on any architecture that supports them in hardware (which means practically everywhere).
![first 32 bit borland c compiler first 32 bit borland c compiler](https://4.bp.blogspot.com/-d9ElD3IqlJg/WczepFY8w3I/AAAAAAAAD2Y/z9mS9yR2cCgyKl5ZsEqotf_q1hhiZzOewCLcBGAs/s1600/borlan2.png)
While the C standard does not require this, it STRONGLY ADVISES that float and double are standard IEEE 754 single and double precision floating-point types, respectively.