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