aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohn Hauser <jhauser@eecs.berkeley.edu>2017-02-10 12:38:35 -0800
committerJohn Hauser <jhauser@eecs.berkeley.edu>2017-02-10 12:38:35 -0800
commitf755993d040a8ea9c1acf758efce76da60870627 (patch)
treedbc9bd5562476b06769ac1a1fe429ac1dde56b84 /doc
parentddfb9e70c434ae238635784ce66cb7ed93d0a2e7 (diff)
downloadberkeley-testfloat-3-f755993d040a8ea9c1acf758efce76da60870627.zip
berkeley-testfloat-3-f755993d040a8ea9c1acf758efce76da60870627.tar.gz
berkeley-testfloat-3-f755993d040a8ea9c1acf758efce76da60870627.tar.bz2
Release 3c. See "doc/TestFloat-history.html".
Diffstat (limited to 'doc')
-rw-r--r--doc/TestFloat-general.html126
-rw-r--r--doc/TestFloat-history.html31
-rw-r--r--doc/TestFloat-source.html64
-rw-r--r--doc/testfloat.html48
-rw-r--r--doc/testfloat_gen.html106
-rw-r--r--doc/testfloat_ver.html56
-rw-r--r--doc/testsoftfloat.html38
-rw-r--r--doc/timesoftfloat.html33
8 files changed, 303 insertions, 199 deletions
diff --git a/doc/TestFloat-general.html b/doc/TestFloat-general.html
index 11d906c..0c766a4 100644
--- a/doc/TestFloat-general.html
+++ b/doc/TestFloat-general.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: General Documentation</H1>
+<H1>Berkeley TestFloat Release 3c: General Documentation</H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -49,7 +49,7 @@ John R. Hauser<BR>
<P>
Berkeley TestFloat is a small collection of programs for testing that an
-implementation of binary floating-point conforms to the IEEE Standard for
+implementation of binary floating-point conforms to the IEEE Standard for
Floating-Point Arithmetic.
All operations required by the original 1985 version of the IEEE Floating-Point
Standard can be tested, except for conversions to and from decimal.
@@ -78,11 +78,30 @@ Details about the standard are available elsewhere.
</P>
<P>
-The current version of TestFloat is <NOBR>Release 3b</NOBR>.
-This release differs from the previous <NOBR>Release 3a</NOBR> mainly in the
-ability to test the <NOBR>16-bit</NOBR> half-precision format.
-Compared to Release 2c and earlier, the set of TestFloat programs as well as
-the programs&rsquo; arguments and behavior changed some with
+The current version of TestFloat is <NOBR>Release 3c</NOBR>.
+This release differs from the previous <NOBR>Release 3b</NOBR> in only minor
+ways.
+<NOBR>Release 3c</NOBR> adds the ability to test a rarely used rounding mode,
+<I>round to odd</I>, also known as <I>jamming</I>.
+It also permits TestFloat to be built for testing only <NOBR>32-bit</NOBR>
+single-precision and no other floating-point formats.
+(This is relevant for very small computers, which may benefit from leaving out
+the code for testing formats they don&rsquo;t support.)
+Previously, TestFloat's minimum set of testable formats was two:
+<NOBR>32-bit</NOBR> single-precision and <NOBR>64-bit</NOBR> double-precision.
+Now the minimum set is just <NOBR>32-bit</NOBR> single-precision
+alone.
+</P>
+
+<P>
+For its part, <NOBR>Release 3b</NOBR> differed from the earlier
+<NOBR>Release 3a</NOBR> mainly in the ability to test the <NOBR>16-bit</NOBR>
+half-precision format.
+</P>
+
+<P>
+Compared to Release 2c and earlier, the set of TestFloat programs, as well as
+the programs&rsquo; arguments and behavior, changed some with
<NOBR>Release 3</NOBR>.
For more about the evolution of TestFloat releases, see
<A HREF="TestFloat-history.html"><NOBR><CODE>TestFloat-history.html</CODE></NOBR></A>.
@@ -114,7 +133,7 @@ bugs can be found through links posted on the TestFloat Web page,
The TestFloat package was written by me, <NOBR>John R.</NOBR> Hauser.
<NOBR>Release 3</NOBR> of TestFloat was a completely new implementation
supplanting earlier releases.
-The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3b</NOBR>) was
+The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3c</NOBR>) was
done in the employ of the University of California, Berkeley, within the
Department of Electrical Engineering and Computer Sciences, first for the
Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab.
@@ -148,13 +167,13 @@ Oracle, and Samsung.
</P>
<P>
-The following applies to the whole of TestFloat <NOBR>Release 3b</NOBR> as well
+The following applies to the whole of TestFloat <NOBR>Release 3c</NOBR> as well
as to each source file individually.
</P>
<P>
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California.
All rights reserved.
</P>
@@ -211,7 +230,7 @@ For each operation to be tested, the TestFloat programs can generate a large
number of test cases, made up of simple pattern tests intermixed with weighted
random inputs.
The cases generated should be adequate for testing carry chain propagations,
-plus the rounding of addition, subtraction, multiplication, and simple
+and the rounding of addition, subtraction, multiplication, and simple
operations like conversions.
TestFloat makes a point of checking all boundary cases of the arithmetic,
including underflows, overflows, invalid operations, subnormal inputs, zeros
@@ -241,7 +260,8 @@ implementation, that in no way guarantees that the implementation is bug-free.
<P>
For each operation, TestFloat can test all five rounding modes defined by the
-IEEE Floating-Point Standard.
+IEEE Floating-Point Standard, plus possibly a sixth mode, <I>round to odd</I>
+(depending on the options selected when TestFloat was built).
TestFloat verifies not only that the numeric results of an operation are
correct, but also that the proper floating-point exception flags are raised.
All five exception flags are tested, including the <I>inexact</I> flag.
@@ -368,7 +388,7 @@ Assuming a vertical bar (<CODE>|</CODE>) indicates a pipe between programs, the
complete process could be written as a single command like so:
<BLOCKQUOTE>
<PRE>
-testfloat_gen ... &lt;type&gt; | &lt;program-that-invokes-op&gt; | testfloat_ver ... &lt;function&gt;
+testfloat_gen ... &lt;<I>type</I>&gt; | &lt;<I>program-that-invokes-op</I>&gt; | testfloat_ver ... &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
The program in the middle is not supplied by TestFloat but must be created
@@ -386,7 +406,7 @@ With this additional information, the job done by <CODE>testfloat_ver</CODE>
can be folded into the invoking program to give the following command:
<BLOCKQUOTE>
<PRE>
-testfloat_gen ... &lt;function&gt; | &lt;program-that-invokes-op-and-compares-results&gt;
+testfloat_gen ... &lt;<I>function</I>&gt; | &lt;<I>program-that-invokes-op-and-compares-results</I>&gt;
</PRE>
</BLOCKQUOTE>
Again, the program that actually invokes the floating-point operation is not
@@ -524,18 +544,18 @@ explicitly specify the rounding mode and treatment of inexactness.
Thus, instead of
<BLOCKQUOTE>
<PRE>
-&lt;float&gt;_to_&lt;int&gt;
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;
</PRE>
</BLOCKQUOTE>
as listed above, operations converting to integer type have names of these
forms:
<BLOCKQUOTE>
<PRE>
-&lt;float&gt;_to_&lt;int&gt;_r_&lt;round&gt;
-&lt;float&gt;_to_&lt;int&gt;_rx_&lt;round&gt;
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;_r_&lt;<I>round</I>&gt;
+&lt;<I>float</I>&gt;_to_&lt;<I>int</I>&gt;_rx_&lt;<I>round</I>&gt;
</PRE>
</BLOCKQUOTE>
-The <CODE>&lt;round&gt;</CODE> component is one of
+The <CODE>&lt;<I>round</I>&gt;</CODE> component is one of
&lsquo;<CODE>near_even</CODE>&rsquo;, &lsquo;<CODE>near_maxMag</CODE>&rsquo;,
&lsquo;<CODE>minMag</CODE>&rsquo;, &lsquo;<CODE>min</CODE>&rsquo;, or
&lsquo;<CODE>max</CODE>&rsquo;, choosing the rounding mode.
@@ -549,21 +569,38 @@ raise the <I>inexact</I> exception whenever the result is not exact.
TestFloat assumes that conversions from floating-point to an integer type
should raise the <I>invalid</I> exception if the input cannot be rounded to an
integer representable in the result format.
-In such a circumstance, if the result type is an unsigned integer, TestFloat
-expects the result of the operation to be the type&rsquo;s largest integer
-value;
-although, when conversion overflows for a negative input, TestFloat may also
-accept a result of zero.
-If the result type is a signed integer and conversion overflows, TestFloat
-expects the result to be the largest-magnitude integer with the same sign as
-the input.
-Lastly, when a NaN is converted to a signed integer type, TestFloat allows
-either the largest postive or largest-magnitude negative integer to be
-returned.
+In such a circumstance:
+<UL>
+
+<LI>
+<P>
+If the result type is an unsigned integer, TestFloat normally expects the
+result of the operation to be the type&rsquo;s largest integer value.
+In the case that the input is a negative number (not a NaN), a zero result may
+also be accepted.
+</P>
+
+<LI>
+<P>
+If the result type is a signed integer and the input is a number (not a NaN),
+TestFloat expects the result to be the largest-magnitude integer with the same
+sign as the input.
+When a NaN is converted to a signed integer type, TestFloat allows either the
+largest postive or largest-magnitude negative integer to be returned.
+</P>
+
+</UL>
Conversions to integer types are expected never to raise the <I>overflow</I>
exception.
</P>
+<P>
+When converting to an integer, if the rounding mode is <CODE>odd</CODE>
+(possible only when the rounding mode is not in the function name), TestFloat
+expects the result to be rounded <EM>not</EM> to an odd integer but rather to
+minimum magnitude, the same as when the rounding mode is <CODE>minMag</CODE>.
+</P>
+
<H3>6.2. Basic Arithmetic Operations</H3>
<P>
@@ -601,7 +638,7 @@ f128_mulAdd
<P>
If one of the multiplication operands is infinite and the other is zero,
TestFloat expects the fused multiply-add operation to raise the <I>invalid</I>
-exception even if the third operand is a NaN.
+exception even if the third operand is a quiet NaN.
</P>
<H3>6.4. Remainder Operations</H3>
@@ -646,13 +683,13 @@ For <CODE>testfloat</CODE> only, the round-to-integer operations have names of
these forms:
<BLOCKQUOTE>
<PRE>
-&lt;float&gt;_roundToInt_r_&lt;round&gt;
-&lt;float&gt;_roundToInt_x
+&lt;<I>float</I>&gt;_roundToInt_r_&lt;<I>round</I>&gt;
+&lt;<I>float</I>&gt;_roundToInt_x
</PRE>
</BLOCKQUOTE>
For the &lsquo;<CODE>_r_</CODE>&rsquo; versions, the <I>inexact</I> exception
-is never raised, and the <CODE>&lt;round&gt;</CODE> component specifies the
-rounding mode as one of &lsquo;<CODE>near_even</CODE>&rsquo;,
+is never raised, and the <CODE>&lt;<I>round</I>&gt;</CODE> component specifies
+the rounding mode as one of &lsquo;<CODE>near_even</CODE>&rsquo;,
&lsquo;<CODE>near_maxMag</CODE>&rsquo;, &lsquo;<CODE>minMag</CODE>&rsquo;,
&lsquo;<CODE>min</CODE>&rsquo;, or &lsquo;<CODE>max</CODE>&rsquo;.
The usual indication of rounding mode is ignored.
@@ -663,6 +700,13 @@ This irregular system follows the IEEE Standard&rsquo;s particular
specification for the round-to-integer operations.
</P>
+<P>
+If the rounding mode is <CODE>odd</CODE> (possible only when the rounding mode
+is not in the function name), TestFloat expects the result to be rounded
+<EM>not</EM> to an odd integer but rather to minimum magnitude, the same as
+when the rounding mode is <CODE>minMag</CODE>.
+</P>
+
<H3>6.6. Comparison Operations</H3>
<P>
@@ -758,12 +802,12 @@ subsequent &ldquo;continuation&rdquo; lines are indented with a tab.
Each error reported is of the form:
<BLOCKQUOTE>
<PRE>
-&lt;inputs&gt; => &lt;observed-output&gt; expected: &lt;expected-output&gt;
+&lt;<I>inputs</I>&gt; => &lt;<I>observed-output</I>&gt; expected: &lt;<I>expected-output</I>&gt;
</PRE>
</BLOCKQUOTE>
-The <CODE>&lt;inputs&gt;</CODE> are the inputs to the operation.
-Each output (observed and expected) is shown as a pair: the result value
-first, followed by the exception flags.
+The <CODE>&lt;<I>inputs</I>&gt;</CODE> are the inputs to the operation.
+Each output (observed or expected) is shown as a pair: the result value first,
+followed by the exception flags.
</P>
<P>
@@ -1094,7 +1138,7 @@ or an unspecified alternative mechanism may be used to signal such cases.
TestFloat assumes that conversions to integer will raise the <I>invalid</I>
exception if the source value cannot be rounded to a representable integer.
In such cases, TestFloat expects the result value to be the largest-magnitude
-positive or negative integer or zero as detailed earlier in
+positive or negative integer or zero, as detailed earlier in
<NOBR>section 6.1</NOBR>, <I>Conversion Operations</I>.
The current version of TestFloat provides no means to alter these expectations.
</P>
diff --git a/doc/TestFloat-history.html b/doc/TestFloat-history.html
index 34aeeda..3d3db9e 100644
--- a/doc/TestFloat-history.html
+++ b/doc/TestFloat-history.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>History of Berkeley TestFloat, to Release 3b</H1>
+<H1>History of Berkeley TestFloat, to Release 3c</H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -23,6 +23,33 @@ corresponding release of SoftFloat.
</P>
+<H3>Release 3c (2017 February)</H3>
+
+<UL>
+
+<LI>
+Added support for testing rounding mode <CODE>odd</CODE> (jamming).
+
+<LI>
+Made support for testing <NOBR>64-bit</NOBR> double-precistion floating-point
+be subject to macro <CODE>FLOAT64</CODE> (akin to macros <CODE>FLOAT16</CODE>,
+<CODE>EXTFLOAT80</CODE>, and <CODE>FLOAT128</CODE> from before).
+
+<LI>
+Fixed some bugs that caused compilation to fail with certain combinations of
+option macro settings.
+
+<LI>
+Corrected the types of two internal variables to be <CODE>sig_atomic_t</CODE>
+instead of <CODE>bool</CODE>.
+
+<LI>
+Improved the formatting of some error reports (concerning where lines are
+broken when they exceed 79 characters in length).
+
+</UL>
+
+
<H3>Release 3b (2016 July)</H3>
<UL>
diff --git a/doc/TestFloat-source.html b/doc/TestFloat-source.html
index 42dc050..45529eb 100644
--- a/doc/TestFloat-source.html
+++ b/doc/TestFloat-source.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: Source Documentation</H1>
+<H1>Berkeley TestFloat Release 3c: Source Documentation</H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -66,7 +66,7 @@ TestFloat has been successfully compiled with the GNU C Compiler
<P>
<NOBR>Release 3</NOBR> of TestFloat was a complete rewrite relative to
<NOBR>Release 2</NOBR> or earlier.
-The current version of TestFloat is <NOBR>Release 3b</NOBR>.
+The current version of TestFloat is <NOBR>Release 3c</NOBR>.
</P>
<P>
@@ -120,7 +120,7 @@ and <CODE>&lt;stdint.h&gt;</CODE></I>.
The TestFloat package was written by me, <NOBR>John R.</NOBR> Hauser.
<NOBR>Release 3</NOBR> of TestFloat was a completely new implementation
supplanting earlier releases.
-The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3b</NOBR>) was
+The project to create <NOBR>Release 3</NOBR> (now <NOBR>through 3c</NOBR>) was
done in the employ of the University of California, Berkeley, within the
Department of Electrical Engineering and Computer Sciences, first for the
Parallel Computing Laboratory (Par Lab) and then for the ASPIRE Lab.
@@ -154,13 +154,13 @@ Oracle, and Samsung.
</P>
<P>
-The following applies to the whole of TestFloat <NOBR>Release 3b</NOBR> as well
+The following applies to the whole of TestFloat <NOBR>Release 3c</NOBR> as well
as to each source file individually.
</P>
<P>
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California.
All rights reserved.
</P>
@@ -241,7 +241,7 @@ subject of the test.
If <CODE>testfloat</CODE> is retargeted to test other floating-point
implementations, the corresponding source files would be expected to be in
other subdirectories alongside <NOBR><CODE>subj-C</CODE></NOBR>, with names of
-the form <NOBR><CODE>subj-&lt;target&gt;</CODE></NOBR>.
+the form <NOBR><CODE>subj-&lt;<I>target</I>&gt;</CODE></NOBR>.
More about retargeting <CODE>testfloat</CODE> is found in
<NOBR>section 6.4</NOBR>, <I>Specializing the <CODE>testfloat</CODE>
Program</I>.
@@ -259,13 +259,13 @@ contains sample files for creating new target directories.
<P>
Ignoring the <CODE>template</CODE> directory, the supplied target directories
are intended to follow a naming system of
-<NOBR><CODE>&lt;execution-environment&gt;-&lt;compiler&gt;</CODE></NOBR>.
+<NOBR><CODE>&lt;<I>execution-environment</I>&gt;-&lt;<I>compiler</I>&gt;</CODE></NOBR>.
For the example targets,
-<NOBR><CODE>&lt;execution-environment&gt;</CODE></NOBR> is
+<NOBR><CODE>&lt;<I>execution-environment</I>&gt;</CODE></NOBR> is
<NOBR><CODE>Linux-386</CODE></NOBR>, <NOBR><CODE>Linux-386-SSE2</CODE></NOBR>,
<NOBR><CODE>Linux-x86_64</CODE></NOBR>, <CODE>Win32</CODE>,
<NOBR><CODE>Win32-SSE2</CODE></NOBR>, or <CODE>Win64</CODE>, and
-<NOBR><CODE>&lt;compiler&gt;</CODE></NOBR> is <CODE>GCC</CODE>,
+<NOBR><CODE>&lt;<I>compiler</I>&gt;</CODE></NOBR> is <CODE>GCC</CODE>,
<CODE>MinGW</CODE>, or <NOBR><CODE>MinGW-w64</CODE></NOBR>.
</P>
@@ -381,6 +381,7 @@ uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
+int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
@@ -418,7 +419,7 @@ below, <I>Specializing the <CODE>testfloat</CODE> Program</I>.
<H3>6.3. Macros for Build Options</H3>
<P>
-The TestFloat source files are affected by a few C preprocessor macros:
+The TestFloat source files are affected by several C preprocessor macros:
<BLOCKQUOTE>
<DL>
<DT><CODE>LITTLEENDIAN</CODE>
@@ -442,7 +443,7 @@ Can be defined to a sequence of tokens that, when appearing at the start of a
variable declaration, indicates to the C compiler that the variable is
<I>per-thread</I>, meaning that each execution thread gets its own separate
instance of the variable.
-This macro is used in the supplied version of SoftFloat&rsquo;s header
+This macro is used in the supplied version of Berkeley SoftFloat&rsquo;s header
<CODE>softfloat.h</CODE>, in the declarations of variables
<CODE>softfloat_roundingMode</CODE>, <CODE>softfloat_detectTininess</CODE>,
<CODE>extF80_roundingPrecision</CODE>, and
@@ -450,10 +451,16 @@ This macro is used in the supplied version of SoftFloat&rsquo;s header
To use the supplied, unmodified header <CODE>softfloat.h</CODE>, this macro
must be defined (or not defined) the same as when the SoftFloat library was
built.
+</DL>
+<DL>
<DT><CODE>FLOAT16</CODE>
<DD>
Must be defined if the TestFloat programs are to support the
<NOBR>16-bit</NOBR> half-precision floating-point format.
+<DT><CODE>FLOAT64</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support the
+<NOBR>64-bit</NOBR> double-precision floating-point format.
<DT><CODE>EXTFLOAT80</CODE>
<DD>
Must be defined if the TestFloat programs are to support the
@@ -462,6 +469,12 @@ Must be defined if the TestFloat programs are to support the
<DD>
Must be defined if the TestFloat programs are to support the
<NOBR>128-bit</NOBR> quadruple-precision floating-point format.
+<DT><CODE>FLOAT_ROUND_ODD</CODE>
+<DD>
+Must be defined if the TestFloat programs are to support rounding to odd
+(jamming).
+To be useful, this option also requires that the Berkeley SoftFloat library was
+compiled with macro <CODE>SOFTFLOAT_ROUND_ODD</CODE> defined.
</DL>
</BLOCKQUOTE>
Following the usual custom <NOBR>for C</NOBR>, for all the macros except
@@ -475,9 +488,8 @@ It is recommended that any definition of macros <CODE>LITTLEENDIAN</CODE>,
<CODE>INLINE</CODE>, and <CODE>THREAD_LOCAL</CODE> be made in a build
target&rsquo;s <CODE>platform.h</CODE> header file, because these macros are
expected to be determined inflexibly by the target machine and compiler.
-On the other hand, the <CODE>FLOAT16</CODE>, <CODE>EXTFLOAT80</CODE>, and
-<CODE>FLOAT128</CODE> macros are not dictated by the target and hence might be
-better located in the target&rsquo;s Makefile (or its equivalent).
+The other five macros select build options, and hence might be better located
+in the target&rsquo;s Makefile (or its equivalent).
</P>
@@ -507,14 +519,17 @@ By default, <CODE>testfloat</CODE> assumes that only the IEEE Standard&rsquo;s
original four rounding modes (<CODE>near_even</CODE>, <CODE>minMag</CODE>,
<CODE>min</CODE>, and <CODE>max</CODE>) are supported by the floating-point
being tested.
-If the fifth rounding mode, <CODE>near_maxMag</CODE>, is also supported, an
-additional macro can be defined:
+For other rounding modes, additional macro can be defined:
<BLOCKQUOTE>
<DL>
<DT><CODE>SUBJFLOAT_ROUND_NEAR_MAXMAG</CODE>
<DD>
Indicates that the subject floating-point supports rounding mode
<CODE>near_maxMag</CODE> (nearest/away).
+<DT><CODE>SUBJFLOAT_ROUND_ODD</CODE>
+<DD>
+Indicates that the subject floating-point supports rounding mode
+<CODE>odd</CODE> (jamming).
</DL>
</BLOCKQUOTE>
</P>
@@ -536,8 +551,9 @@ contained in directory <NOBR><CODE>source/subj-C</CODE></NOBR> as discussed
earlier.
For a different subject floating-point, it is recommended that appropriate
versions of <CODE>subjfloat_config.h</CODE> and <CODE>subjfloat.c</CODE> be
-stored in a sibling <NOBR><CODE>subj-&lt;target&gt;</CODE></NOBR> directory,
-where <CODE>&lt;target&gt;</CODE> names the particular target.
+stored in a sibling <NOBR><CODE>subj-&lt;<I>target</I>&gt;</CODE></NOBR>
+directory, where <CODE>&lt;<I>target</I>&gt;</CODE> names the particular
+target.
</P>
<P>
@@ -565,9 +581,11 @@ In the source code as supplied, macros <CODE>LONG_DOUBLE_IS_EXTFLOAT80</CODE>
and <CODE>LONG_DOUBLE_IS_FLOAT128</CODE> affect only the target-specific source
files in <NOBR><CODE>source/subj-C</CODE></NOBR>, so these macros can be
ignored for any other subject floating-point that does not depend on them.
-On the other hand, macro <CODE>SUBJFLOAT_ROUND_NEAR_MAXMAG</CODE> always
-determines whether the <CODE>testfloat</CODE> program attempts to test rounding
-mode <CODE>near_maxMag</CODE>, regardless of the subject floating-point.
+On the other hand, macros <CODE>SUBJFLOAT_ROUND_NEAR_MAXMAG</CODE> and
+<CODE>SUBJFLOAT_ROUND_ODD</CODE> always determine whether the
+<CODE>testfloat</CODE> program attempts to test rounding modes
+<CODE>near_maxMag</CODE> and <CODE>odd</CODE>, regardless of the subject
+floating-point.
</P>
diff --git a/doc/testfloat.html b/doc/testfloat.html
index 8d8177f..25f0d95 100644
--- a/doc/testfloat.html
+++ b/doc/testfloat.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>testfloat</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>testfloat</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -58,8 +58,9 @@ or may not be the same as the computer&rsquo;s floating-point hardware, if any.
<P>
The <CODE>testfloat</CODE> program will ordinarily test an operation for all
-rounding modes defined by the IEEE Floating-Point Standard, one after the
-other.
+five rounding modes defined by the IEEE Floating-Point Standard, one after the
+other, plus possibly a sixth mode, <I>round to odd</I> (depending on the
+options selected when <CODE>testfloat</CODE> was compiled).
If the rounding mode is not supposed to have any affect on the
results&mdash;for instance, some operations do not require rounding&mdash;only
the nearest/even rounding mode is checked.
@@ -83,13 +84,13 @@ output, refer to
The <CODE>testfloat</CODE> program is executed as a command with this syntax:
<BLOCKQUOTE>
<PRE>
-testfloat [&lt;option&gt;...] &lt;function&gt;
+testfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
-<CODE>&lt;option&gt;</CODE> is a supported option, and
-<CODE>&lt;function&gt;</CODE> is the name of either a testable operation or a
-function set.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable operation
+or a function set.
The available options and function sets are documented below.
The <CODE>-list</CODE> option can be used to obtain a list of all testable
operations for a given build of <CODE>testfloat</CODE>.
@@ -117,11 +118,11 @@ after which the program exits.
<P>
The <CODE>-list</CODE> option causes a list of testable operations to be
written, after which the program exits.
-The set of testable operations is just the set of operations that this build of
-<CODE>testfloat</CODE> has some way to invoke for testing.
+An operation is testable by <CODE>testfloat</CODE> if the program knows some
+way to invoke the operation.
</P>
-<H3><CODE>-seed &lt;num&gt;</CODE></H3>
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
@@ -134,7 +135,7 @@ should result in a different sequence of tests.
The default seed number <NOBR>is 1</NOBR>.
</P>
-<H3><CODE>-level &lt;num&gt;</CODE></H3>
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-level</CODE> option sets the level of testing.
@@ -144,7 +145,7 @@ Level 2 performs many more tests than <NOBR>level 1</NOBR> and thus can reveal
bugs not found by <NOBR>level 1</NOBR>.
</P>
-<H3><CODE>-errors &lt;num&gt;</CODE></H3>
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-errors</CODE> option instructs <CODE>testfloat</CODE> to report no
@@ -209,11 +210,11 @@ control.
</P>
<P>
-The precision-control options may not be accepted at all if no
+The precision-control options may not be supported at all if no
double-extended-precision operations are testable.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
The <CODE>-rnear_even</CODE> option restricts testing to only the cases in
@@ -222,9 +223,12 @@ The other rounding mode choices are not tested.
Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
-toward negative infinity), and <CODE>-rmax</CODE> forces rounding to maximum
-(up, toward positive infinity).
-These options are ignored for operations that are exact and thus do not round.
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
+These options are ignored for operations that are exact and thus do not round,
+or that have the rounding mode included in the function name (such as
+<CODE>f32_to_i32_r_near_maxMag</CODE>).
</P>
<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
@@ -245,9 +249,9 @@ Choosing the wrong one of these two options should cause error reports for some
<H2>Function Sets</H2>
<P>
-Just as <CODE>testfloat</CODE> can test an operation for all five rounding
-modes in sequence, multiple operations can be tested with a single execution of
-<CODE>testfloat</CODE>.
+Just as <CODE>testfloat</CODE> can test an operation for all five or six
+rounding modes in sequence, multiple operations can be tested with a single
+execution of <CODE>testfloat</CODE>.
Two sets are recognized: <CODE>-all1</CODE> and <CODE>-all2</CODE>.
The set <CODE>-all1</CODE> is all one-operand operations, while
<CODE>-all2</CODE> is all two-operand operations.
@@ -255,7 +259,7 @@ A function set is used in place of an operation name in the
<CODE>testfloat</CODE> command line, such as
<BLOCKQUOTE>
<PRE>
-testfloat [&lt;option&gt;...] -all1
+testfloat [&lt;<I>option</I>&gt;...] -all1
</PRE>
</BLOCKQUOTE>
</P>
diff --git a/doc/testfloat_gen.html b/doc/testfloat_gen.html
index 306e3c5..7df31d0 100644
--- a/doc/testfloat_gen.html
+++ b/doc/testfloat_gen.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>testfloat_gen</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>testfloat_gen</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -35,13 +35,13 @@ test cases for each operation to be tested.
</P>
<P>
-<CODE>testfloat_gen</CODE> writes the test cases it generates to standard
-output.
+The <CODE>testfloat_gen</CODE> program writes the test cases it generates to
+standard output.
This output can either be captured in a file through redirection, or be piped
to another program that exercises a floating-point operation using the test
cases as they are supplied.
Depending on use, the total output from <CODE>testfloat_gen</CODE> can be
-large, so piping to another program may be the best choice to avoid consuming
+large, so piping to another program may be the best choice to avoid using
inordinate file space.
The format of <CODE>testfloat_gen</CODE>&rsquo;s output is raw hexadecimal
text, described in the section below titled <I>Output Format</I>.
@@ -55,21 +55,21 @@ The <CODE>testfloat_gen</CODE> program is executed as a command in one of these
forms:
<BLOCKQUOTE>
<PRE>
-testfloat_gen [&lt;option&gt;...] &lt;type&gt;
-testfloat_gen [&lt;option&gt;...] &lt;function&gt;
+testfloat_gen [&lt;<I>option</I>&gt;...] &lt;<I>type</I>&gt;
+testfloat_gen [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments, and
-<CODE>&lt;option&gt;</CODE> is a supported option, documented below.
-A <CODE>testfloat_gen</CODE> command expects either a <CODE>&lt;type&gt;</CODE>
-specifying the type and number of output or a <CODE>&lt;function&gt;</CODE>
-naming a floating-point operation.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, documented below.
+A <CODE>testfloat_gen</CODE> command expects either a
+<CODE>&lt;<I>type</I>&gt;</CODE> specifying the type and number of outputs or a
+<CODE>&lt;<I>function</I>&gt;</CODE> naming a floating-point operation.
If <CODE>testfloat_gen</CODE> is executed without any arguments, a summary of
usage is written.
</P>
<P>
-A <CODE>&lt;type&gt;</CODE> can be one of the following:
+A <CODE>&lt;<I>type</I>&gt;</CODE> can be one of the following:
<BLOCKQUOTE>
<TABLE CELLSPACING=0 CELLPADDING=0>
<TR>
@@ -89,34 +89,35 @@ A <CODE>&lt;type&gt;</CODE> can be one of the following:
<TD>signed <NOBR>64-bit</NOBR> integers</TD>
</TR>
<TR>
-<TD><CODE>f16 [&lt;num&gt;]</CODE></TD>
+<TD><CODE>f16 [&lt;<I>num</I>&gt;]</CODE></TD>
<TD>one or more <NOBR>16-bit</NOBR> half-precision floating-point values</TD>
</TR>
<TR>
-<TD><CODE>f32 [&lt;num&gt;]</CODE></TD>
+<TD><CODE>f32 [&lt;<I>num</I>&gt;]</CODE></TD>
<TD>one or more <NOBR>32-bit</NOBR> single-precision floating-point values</TD>
</TR>
<TR>
-<TD><CODE>f64 [&lt;num&gt;]</CODE></TD>
+<TD><CODE>f64 [&lt;<I>num</I>&gt;]</CODE></TD>
<TD>one or more <NOBR>64-bit</NOBR> double-precision floating-point values</TD>
</TR>
<TR>
-<TD><CODE>extF80 [&lt;num&gt;]&nbsp;&nbsp;&nbsp;</CODE></TD>
+<TD><CODE>extF80 [&lt;<I>num</I>&gt;]&nbsp;&nbsp;&nbsp;</CODE></TD>
<TD>one or more <NOBR>80-bit</NOBR> double-extended-precision floating-point
values</TD>
</TR>
<TR>
-<TD><CODE>f128 [&lt;num&gt;]</CODE></TD>
+<TD><CODE>f128 [&lt;<I>num</I>&gt;]</CODE></TD>
<TD>one or more <NOBR>128-bit</NOBR> quadruple-precision floating-point
values</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
-Optional <CODE>&lt;num&gt;</CODE> is one of 1, 2, <NOBR>or 3</NOBR>.
-If a <CODE>&lt;type&gt;</CODE> is given without <CODE>&lt;num&gt;</CODE> (such
-as <CODE>ui32</CODE> or <CODE>f64</CODE>), <CODE>testfloat_gen</CODE> outputs a
-list of values of the specified type, one value per line, appropriate for
-testing a floating-point operation with exactly one operand of the given type.
+Optional <CODE>&lt;<I>num</I>&gt;</CODE> is one of 1, 2, <NOBR>or 3</NOBR>.
+If a <CODE>&lt;<I>type</I>&gt;</CODE> is given without
+<CODE>&lt;<I>num</I>&gt;</CODE> (such as <CODE>ui32</CODE> or
+<CODE>f64</CODE>), <CODE>testfloat_gen</CODE> outputs a list of values of the
+specified type, one value per line, appropriate for testing a floating-point
+operation with exactly one operand of the given type.
If a floating-point type and number are given (such as
<NOBR><CODE>f32</CODE> <CODE>2</CODE></NOBR> or
<NOBR><CODE>extF80</CODE> <CODE>1</CODE></NOBR>), <CODE>testfloat_gen</CODE>
@@ -129,12 +130,12 @@ operations, to the degree explained in
</P>
<P>
-If a <CODE>&lt;function&gt;</CODE> operation name is given, then each line of
-output from <CODE>testfloat_gen</CODE> contains not only the operands for that
-operation (as would be generated by an appropriate <CODE>&lt;type&gt;</CODE>
-argument) but also the expected results as determined by
-<CODE>testfloat_gen</CODE>&rsquo;s internal floating-point emulation
-(Berkeley SoftFloat).
+If a <CODE>&lt;<I>function</I>&gt;</CODE> operation name is given, then each
+line of output from <CODE>testfloat_gen</CODE> contains not only the operands
+for that operation (as would be generated by an appropriate
+<CODE>&lt;<I>type</I>&gt;</CODE> argument) but also the expected results as
+determined by <CODE>testfloat_gen</CODE>&rsquo;s internal floating-point
+emulation (Berkeley SoftFloat).
The available operation names are listed in
<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
In all cases, floating-point operations have two results:
@@ -164,7 +165,7 @@ The <CODE>-help</CODE> option causes a summary of program usage to be written,
after which the program exits.
</P>
-<H3><CODE>-prefix &lt;text&gt;</CODE></H3>
+<H3><CODE>-prefix &lt;<I>text</I>&gt;</CODE></H3>
<P>
The <CODE>-prefix</CODE> option causes <CODE>testfloat_gen</CODE> to write the
@@ -174,7 +175,7 @@ This can be used, for example, to indicate to a downstream program what kind of
test to perform for the test cases that follow.
</P>
-<H3><CODE>-seed &lt;num&gt;</CODE></H3>
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
@@ -187,7 +188,7 @@ result in a different sequence of test cases.
The default seed number <NOBR>is 1</NOBR>.
</P>
-<H3><CODE>-level &lt;num&gt;</CODE></H3>
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-level</CODE> option sets the level of testing.
@@ -197,13 +198,14 @@ The default is <NOBR>level 1</NOBR>.
coverage, than <NOBR>level 1</NOBR>.
</P>
-<H3><CODE>-n &lt;num&gt;</CODE></H3>
+<H3><CODE>-n &lt;<I>num</I>&gt;</CODE></H3>
<P>
Option <CODE>-n</CODE> specifies the number of test cases to generate.
-For each <CODE>&lt;type&gt;</CODE> or <CODE>&lt;function&gt;</CODE> and each
-testing level (set by <CODE>-level</CODE>), there is a minimum value that
-<CODE>testfloat_gen</CODE> will accept for <CODE>&lt;num&gt;</CODE>.
+For each <CODE>&lt;<I>type</I>&gt;</CODE> or
+<CODE>&lt;<I>function</I>&gt;</CODE> and each testing level (set by
+<CODE>-level</CODE>), there is a minimum value that <CODE>testfloat_gen</CODE>
+will accept for <CODE>&lt;<I>num</I>&gt;</CODE>.
If no <CODE>-n</CODE> option is given, the number of test cases generated by
<CODE>testfloat_gen</CODE> equals the minimum value acceptable for the
<CODE>-n</CODE> argument.
@@ -223,7 +225,7 @@ The testing level is set to 2 by this option.
<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
<P>
-When a <CODE>&lt;function&gt;</CODE> is specified that is an
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that is an
<NOBR>80-bit</NOBR> double-extended-precision operation affected by rounding
precision control, the <CODE>-precision32</CODE> option sets the rounding
precision to <NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR>
@@ -238,16 +240,18 @@ When rounding precision is applicable but not specified, the default is the
full <NOBR>80 bits</NOBR>, same as <CODE>-precision80</CODE>.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
-When a <CODE>&lt;function&gt;</CODE> is specified that requires rounding, the
-<CODE>-rnear_even</CODE> option sets the rounding mode to nearest/even;
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that requires
+rounding, the <CODE>-rnear_even</CODE> option sets the rounding mode to
+nearest/even;
<CODE>-rnear_maxMag</CODE> sets rounding to nearest/maximum magnitude
(nearest-away);
<CODE>-rminMag</CODE> sets rounding to minimum magnitude (toward zero);
<CODE>-rmin</CODE> sets rounding to minimum (down, toward negative infinity);
-and <CODE>-rmax</CODE> sets rounding to maximum (up, toward positive infinity).
+<CODE>-rmax</CODE> sets rounding to maximum (up, toward positive infinity);
+and <CODE>-rodd</CODE>, if supported, sets rounding to odd.
These options are ignored for operations that are exact and thus do not round.
When rounding mode is relevant but not specified, the default is to round to
nearest/even, same as <CODE>-rnear_even</CODE>.
@@ -256,10 +260,10 @@ nearest/even, same as <CODE>-rnear_even</CODE>.
<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
<P>
-When a <CODE>&lt;function&gt;</CODE> is specified that requires rounding, the
-<CODE>-tininessbefore</CODE> option indicates that tininess on underflow will
-be detected before rounding, while <CODE>-tininessafter</CODE> indicates that
-tininess on underflow will be detected after rounding.
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that requires
+rounding, the <CODE>-tininessbefore</CODE> option indicates that tininess on
+underflow will be detected before rounding, while <CODE>-tininessafter</CODE>
+indicates that tininess on underflow will be detected after rounding.
These options are ignored for operations that are exact and thus do not round.
When the method of tininess detection matters but is not specified, the default
is to detect tininess on underflow after rounding, same as
@@ -269,10 +273,10 @@ is to detect tininess on underflow after rounding, same as
<H3><CODE>-notexact, -exact</CODE></H3>
<P>
-When a <CODE>&lt;function&gt;</CODE> is specified that rounds to an integer
-(either conversion to an integer type or a <CODE>roundToInt</CODE> operation),
-the <CODE>-notexact</CODE> option indicates that the <I>inexact</I> exception
-flag is never raised, while <CODE>-exact</CODE> indicates that the
+When a <CODE>&lt;<I>function</I>&gt;</CODE> is specified that rounds to an
+integer (either conversion to an integer type or a <CODE>roundToInt</CODE>
+operation), the <CODE>-notexact</CODE> option indicates that the <I>inexact</I>
+exception flag is never raised, while <CODE>-exact</CODE> indicates that the
<I>inexact</I> exception flag is to be raised if the result is inexact.
For other operations, these options are ignored.
If neither option is specified, the default is not to raise the <I>inexact</I>
@@ -286,8 +290,8 @@ exception flag when rounding to an integer, same as <CODE>-notexact</CODE>.
For each test case generated, <CODE>testfloat_gen</CODE> writes a single line
of text to standard output.
When the <CODE>testfloat_gen</CODE> command is given a
-<CODE>&lt;type&gt;</CODE> argument, each test case consists of either one
-integer value or one, two, or three floating-point values.
+<CODE>&lt;<I>type</I>&gt;</CODE> argument, each test case consists of either
+one integer value or one, two, or three floating-point values.
Each value is written to output as a raw hexadecimal number.
When there is more than one value per line, they are separated by spaces.
For example, output from executing
@@ -317,7 +321,7 @@ encoded significand.
</P>
<P>
-When <CODE>testfloat_gen</CODE> is given a <CODE>&lt;function&gt;</CODE>
+When <CODE>testfloat_gen</CODE> is given a <CODE>&lt;<I>function</I>&gt;</CODE>
operation name, each line of output has not only the operands for the operation
but also the expected output, consisting of a result value and the exception
flags that are raised.
diff --git a/doc/testfloat_ver.html b/doc/testfloat_ver.html
index e55ea33..dbaeba7 100644
--- a/doc/testfloat_ver.html
+++ b/doc/testfloat_ver.html
@@ -7,18 +7,18 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>testfloat_ver</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>testfloat_ver</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
<H2>Overview</H2>
<P>
-The <CODE>testfloat_ver</CODE> program takes test-case results obtained from
+The <CODE>testfloat_ver</CODE> program accepts test-case results obtained from
exercising an implementation of floating-point arithmetic and verifies that
those results conform to the IEEE Standard for Binary Floating-Point
Arithmetic.
@@ -61,12 +61,12 @@ The <CODE>testfloat_ver</CODE> program is executed as a command with this
syntax:
<BLOCKQUOTE>
<PRE>
-testfloat_ver [&lt;option&gt;...] &lt;function&gt;
+testfloat_ver [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
-<CODE>&lt;option&gt;</CODE> is a supported option, and
-<CODE>&lt;function&gt;</CODE> is the name of a testable operation.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of a testable operation.
The available options are documented below.
The testable operation names are listed in
<A HREF="TestFloat-general.html"><NOBR><CODE>TestFloat-general.html</CODE></NOBR></A>.
@@ -89,7 +89,7 @@ The <CODE>-help</CODE> option causes a summary of program usage to be written,
after which the program exits.
</P>
-<H3><CODE>-errors &lt;num&gt;</CODE></H3>
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-errors</CODE> option instructs <CODE>testfloat_ver</CODE> to report
@@ -119,7 +119,7 @@ tested.
<H3><CODE>-precision32, -precision64, -precision80</CODE></H3>
<P>
-When <CODE>&lt;function&gt;</CODE> is an <NOBR>80-bit</NOBR>
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an <NOBR>80-bit</NOBR>
double-extended-precision operation affected by rounding precision control, the
<CODE>-precision32</CODE> option indicates that the rounding precision should
be <NOBR>32 bits</NOBR>, equivalent to <NOBR>32-bit</NOBR> single-precision.
@@ -134,16 +134,17 @@ When rounding precision is applicable but not specified, the default assumption
is the full <NOBR>80 bits</NOBR>, same as <CODE>-precision80</CODE>.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
-When <CODE>&lt;function&gt;</CODE> is an operation that requires rounding, the
-<CODE>-rnear_even</CODE> option indicates that rounding should be to
-nearest/even, <CODE>-rnear_maxMag</CODE> indicates rounding to nearest/maximum
-magnitude (nearest-away), <CODE>-rminMag</CODE> indicates rounding to minimum
-magnitude (toward zero), <CODE>-rmin</CODE> indicates rounding to minimum
-(down, toward negative infinity), and <CODE>-rmax</CODE> indicates rounding to
-maximum (up, toward positive infinity).
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that requires
+rounding, the <CODE>-rnear_even</CODE> option indicates that rounding should be
+to nearest/even, <CODE>-rnear_maxMag</CODE> indicates rounding to
+nearest/maximum magnitude (nearest-away), <CODE>-rminMag</CODE> indicates
+rounding to minimum magnitude (toward zero), <CODE>-rmin</CODE> indicates
+rounding to minimum (down, toward negative infinity), <CODE>-rmax</CODE>
+indicates rounding to maximum (up, toward positive infinity), and
+<CODE>-rodd</CODE>, if supported, indicates rounding to odd.
These options are ignored for operations that are exact and thus do not round.
When rounding mode is relevant but not specified, the default assumption is
rounding to nearest/even, same as <CODE>-rnear_even</CODE>.
@@ -152,10 +153,10 @@ rounding to nearest/even, same as <CODE>-rnear_even</CODE>.
<H3><CODE>-tininessbefore, -tininessafter</CODE></H3>
<P>
-When <CODE>&lt;function&gt;</CODE> is an operation that requires rounding, the
-<CODE>-tininessbefore</CODE> option indicates that tininess on underflow should
-be detected before rounding, while <CODE>-tininessafter</CODE> indicates that
-tininess on underflow should be detected after rounding.
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that requires
+rounding, the <CODE>-tininessbefore</CODE> option indicates that tininess on
+underflow should be detected before rounding, while <CODE>-tininessafter</CODE>
+indicates that tininess on underflow should be detected after rounding.
These options are ignored for operations that are exact and thus do not round.
When the method of tininess detection matters but is not specified, the default
assumption is that tininess should be detected after rounding, same as
@@ -165,11 +166,11 @@ assumption is that tininess should be detected after rounding, same as
<H3><CODE>-notexact, -exact</CODE></H3>
<P>
-When <CODE>&lt;function&gt;</CODE> is an operation that rounds to an integer
-(either conversion to an integer type or a <CODE>roundToInt</CODE> operation),
-the <CODE>-notexact</CODE> option indicates that the <I>inexact</I> exception
-flag should never be raised, while <CODE>-exact</CODE> indicates that the
-<I>inexact</I> exception flag should be raised when the result is inexact.
+When <CODE>&lt;<I>function</I>&gt;</CODE> is an operation that rounds to an
+integer (either conversion to an integer type or a <CODE>roundToInt</CODE>
+operation), the <CODE>-notexact</CODE> option indicates that the <I>inexact</I>
+exception flag should never be raised, while <CODE>-exact</CODE> indicates that
+the <I>inexact</I> exception flag should be raised when the result is inexact.
For other operations, these options are ignored.
If neither option is specified, the default assumption is that the
<I>inexact</I> exception flag should not be raised when rounding to an integer,
@@ -180,8 +181,9 @@ same as <CODE>-notexact</CODE>.
<H2>Input Format</H2>
<P>
-For a given <CODE>&lt;function&gt;</CODE> argument, the input format expected
-by <CODE>testfloat_ver</CODE> is the same as the output generated by program
+For a given <CODE>&lt;<I>function</I>&gt;</CODE> argument, the input format
+expected by <CODE>testfloat_ver</CODE> is the same as the output generated by
+program
<A HREF="testfloat_gen.html"><NOBR><CODE>testfloat_gen</CODE></NOBR></A> for
the same argument.
</P>
diff --git a/doc/testsoftfloat.html b/doc/testsoftfloat.html
index 6a10812..705ad84 100644
--- a/doc/testsoftfloat.html
+++ b/doc/testsoftfloat.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>testsoftfloat</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>testsoftfloat</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -37,8 +37,9 @@ build process, such as an incompatible compiler option or a compiler bug.
<P>
The <CODE>testsoftfloat</CODE> program will ordinarily test a function for all
-rounding modes defined by the IEEE Floating-Point Standard, one after the
-other.
+five rounding modes defined by the IEEE Floating-Point Standard, one after the
+other, plus possibly a sixth mode, <I>round to odd</I> (depending on the
+options selected when <CODE>testsoftfloat</CODE> was compiled).
If an operation is not supposed to require rounding, it will by default be
tested only with the rounding mode set to <CODE>near_even</CODE>
(nearest/even).
@@ -60,13 +61,13 @@ The <CODE>testsoftfloat</CODE> program is executed as a command with this
syntax:
<BLOCKQUOTE>
<PRE>
-testsoftfloat [&lt;option&gt;...] &lt;function&gt;
+testsoftfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
-<CODE>&lt;option&gt;</CODE> is a supported option, and
-<CODE>&lt;function&gt;</CODE> is the name of either a testable function or a
-function set.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable function
+or a function set.
The available options and function sets are documented below.
If <CODE>testsoftfloat</CODE> is executed without any arguments, a summary of
usage is written.
@@ -87,7 +88,7 @@ The <CODE>-help</CODE> option causes a summary of program usage to be written,
after which the program exits.
</P>
-<H3><CODE>-seed &lt;num&gt;</CODE></H3>
+<H3><CODE>-seed &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-seed</CODE> option sets the seed for the pseudo-random number
@@ -100,7 +101,7 @@ in a different sequence of tests.
The default seed number <NOBR>is 1</NOBR>.
</P>
-<H3><CODE>-level &lt;num&gt;</CODE></H3>
+<H3><CODE>-level &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-level</CODE> option sets the level of testing.
@@ -110,7 +111,7 @@ Level 2 performs many more tests than <NOBR>level 1</NOBR> and thus can reveal
bugs not found by <NOBR>level 1</NOBR>.
</P>
-<H3><CODE>-errors &lt;num&gt;</CODE></H3>
+<H3><CODE>-errors &lt;<I>num</I>&gt;</CODE></H3>
<P>
The <CODE>-errors</CODE> option instructs <CODE>testsoftfloat</CODE> to report
@@ -164,7 +165,7 @@ All these options are ignored for operations not affected by rounding precision
control.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
The <CODE>-rnear_even</CODE> option restricts testing to only the cases in
@@ -173,8 +174,9 @@ The other rounding mode choices are not tested.
Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
-toward negative infinity), and <CODE>-rmax</CODE> forces rounding to maximum
-(up, toward positive infinity).
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
These options are ignored for operations that are exact and thus do not round.
</P>
@@ -203,9 +205,9 @@ for which the <CODE><I>exact</I></CODE> operand is <CODE>true</CODE>.
<H2>Function Sets</H2>
<P>
-Just as <CODE>testsoftfloat</CODE> can test a function for all five rounding
-modes in sequence, multiple functions can be tested with a single execution of
-<CODE>testsoftfloat</CODE>.
+Just as <CODE>testsoftfloat</CODE> can test a function for all five or six
+rounding modes in sequence, multiple functions can be tested with a single
+execution of <CODE>testsoftfloat</CODE>.
Two sets are recognized: <CODE>-all1</CODE> and <CODE>-all2</CODE>.
The set <CODE>-all1</CODE> is all one-operand operations, while
<CODE>-all2</CODE> is all two-operand operations.
@@ -213,7 +215,7 @@ A function set is used in place of a function name in the
<CODE>testsoftfloat</CODE> command line, such as
<BLOCKQUOTE>
<PRE>
-testsoftfloat [&lt;option&gt;...] -all1
+testsoftfloat [&lt;<I>option</I>&gt;...] -all1
</PRE>
</BLOCKQUOTE>
</P>
diff --git a/doc/timesoftfloat.html b/doc/timesoftfloat.html
index f2b2e07..8494d89 100644
--- a/doc/timesoftfloat.html
+++ b/doc/timesoftfloat.html
@@ -7,11 +7,11 @@
<BODY>
-<H1>Berkeley TestFloat Release 3b: <CODE>timesoftfloat</CODE></H1>
+<H1>Berkeley TestFloat Release 3c: <CODE>timesoftfloat</CODE></H1>
<P>
John R. Hauser<BR>
-2016 July 22<BR>
+2017 February 10<BR>
</P>
@@ -34,8 +34,10 @@ see file
<P>
Ordinarily, <CODE>timesoftfloat</CODE> will measure a function&rsquo;s speed
-separately for each rounding mode defined by the IEEE Floating-Point Standard,
-one after the other.
+separately for each of the five rounding modes defined by the IEEE
+Floating-Point Standard, one after the other, plus possibly a sixth mode,
+<I>round to odd</I> (depending on the options selected when
+<CODE>timesoftfloat</CODE> was compiled).
If an operation is not supposed to require rounding, it will by default be
timed only with the rounding mode set to <CODE>near_even</CODE> (nearest/even).
In the same way, if an operation is affected by the way in which underflow
@@ -79,13 +81,13 @@ The <CODE>timesoftfloat</CODE> program is executed as a command with this
syntax:
<BLOCKQUOTE>
<PRE>
-timesoftfloat [&lt;option&gt;...] &lt;function&gt;
+timesoftfloat [&lt;<I>option</I>&gt;...] &lt;<I>function</I>&gt;
</PRE>
</BLOCKQUOTE>
Square brackets (<CODE>[ ]</CODE>) denote optional arguments,
-<CODE>&lt;option&gt;</CODE> is a supported option, and
-<CODE>&lt;function&gt;</CODE> is the name of either a testable function or a
-function set.
+<CODE>&lt;<I>option</I>&gt;</CODE> is a supported option, and
+<CODE>&lt;<I>function</I>&gt;</CODE> is the name of either a testable function
+or a function set.
The available options and function sets are documented below.
If <CODE>timesoftfloat</CODE> is executed without any arguments, a summary of
usage is written.
@@ -122,7 +124,7 @@ All these options are ignored for operations not affected by rounding precision
control.
</P>
-<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax</CODE></H3>
+<H3><CODE>-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd</CODE></H3>
<P>
The <CODE>-rnear_even</CODE> option restricts timing of an operation to only
@@ -131,8 +133,9 @@ Other rounding mode choices are not timed.
Likewise, <CODE>-rnear_maxMag</CODE> forces rounding to nearest/maximum
magnitude (nearest-away), <CODE>-rminMag</CODE> forces rounding to minimum
magnitude (toward zero), <CODE>-rmin</CODE> forces rounding to minimum (down,
-toward negative infinity), and <CODE>-rmax</CODE> forces rounding to maximum
-(up, toward positive infinity).
+toward negative infinity), <CODE>-rmax</CODE> forces rounding to maximum (up,
+toward positive infinity), and <CODE>-rodd</CODE>, if supported, forces
+rounding to odd.
These options are ignored for operations that are exact and thus do not round.
</P>
@@ -161,9 +164,9 @@ cases for which the <CODE><I>exact</I></CODE> operand is <CODE>true</CODE>.
<H2>Function Sets</H2>
<P>
-Just as <CODE>timesoftfloat</CODE> can time a function for all five rounding
-modes in sequence, multiple functions can be timed with a single execution of
-<CODE>timesoftfloat</CODE>.
+Just as <CODE>timesoftfloat</CODE> can time a function for all five or six
+rounding modes in sequence, multiple functions can be timed with a single
+execution of <CODE>timesoftfloat</CODE>.
Three sets are recognized:
<CODE>-all1</CODE>, <CODE>-all2</CODE>, and <CODE>-all</CODE>.
The set <CODE>-all1</CODE> is all one-operand operations, <CODE>-all2</CODE> is
@@ -172,7 +175,7 @@ A function set is used in place of a function name in the
<CODE>timesoftfloat</CODE> command line, such as
<BLOCKQUOTE>
<PRE>
-timesoftfloat [&lt;option&gt;...] -all1
+timesoftfloat [&lt;<I>option</I>&gt;...] -all1
</PRE>
</BLOCKQUOTE>
</P>