Following code
#include <iostream> #include <cmath> int main(void) { long double y = 2.0L; std::cout << sizeof(y) << std::endl; long double q = sqrt(y); std::cout << q << std::endl; return 0; }
produced 16 1.41421 output, so good
Drop the preprocessor (option -E) and find out that the internal but different from the double sqrt () function was called
using ::sqrt; inline constexpr float sqrt(float __x) { return __builtin_sqrtf(__x); } inline constexpr long double sqrt(long double __x) { return __builtin_sqrtl(__x); }
Same for log (), sin (), you name it
So, I believe that MinGW supports a long double format in arithmetic as well as in math.functions, and this support is built in, not libquadmath based
source share