Re: [PATCH 0/3] ARM with only 32-bit floats do not have fast 64-bit FMA
Keith Packard via Newlib <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Joseph Myers <[email protected]> writes: > But note that newlib/libm/common/s_fma.c doesn't actually do anything > useful; it's not a fused operation. Implementing correct fma in software > is highly nontrivial, especially when you want to handle exceptions and > rounding modes correctly (including machine-specific differences in > whether tininess is detected before or after rounding). Should we just stop providing the generic fma/fmaf implementations? That seems like a good idea to me as it will prevent applications from getting the wrong answer. The fmaf one does offer increased precision by doing the operation in double instead of float, which is 'different' from doing it in float, but it still gets a different answer from 'a * b + c'. It also gets the wrong exception status. -- -keith
signature.asc
(application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl9O0+AACgkQ2yIaaQAA ABFKvw/9GHHq2CqhiTvm1++RiGWfqTaHmMseZYF2LnG/DHSMVpJzCrgHnPVv2tYh Nw1MKzJ2lrO0YqOBMtoy9q/VtpwkNgOhjwDcPoZj3Q3FArC6ML01FSRJet1suvLf yTgxozSppalZLbfqSHqDlrl5iprevEafGQyQrEP8NYya8TZ6CYS6KIT26Xdk5D5A HG+IZcXDKPJPSqtoXYsK7cs0/vJbu2BTJ30Ihjwkgx6HuPi1/fk1A7NwddylJ1/f exiRHg04pYpq9Jcjgroy4MVJKBVCEc7jcjB9yRsfCTwJ1k2sSClH4FcF4wg2ZTQS lGrsSmqb814wfzrNckSD+pY3UXIXujyh3CqrwdOHzmSja/Uq1oHaUUg8+FPCahj3 Fy5ZKnKPLpTN2Atwjk7dVtlVDhYIZf6kKjHc7N5MEHpxqQXYeU3hTWMXgTwKjWKb XlbQDWUXQQewAGNuUMWnOZsm3b9H7Q7D9laCPHmkMtUetHO0TdaE94U8yzBdda7b rU+oFO0cgkHVwVbFR2+J/w99XuQdeQL/sQP3aOp8oBff+Tmz3RECBKG45QA+03MK VNZ9QxiWC29jRIxdNnf3eKgNFrlTy1d3CkoDodji5ZG8qG7wjVKTAcHgZ+eqTDol CZqHMHFAifTK+QVBoyYtSRB8b+wI56zL9prGtLqtOJeuFja74Ls= =5Q4Y -----END PGP SIGNATURE-----