Email List: Xaustin-review-lX
[All Lists]

Re: Defect in XBD math.h

To: "yyyyyyyyyyyyyyy@xxxxxxxxxxxxx" <yyyyyyyyyyyyyyy@xxxxxxxxxxxxx>
Subject: Re: Defect in XBD math.h
From: "Fred J. Tydeman" <yyyyyyy@xxxxxxxxx>
Date: Mon, 21 Apr 03 12:01:52 -0700
Priority: Normal
On Tue, 15 Apr 2003 18:48:32 +0100 (BST), yyyyyyy@xxxxxxx wrote:

>Action:
>
>To clarify the intent change the lines 9399 to 9406 to:
>
>        The following optional macros indicate whether the fma() 
>        family of functions are fast compared with direct code:
>
>              FP_FAST_FMA
>              FP_FAST_FMAF
>              FP_FAST_FMAL
>
>        If defined, the FP_FAST_FMA macro shall indicate that 
>        the fma() function generally executes about as fast as, or
>        faster than, a multiply and an add of double operands. If 
>        undefined it is unspecified what the speed of execution is.
>        The other macros have the equivalent meaning for the float 
>        and long double versions.

I asked the WG14 committee members for their opinion on this matter.
Of the few responses I got, we are split.  Some say that FP_FAST_FMA*
not being defined implies fma() is slow as compared to x*y+z, while
others say that no conclusion can be drawn.

But, of those that offered an opinion, we all appear to agree that a 
portable conformance test of 'slow' or 'fast' is not possible.  So, 
even if we agreed that we meant 'slow', it would not be testable for 
conformance.

So, adding (as suggested above) "If undefined, it is unspecified what 
the relative speed of execution is." appears to be the thing to do.

---
Fred J. Tydeman        Tydeman Consulting
yyyyyyy@xxxxxxxxx      Programming, testing, numerics
+1 (775) 287-5904      Vice-chair of J11 (ANSI "C")
Sample C99+FPCE tests: ftp://jump.net/pub/tybor/
Savers sleep well, investors eat well, spenders work forever.

<Prev in Thread] Current Thread [Next in Thread>