From f755993d040a8ea9c1acf758efce76da60870627 Mon Sep 17 00:00:00 2001
From: John Hauser
John R. HauserBerkeley TestFloat Release 3b:
+testfloat_gen
Berkeley TestFloat Release 3c:
testfloat_gen
-2016 July 22
+2017 February 10
-testfloat_gen
writes the test cases it generates to standard
-output.
+The testfloat_gen
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 testfloat_gen
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 testfloat_gen
’s output is raw hexadecimal
text, described in the section below titled Output Format.
@@ -55,21 +55,21 @@ The testfloat_gen
program is executed as a command in one of these
forms:
Square brackets (-testfloat_gen [<option>...] <type> -testfloat_gen [<option>...] <function> +testfloat_gen [<option>...] <type> +testfloat_gen [<option>...] <function>
[ ]
) denote optional arguments, and
-<option>
is a supported option, documented below.
-A testfloat_gen
command expects either a <type>
-specifying the type and number of output or a <function>
-naming a floating-point operation.
+<option>
is a supported option, documented below.
+A testfloat_gen
command expects either a
+<type>
specifying the type and number of outputs or a
+<function>
naming a floating-point operation.
If testfloat_gen
is executed without any arguments, a summary of
usage is written.
-A <type>
can be one of the following:
+A <type>
can be one of the following:
-Optional
@@ -89,34 +89,35 @@ A <type>
can be one of the following:signed 64-bit integers- + f16 [<num>]
f16 [<num>]
one or more 16-bit half-precision floating-point values- + f32 [<num>]
f32 [<num>]
one or more 32-bit single-precision floating-point values- + f64 [<num>]
f64 [<num>]
one or more 64-bit double-precision floating-point values- + extF80 [<num>]
extF80 [<num>]
one or more 80-bit double-extended-precision floating-point values- + f128 [<num>]
f128 [<num>]
one or more 128-bit quadruple-precision floating-point values
<num>
is one of 1, 2, <type>
is given without <num>
(such
-as ui32
or f64
), testfloat_gen
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 <num>
is one of 1, 2, <type>
is given without
+<num>
(such as ui32
or
+f64
), testfloat_gen
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
f32
2
extF80
1
testfloat_gen
@@ -129,12 +130,12 @@ operations, to the degree explained in
-If a <function>
operation name is given, then each line of
-output from testfloat_gen
contains not only the operands for that
-operation (as would be generated by an appropriate <type>
-argument) but also the expected results as determined by
-testfloat_gen
’s internal floating-point emulation
-(Berkeley SoftFloat).
+If a <function>
operation name is given, then each
+line of output from testfloat_gen
contains not only the operands
+for that operation (as would be generated by an appropriate
+<type>
argument) but also the expected results as
+determined by testfloat_gen
’s internal floating-point
+emulation (Berkeley SoftFloat).
The available operation names are listed in
TestFloat-general.html
-help
option causes a summary of program usage to be written,
after which the program exits.
-prefix <text>
-prefix <text>
The -prefix
option causes testfloat_gen
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.
-seed <num>
-seed <num>
The -seed
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
-level <num>
-level <num>
The -level
option sets the level of testing.
@@ -197,13 +198,14 @@ The default is
-n <num>
-n <num>
Option -n
specifies the number of test cases to generate.
-For each <type>
or <function>
and each
-testing level (set by -level
), there is a minimum value that
-testfloat_gen
will accept for <num>
.
+For each <type>
or
+<function>
and each testing level (set by
+-level
), there is a minimum value that testfloat_gen
+will accept for <num>
.
If no -n
option is given, the number of test cases generated by
testfloat_gen
equals the minimum value acceptable for the
-n
argument.
@@ -223,7 +225,7 @@ The testing level is set to 2 by this option.
-precision32, -precision64, -precision80
-When a <function>
is specified that is an
+When a <function>
is specified that is an
-precision32
option sets the rounding
precision to -precision80
.
-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax
-rnear_even, -rnear_maxMag, -rminMag, -rmin, -rmax, -rodd
-When a <function>
is specified that requires rounding, the
--rnear_even
option sets the rounding mode to nearest/even;
+When a <function>
is specified that requires
+rounding, the -rnear_even
option sets the rounding mode to
+nearest/even;
-rnear_maxMag
sets rounding to nearest/maximum magnitude
(nearest-away);
-rminMag
sets rounding to minimum magnitude (toward zero);
-rmin
sets rounding to minimum (down, toward negative infinity);
-and -rmax
sets rounding to maximum (up, toward positive infinity).
+-rmax
sets rounding to maximum (up, toward positive infinity);
+and -rodd
, 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 -rnear_even
.
@@ -256,10 +260,10 @@ nearest/even, same as -rnear_even
.
-tininessbefore, -tininessafter
-When a <function>
is specified that requires rounding, the
--tininessbefore
option indicates that tininess on underflow will
-be detected before rounding, while -tininessafter
indicates that
-tininess on underflow will be detected after rounding.
+When a <function>
is specified that requires
+rounding, the -tininessbefore
option indicates that tininess on
+underflow will be detected before rounding, while -tininessafter
+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
-notexact, -exact
-When a <function>
is specified that rounds to an integer
-(either conversion to an integer type or a roundToInt
operation),
-the -notexact
option indicates that the inexact exception
-flag is never raised, while -exact
indicates that the
+When a <function>
is specified that rounds to an
+integer (either conversion to an integer type or a roundToInt
+operation), the -notexact
option indicates that the inexact
+exception flag is never raised, while -exact
indicates that the
inexact 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 inexact
@@ -286,8 +290,8 @@ exception flag when rounding to an integer, same as -notexact
.
For each test case generated, testfloat_gen
writes a single line
of text to standard output.
When the testfloat_gen
command is given a
-<type>
argument, each test case consists of either one
-integer value or one, two, or three floating-point values.
+<type>
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.
-When testfloat_gen
is given a <function>
+When testfloat_gen
is given a <function>
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.
--
cgit v1.1