DRAFT IEEE Standard for Binary Floating-Point Arithmetic - Sonic.net
DRAFT IEEE Standard for Binary Floating-Point Arithmetic - Sonic.net
DRAFT IEEE Standard for Binary Floating-Point Arithmetic - Sonic.net
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>DRAFT</strong> <strong>IEEE</strong> <strong>Standard</strong> <strong>for</strong> <strong>Floating</strong>-<strong>Point</strong> <strong>Arithmetic</strong> – 2003 August 12 10:20<br />
5. Operations<br />
All con<strong>for</strong>ming implementations of this standard shall provide operations to add,<br />
subtract, multiply, divide, compute fused multiply-add §FMA, extract the square<br />
root, find the remainder, round to integer in floating-point <strong>for</strong>mat, convert between<br />
different floating-point <strong>for</strong>mats, convert between floating-point and integer<br />
<strong>for</strong>mats, convert binary decimal, and compare, and conversion between internal<br />
floating-point <strong>for</strong>mats and external decimal <strong>for</strong>mats. Whether copying without<br />
change of <strong>for</strong>mat is considered an operation is an implementation option.§BI<br />
Except <strong>for</strong> conversion between internal floating-point <strong>for</strong>mats and external decimal<br />
<strong>for</strong>mats binary decimal conversion, each of the operations shall be per<strong>for</strong>med as<br />
if it first produced an intermediate result correct to infinite precision and with<br />
unbounded range, and then coerced this intermediate result to fit in the<br />
destination's <strong>for</strong>mat (see Sections 4 and 7). Section 6 augments the following<br />
specifications to cover ±0, ±¥, and NaN; Section 7 enumerates exceptions<br />
caused by exceptional operands and exceptional results.<br />
In this standard, some operators such as fused multiply-add fma(a,b,c) and<br />
predicates such as isnormal(x) are written as named generic functions due to lack<br />
of widely-accepted operator notations; in a specific programming environment<br />
they might be represented by operators, or by families of <strong>for</strong>mat-specific<br />
functions, or by generic functions whose names may differ from those in this<br />
standard. §FMA<br />
[To mesh better with the claim in Section 4 that “rounding modes<br />
affect all arithmetic operations,” arithmetic operations should be<br />
more clearly defined as a set. From reading section 4, one could<br />
conclude that comparison is an arithmetic operation. Section 4 of<br />
854 states “The rounding modes affect all arithmetic operations<br />
except comparison and remainder.” -JDD]<br />
5.1. <strong>Arithmetic</strong><br />
For each supported <strong>for</strong>mat §FMA, an implementation shall provide the add,<br />
subtract, multiply, divide, and remainder operations <strong>for</strong> any two operands of the<br />
same <strong>for</strong>mat, and a fused multiply-add operation <strong>for</strong> any three operands of the<br />
same <strong>for</strong>mat §FMA; <strong>for</strong> each supported <strong>for</strong>mat; it should also provide these<br />
operations <strong>for</strong> operands of differing <strong>for</strong>mats. The destination <strong>for</strong>mat (regardless of<br />
Copyright © 2003 by the Institute of Electrical and Electronics Engineers, Inc. This document is an unapproved<br />
draft of a proposed <strong>IEEE</strong>-SA <strong>Standard</strong> - USE AT YOUR OWN RISK. See statement on page 1.<br />
Page 39