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]>
Sebastian Huber <[email protected]> writes:

> Our failing test is pretty basic, it just checks if fma() and fmaf() 
> library functions are present as per C99. The glibc offers also a simple 
> default implementation, for example:
>
> https://sourceware.org/git/?p=glibc.git;a=blob;f=math/s_fma.c;h=4d73af4f65d511594b2395d032a135721c578484;hb=HEAD

That implementation violates the spec though because it does two
binary operations involving two roundings, so you get a different answer
than you would with a true fma.

Is it better to implement the function incorrectly or better to not
implement it at all? If your hardware doesn't support the operation,
then doing this in software would be a lot slower than adapting your
algorithm to deal with a sequence of binary operations, even though you
will likely need more of them to reach the same accuracy.

-- 
-keith
signature.asc (application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl9PLK4ACgkQ2yIaaQAA
ABFkNg//WnhtIMY6pTG+Lbe2zVIEDDosnl5AbIRQtzOu79N+u6v9/vpvrnwK08ni
/5IJkJ5ck9f+QtOuRwGwvJMxQxijI763Oyy3jgvrCrNs3h8ggZAcZHw4ZMdEKHlj
Efpo5Lpeg96v3qposLKnc1ahJo64lg/aOe27UYemFUFj8NJun80qjsKA3PdGv7Sq
SodtXaarL1MoGxmkGZNg/Y33qGe/hFcguFm0IwQCTqH8H0GHMgKhQHO+ThE3boJG
XxIcsrmOTOf6I+MhNIFoO4EM3VJKyXdG/WXX2EjDSzRskYCrREpgyXE9KnJzRx2N
cXG8eVCElq0AnEGAtXs92IF4fenyUH6VAHHH4ob6lKP33XCtO0IKRYXPRXBAvV1/
wgiRvUxtxxkJiKwlJu6kc4vjSMS70aelqWiBsbLBLcePhiFNHbVhMqy+kwPbkyse
xRYmjMtgByM61D3sJorrYCTVvVxPbBaSsgOQOe2S0yOVAViI2O43mXvsJg9Sk05a
V6Qpeg6GwFhjttRAJWRRKoYPYv9xUuFvDpsnOnf3XMB7ieNa0neY+fMccjFGqBH7
Y84FVhvltxvycJElKvT8sbUm6lakqj8EP52kmcz8k4bIAH/w9S7jq50ARei1Lyo7
j+qTfSsr2UOQWlPVHunmquOMKgLvHor7Vaj245JvsoxmixmvNuU=
=tCb2
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.