Displaying 1 result from an estimated 1 matches for "quadmath_snprintf".
2016 Dec 12
1
Problem about 128bit floating-point operations in x86 machines
...ever, I could not get the correct result of 128bit floating-point
operations using Clang.
For example, C source code that included operations of 128bit
floating-point is as follows:
#include <stdio.h>
#include <quadmath.h>
int main() {
__float128 a = 3.14;
char buf[128];
quadmath_snprintf(buf, sizeof(buf), "%QE", -a);
printf("%s\n", buf);
quadmath_snprintf(buf, sizeof(buf), "%QE", a * 5.0);
printf("%s\n", buf);
quadmath_snprintf(buf, sizeof(buf), "%QE", a + 5.0);
printf("%s\n", buf);
return 0;
}
A...