timesoftfloat.txt revision 1.1.4.2 1 1.1.4.2 minoura $NetBSD: timesoftfloat.txt,v 1.1.4.2 2000/06/23 16:18:05 minoura Exp $
2 1.1.4.2 minoura
3 1.1.4.2 minoura Documentation for the `timesoftfloat' Program of SoftFloat Release 2a
4 1.1.4.2 minoura
5 1.1.4.2 minoura John R. Hauser
6 1.1.4.2 minoura 1998 December 14
7 1.1.4.2 minoura
8 1.1.4.2 minoura
9 1.1.4.2 minoura -------------------------------------------------------------------------------
10 1.1.4.2 minoura Introduction
11 1.1.4.2 minoura
12 1.1.4.2 minoura The `timesoftfloat' program evaluates the speed of SoftFloat's floating-
13 1.1.4.2 minoura point routines. Each routine can be evaluated for every relevant rounding
14 1.1.4.2 minoura mode, tininess mode, and/or rounding precision.
15 1.1.4.2 minoura
16 1.1.4.2 minoura
17 1.1.4.2 minoura -------------------------------------------------------------------------------
18 1.1.4.2 minoura Contents
19 1.1.4.2 minoura
20 1.1.4.2 minoura Introduction
21 1.1.4.2 minoura Contents
22 1.1.4.2 minoura Legal Notice
23 1.1.4.2 minoura Executing `timesoftfloat'
24 1.1.4.2 minoura Options
25 1.1.4.2 minoura -help
26 1.1.4.2 minoura -precision32, -precision64, -precision80
27 1.1.4.2 minoura -nearesteven, -tozero, -down, -up
28 1.1.4.2 minoura -tininessbefore, -tininessafter
29 1.1.4.2 minoura Function Sets
30 1.1.4.2 minoura
31 1.1.4.2 minoura
32 1.1.4.2 minoura
33 1.1.4.2 minoura -------------------------------------------------------------------------------
34 1.1.4.2 minoura Legal Notice
35 1.1.4.2 minoura
36 1.1.4.2 minoura The `timesoftfloat' program was written by John R. Hauser.
37 1.1.4.2 minoura
38 1.1.4.2 minoura THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort
39 1.1.4.2 minoura has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
40 1.1.4.2 minoura TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO
41 1.1.4.2 minoura PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
42 1.1.4.2 minoura AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
43 1.1.4.2 minoura
44 1.1.4.2 minoura
45 1.1.4.2 minoura -------------------------------------------------------------------------------
46 1.1.4.2 minoura Executing `timesoftfloat'
47 1.1.4.2 minoura
48 1.1.4.2 minoura The `timesoftfloat' program is intended to be invoked from a command line
49 1.1.4.2 minoura interpreter as follows:
50 1.1.4.2 minoura
51 1.1.4.2 minoura timesoftfloat [<option>...] <function>
52 1.1.4.2 minoura
53 1.1.4.2 minoura Here square brackets ([]) indicate optional items, while angled brackets
54 1.1.4.2 minoura (<>) denote parameters to be filled in. The `<function>' argument is
55 1.1.4.2 minoura the name of the SoftFloat routine to evaluate, such as `float32_add' or
56 1.1.4.2 minoura `float64_to_int32'. The allowed options are detailed in the next section,
57 1.1.4.2 minoura _Options_. If `timesoftfloat' is executed without any arguments, a summary
58 1.1.4.2 minoura of usage is written. It is also possible to evaluate all machine functions
59 1.1.4.2 minoura in a single invocation as explained in the section _Function_Sets_ later in
60 1.1.4.2 minoura this document.
61 1.1.4.2 minoura
62 1.1.4.2 minoura Ordinarily, a function's speed will be evaulated separately for each of
63 1.1.4.2 minoura the four rounding modes, one after the other. If the rounding mode is not
64 1.1.4.2 minoura supposed to have any affect on the results of a function--for instance,
65 1.1.4.2 minoura some operations do not require rounding--only the nearest/even rounding mode
66 1.1.4.2 minoura is timed. In the same way, if a function is affected by the way in which
67 1.1.4.2 minoura underflow tininess is detected, `timesoftfloat' times the function both with
68 1.1.4.2 minoura tininess detected before rounding and after rounding. For extended double-
69 1.1.4.2 minoura precision operations affected by rounding precision control, `timesoftfloat'
70 1.1.4.2 minoura also times the function for all three rounding precision modes, one after
71 1.1.4.2 minoura the other. Evaluation of a function can be limited to a single rounding
72 1.1.4.2 minoura mode, a single tininess mode, and/or a single rounding precision with
73 1.1.4.2 minoura appropriate options (see _Options_).
74 1.1.4.2 minoura
75 1.1.4.2 minoura For each function and mode evaluated, `timesoftfloat' reports the speed of
76 1.1.4.2 minoura the function in kops/s, or ``thousands of operations per second''. This
77 1.1.4.2 minoura unit of measure differs from the traditional MFLOPS (``millions of floating-
78 1.1.4.2 minoura point operations per second'') only in being a factor of 1000 smaller.
79 1.1.4.2 minoura (1000 kops/s is exactly 1 MFLOPS.) Speeds are reported in thousands instead
80 1.1.4.2 minoura of millions because software floating-point often executes at less than
81 1.1.4.2 minoura 1 MFLOPS.
82 1.1.4.2 minoura
83 1.1.4.2 minoura The speeds reported by `timesoftfloat' may be affected somewhat by other
84 1.1.4.2 minoura programs executing at the same time as `timesoftfloat'.
85 1.1.4.2 minoura
86 1.1.4.2 minoura Note that the remainder operations (`float32_rem', `float64_rem',
87 1.1.4.2 minoura `floatx80_rem' and `float128_rem') will be markedly slower than other
88 1.1.4.2 minoura operations, particularly for extended double precision (`floatx80') and
89 1.1.4.2 minoura quadruple precision (`float128'). This is inherent to the remainder
90 1.1.4.2 minoura function itself and is not a failing of the SoftFloat implementation.
91 1.1.4.2 minoura
92 1.1.4.2 minoura
93 1.1.4.2 minoura -------------------------------------------------------------------------------
94 1.1.4.2 minoura Options
95 1.1.4.2 minoura
96 1.1.4.2 minoura The `timesoftfloat' program accepts several command options. If mutually
97 1.1.4.2 minoura contradictory options are given, the last one has priority.
98 1.1.4.2 minoura
99 1.1.4.2 minoura - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
100 1.1.4.2 minoura -help
101 1.1.4.2 minoura
102 1.1.4.2 minoura The `-help' option causes a summary of program usage to be written, after
103 1.1.4.2 minoura which the program exits.
104 1.1.4.2 minoura
105 1.1.4.2 minoura - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
106 1.1.4.2 minoura -precision32, -precision64, -precision80
107 1.1.4.2 minoura
108 1.1.4.2 minoura For extended double-precision functions affected by rounding precision
109 1.1.4.2 minoura control, the `-precision32' option restricts evaluation to only the cases
110 1.1.4.2 minoura in which rounding precision is equivalent to single precision. The other
111 1.1.4.2 minoura rounding precision options are not timed. Likewise, the `-precision64'
112 1.1.4.2 minoura and `-precision80' options fix the rounding precision equivalent to double
113 1.1.4.2 minoura precision or extended double precision, respectively. These options are
114 1.1.4.2 minoura ignored for functions not affected by rounding precision control.
115 1.1.4.2 minoura
116 1.1.4.2 minoura - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
117 1.1.4.2 minoura -nearesteven, -tozero, -down, -up
118 1.1.4.2 minoura
119 1.1.4.2 minoura The `-nearesteven' option restricts evaluation to only the cases in which
120 1.1.4.2 minoura the rounding mode is nearest/even. The other rounding mode options are not
121 1.1.4.2 minoura timed. Likewise, `-tozero' forces rounding to zero; `-down' forces rounding
122 1.1.4.2 minoura down; and `-up' forces rounding up. These options are ignored for functions
123 1.1.4.2 minoura that are exact and thus do not round.
124 1.1.4.2 minoura
125 1.1.4.2 minoura - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
126 1.1.4.2 minoura -tininessbefore, -tininessafter
127 1.1.4.2 minoura
128 1.1.4.2 minoura The `-tininessbefore' option restricts evaluation to only the cases
129 1.1.4.2 minoura detecting underflow tininess before rounding. Tininess after rounding
130 1.1.4.2 minoura is not timed. Likewise, `-tininessafter' forces underflow tininess to be
131 1.1.4.2 minoura detected after rounding only. These options are ignored for functions not
132 1.1.4.2 minoura affected by the way in which underflow tininess is detected.
133 1.1.4.2 minoura
134 1.1.4.2 minoura - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
135 1.1.4.2 minoura
136 1.1.4.2 minoura
137 1.1.4.2 minoura -------------------------------------------------------------------------------
138 1.1.4.2 minoura Function Sets
139 1.1.4.2 minoura
140 1.1.4.2 minoura Just as `timesoftfloat' can test an operation for all four rounding modes in
141 1.1.4.2 minoura sequence, multiple operations can also be tested with a single invocation.
142 1.1.4.2 minoura Three sets are recognized: `-all1', `-all2', and `-all'. The set `-all1'
143 1.1.4.2 minoura comprises all one-operand functions; `-all2' is all two-operand functions;
144 1.1.4.2 minoura and `-all' is all functions. A function set can be used in place of a
145 1.1.4.2 minoura function name in the command line, as in
146 1.1.4.2 minoura
147 1.1.4.2 minoura timesoftfloat [<option>...] -all
148 1.1.4.2 minoura
149 1.1.4.2 minoura
150