aboutsummaryrefslogtreecommitdiff
path: root/doc/testfloat_gen.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/testfloat_gen.html')
-rw-r--r--doc/testfloat_gen.html106
1 files changed, 55 insertions, 51 deletions
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.