This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: fma functions


OK:  I will leave them broken and note that they are broken in the
to-be-added documentation.
 
I will put in a should-work-most-of-the-time fix for fmaf().  That is, 
for the float version forcing evaluation in double will likely make it
work on most platforms--those in which double is enough longer than
float
to make it work:
 
-return (x * y) + z;
+return (float)(((double) x * (double) y) + (double) z);
 
Unfortunately, since long double is not presently used at all, I won't
at this time apply the same "trick" to fma().  (It will be easy to do
later when long double is added.)  The bad part is that it will not help
on all platforms.
 
Craig
 
-----------------------------------------------------------------------
> Corinna Vinschen wrote:
>
> Better document it.
>
Jeff Johnston wrote:
Agreed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]