Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Preprocessor Macro and _Quad (float128)

Christian_S_
Beginner
662 Views

Hey,

Is there a preprocessor macro that tells if the argument "/Qoption,cpp,--extended_float_type" was set?

I'm searching for some macro like "__LONG_DOUBLE_SIZE__" in mathimf.h if "/Qlong-double" was set. I want to remove some overloaded methods and some classes if the compiler doesn't support _Quad, or if the flag was not set. So it would also be nice if I could get it gcc compatible.

The long double didn't give exactly the same results as a double, but the number of significant digits didn't seem to increase. It seems the _Quad provides enough precision.

Thanks,
Christian

0 Kudos
2 Replies
Judith_W_Intel
Employee
662 Views

 

It looks like GNU 5.0 and later added these macros:

sptel15-191> gcc -E -dM t.cpp | grep FLOAT128
#define __SIZEOF_FLOAT128__ 16
sptel15-192> gcc -E -dM t.cpp | grep FLOAT80
#define __SIZEOF_FLOAT80__ 16
sptel15-193>

 

Unfortunately our compiler does not yet implement these. i have submitted a bug report (Id #DPD200419869) for us to do the same in GNU >= 5.0 compatibility modes.

Judy

0 Kudos
SergeyKostrov
Valued Contributor II
662 Views
>>...Is there a preprocessor macro that tells if the argument "/Qoption,cpp,--extended_float_type" was set? What about a verification based on sizeof( long double )? If "/Qlong-double is Not used at compile time then sizeof( long double ) should be equal to 8.
0 Kudos
Reply