gcc supports an extended precison "long double" type typically 10 or 12 bytes

but Windows XP always maps the "long double" to the standard double (typically 8 bytes)

MinGW on windows XP thinks it has a 12-byte "long double" but in fact it only has the 8 byte support on Windows XP. any long double math only has 8 byte precision and must be recast and printed with the standard double floating point format specifier (%f)

does anyone know if Windows Vista or Win 7 has extended precision for long doubles, or does it merely map them to the standard double?

I didn't make a C program for this but what i did is .. i just entered numbers in the calculator of vista and the max input it can take is:
0xFFFFFFFFFFFFFFFF = 16 Fs = 16*4 =64 bits = 8 bytes of data

But according to my experience the programs i have made in C i dont think it will support more than 8 bytes of data.

32-bit vc++ 2008 express on 64-bit Win7 doesn't have that problem.

#include <iostream>
#include <limits>
#include <string>
#include <iomanip>
using namespace std;

int main()
   // use textual representation for bool
   cout << boolalpha;

   // print maximum of floating-point types
   cout << "max(float):       "
        << numeric_limits<float>::max() << endl;
   cout << "max(double):      "
        << numeric_limits<double>::max() << endl;
   cout << "max(long double): " << fixed 
        << numeric_limits<long double>::max() << endl;
   cout << endl;



max(float): 3.40282e+038
max(double): 1.79769e+308
max(long double): 17976931348623161000000000000000000000000000000000000000000000

Press any key to continue . . .

Edited 6 Years Ago by Ancient Dragon: n/a

This article has been dead for over six months. Start a new discussion instead.