[Cfp-interest 2388] Fwd: Terminology: why "floating multiply-add" instead of "fused multiply-add"?
Jim Thomas
jaswthomas at sbcglobal.net
Thu Mar 3 14:39:24 PST 2022
The following is from a side-discussion about Pavel Morozkin’s suggestion to change the titles of 7.12.13 and F.10.10 from “Floating multiply-add” to “Fused multiply-add”, which will be on the CFP agenda for March.
- Jim Thomas
> Begin forwarded message:
>
> From: Pavel M <pavel.morozkin at gmail.com>
> Subject: Re: Terminology: why "floating multiply-add" instead of "fused multiply-add"?
> Date: March 2, 2022 at 4:19:51 PM PST
> To: Jim Thomas <jaswthomas at sbcglobal.net>
> Cc: "Fred J. Tydeman" <tydeman at tybor.com>, Rajan Bhakta <rbhakta at us.ibm.com>, Jens Gustedt <jens.gustedt at inria.fr>
>
> Jim,
>
> On Tue, 1 Mar 2022 at 19:50, Jim Thomas <jaswthomas at sbcglobal.net <mailto:jaswthomas at sbcglobal.net>> wrote:
>> On Feb 28, 2022, at 10:27 AM, Pavel M <pavel.morozkin at gmail.com <mailto:pavel.morozkin at gmail.com>> wrote:
>>
>> Jim,
>>
>> In FMAD the F stands for "fused". However, we see that fmadXX are in section "Floating multiply-add":
>> <image.png>
>> Here the "f" could easily be misinterpreted as "floating" as opposed to its actual meaning "fused".
>> In my view the section needs to be named "Fused multiply-add".
>
> I believe we basically agree. I’d say that given the subclause title "Floating multiply-add” the “f” would naturally be read as “floating”. However, the description of the function clearly states that the mathematical result of the multiply-add is rounded just once, i.e. the C floating multiply-add is a fused operation. “Fused multiply-add” would be a more specific title for the subclause, would reflect industry terminology, and might reduce mental dissonance.
> Well said. Seems nothing to change / add.
>
>
> CFP will discuss it and decide whether to submit a late proposal for the change.
> OK.
>
> Would you have any objection to my forwarding this thread to CFP as background of the discussion?
> No objection.
>
>
>>
>> Or maybe it is me who is missing a point: after the C standard will be fixed (Floating => Fused), the "extension documents" will be fixed as well.
>> Is that correct?
>
> The relevant extension documents are being incorporated into (and superseded by) C23, so I wouln’t expect them to be revised.
> And what about the next revisions of the relevant extension documents? I think that the extension documents need to be (eventually) fixed too. This is to maintain consistency in terminology.
>
> --
> Pavel
>
>
> - Jim
>
>>
>> On Fri, 25 Feb 2022 at 08:48, Jim Thomas <jaswthomas at sbcglobal.net <mailto:jaswthomas at sbcglobal.net>> wrote:
>> Pavel,
>>
>> I might be missing a point here. The document you mention uses “fused” referring to the fused multiply-add operation in IEEE 754. C uses floating multiply-add to refer to the C function that corresponds to this IEEE 754 fused multiply-add operation. One of the historical C naming styles is prefixing a function name with f to indicate floating. The fabs, fmod, and fmax functions are examples. The fma function seen in the same way is naturally called floating multiply-add. One might argue that calling it fused multiple-add would better suggest the important “fused” behavior of the function. I understand this point. Is there another one?
>>
>> - Jim Thomas
>>
>>> On Feb 24, 2022, at 5:17 AM, Pavel M <pavel.morozkin at gmail.com <mailto:pavel.morozkin at gmail.com>> wrote:
>>>
>>> Jim,
>>>
>>> Thanks.
>>>
>>> Also: Document "Extension for the programming language C to support decimal floating-point arithmetic" [1] uses FMAD / fmad, and F / f has meaning "fused" (emphasis added):
>>> [7] The macro
>>> FP_FAST_FMAD32
>>> FP_FAST_FMAD64
>>> FP_FAST_FMAD128
>>> are, respectively, _Decimal32, _Decimal64 and _Decimal128 analogs of FP_FAST_FMA.
>>>
>>> However, later in the document there is (emphasis added):
>>> 7.12.13 Floating multiply-add
>>> _Decimal64 fmad64(_Decimal64 x, _Decimal64 y, _Decimal64 z);
>>> _Decimal32 fmad32(_Decimal32 x, _Decimal32 y, _Decimal32 z);
>>> _Decimal128 fmad128(_Decimal128 x, _Decimal128 y, _Decimal128 z);
>>>
>>> Here the "f" could easily be misinterpreted as "floating" as opposed to its actual meaning "fused".
>>>
>>> Please fix it.
>>>
>>> [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1154.pdf <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1154.pdf>
>>> On Thu, 24 Feb 2022 at 05:02, Jim Thomas <jaswthomas at sbcglobal.net <mailto:jaswthomas at sbcglobal.net>> wrote:
>>> Hi Pavel,
>>>
>>> I’ll put this on the agenda for the March CFP meeting.
>>>
>>> I believe the reason for using “floating multiply-add” was to distinguish it from an integer multiply-add. Using “fused multiply-add” might be more suggestive of its single rounding.
>>>
>>> - Jim Thomas
>>>
>>>> On Feb 23, 2022, at 3:49 AM, Pavel M <pavel.morozkin at gmail.com <mailto:pavel.morozkin at gmail.com>> wrote:
>>>>
>>>> Any updates?
>>>>
>>>> On Wed, 2 Feb 2022 at 16:21, Pavel M <pavel.morozkin at gmail.com <mailto:pavel.morozkin at gmail.com>> wrote:
>>>> Hello Fred,
>>>>
>>>> C11 (and newer):
>>>> > 7.12.13 Floating multiply-add
>>>>
>>>> IEEE 754-2008:
>>>> > fused multiply add, fusedMultiplyAdd
>>>>
>>>> Wikipedia:
>>>> > fused multiply-add
>>>>
>>>> Why C11 (and newer) uses "floating multiply-add" instead of "fused multiply-add"?
>>>> Does it need to be changed?
>>>> Is it better to change?
>>>>
>>>> --
>>>> Pavel
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20220303/83ed7b34/attachment.htm>
More information about the Cfp-interest
mailing list