This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients docs@python, jayanthkoushik, mark.dickinson, pitrou, rhettinger, skrah
Date 2020-10-26.20:05:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1603742733.29.0.799242439893.issue21510@roundup.psfhosted.org>
In-reply-to
Content
I suggest using the text and example from the spec:
http://speleotrove.com/decimal/daops.html#reffma

=====================================================

fused-multiply-add takes three operands; the first two are multiplied together, using multiply, with sufficient precision and exponent range that the result is exact and unrounded.[4]  No flags are set by the multiplication unless one of the first two operands is a signaling NaN or one is a zero and the other is an infinity.
Unless the multiplication failed, the third operand is then added to the result of that multiplication, using add, under the current context.

In other words, fused-multiply-add(x, y, z) delivers a result which is (x × y) + z with only the one, final, rounding.

Examples:

  fused-multiply-add(’3’, ’5’, ’7’)               ==>  ’22’
  fused-multiply-add(’3’, ’-5’, ’7’)              ==>  ’-8’
  fused-multiply-add(’888565290’, ’1557.96930’,
                                  ’-86087.7578’)  ==>  ’1.38435736E+12’
Note that the last example would have given the result ’1.38435735E+12’ if the operation had been carried out as a separate multiply followed by an add.
History
Date User Action Args
2020-10-26 20:05:33rhettingersetrecipients: + rhettinger, mark.dickinson, pitrou, skrah, docs@python, jayanthkoushik
2020-10-26 20:05:33rhettingersetmessageid: <1603742733.29.0.799242439893.issue21510@roundup.psfhosted.org>
2020-10-26 20:05:33rhettingerlinkissue21510 messages
2020-10-26 20:05:33rhettingercreate