Sourceware Bugzilla – Attachment 4569 Details for
Bug 3268
fma for all targets without hardware fma instructions is incorrect.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Example demonstrating fma failure on x86_64
fma-test.c (text/plain), 625 bytes, created by
Nick Bowler
on 2010-02-02 21:56:11 UTC
(
hide
)
Description:
Example demonstrating fma failure on x86_64
Filename:
MIME Type:
Creator:
Nick Bowler
Created:
2010-02-02 21:56:11 UTC
Size:
625 bytes
patch
obsolete
>#include <stdio.h> >#include <math.h> > >static double my_fma(double x, double y, double z) >{ > return (long double) x*y + z; >} > >int main(void) >{ > double x = 0x1p+1023, y = 0x1p+1, z = -0x1.fffffffffffffp+1023; > > printf("Computing\n" > " %a * %a + %a\n" > "by double-precision fused muliply-add.\n\n" > "The result should be finite even though %a*%a overflows.\n\n", > x, y, z, x, y); > > printf("unfused (this one should be infinite): %a\n", x*y+z); > printf("GCC builtin: %a\n", __builtin_fma(x, y, z)); > printf("C library: %a\n", (fma)(x, y, z)); > printf("Long double: %a\n", my_fma(x, y, z)); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3268
:
1326
|
1327
|
1348
|
1349
|
1350
|
1511
|
1512
|
1513
|
1514
|
1515
|
1664
|
1665
|
1666
| 4569