Gcc46 and 128 Bit Floating Point
Thomas D. Dean
tomdean at speakeasy.org
Wed Feb 29 07:52:36 UTC 2012
On 02/28/12 22:03, Bruce Evans wrote:
>
>> #include <quadmath.h>
>> #include <stdio.h>
>> int main() {
>> char buf[128];
>> __float128 x = sqrtq(2.0Q);
>> quadmath_snprintf(buf, sizeof buf, "%.45Qf",x);
>> printf("sin(%s) = ",buf);
>> quadmath_snprintf(buf, sizeof buf, "%.45Qf",sinq(x));
>> printf("%s\n",buf);
>> return 0;
>> }
>>
>> gcc46 math.c -o math /usr/local/lib/gcc46/libquadmath.a /usr/lib/libm.a
> objdump -d math | grep fsqrt
4014fd: d9 fa fsqrt
407bb4: d9 fa fsqrt
Comes from the libs.
Tom Dean
More information about the freebsd-amd64
mailing list