]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/gdtoa/test/README
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / gdtoa / test / README
1 This directory contains source for several test programs:
2
3 dt is for conversion to/from double; it permits input of pairs of
4 32-bit hex integers as #hhhhhhhh hhhhhhhh (i.e., the initial '#'
5 indicates hex input).  No initial # ==> decimal input.
6 After the input number is an optional : mode ndigits
7 (colon, and decimal integers for parameters "mode" and "ndigits"
8 to gdtoa).
9
10 Qtest, ddtest, dtest, ftest, xLtest and xtest are for conversion to/from
11
12         f       IEEE single precision
13         d       IEEE double precision
14         xL      IEEE extended precision, as on Motorola 680x0 chips
15         x       IEEE extended precision, as on Intel 80x87 chips or
16                         software emulation of Motorola 680x0 chips
17         Q       quad precision, as on Sun Sparc chips
18         dd      double double, pairs of IEEE double numbers
19                 whose sum is the desired value
20
21 They're all similar, except for the precision.  They test both
22 directed roundings and interval input (the strtoI* routines).
23 Lines that begin with "r" specify or interrogate the desired rounding
24 direction:
25
26         0 = toward 0
27         1 = nearest (default)
28         2 = toward +Infinity
29         3 = toward -Infinity
30
31 These are the FPI_Round_* values in gdota.h.  The "r" value is sticky:
32 it stays in effect til changed.  To change the value, give a line that
33 starts with r followed by 0, 1, 2, or 3.  To check the value, give "r"
34 by itself.
35
36 Lines that begin with n followed by a number specify the ndig
37 argument for subsequent calls to the relevant g_*fmt routine.
38
39 Lines that start with # followed by the appropriate number of
40 hexadecimal strings (see the comments) give the big-endian
41 internal representation of the desired number.
42
43 When routines Qtest, xLtest, and xtest are used on machines whose
44 long double is of type "quad" (for Qtest) or "extended" (for x*test),
45 they try to print with %Lg as another way to show binary values.
46
47 Program ddtest also accepts (white-space separated) pairs of decimal
48 input numbers; it converts both with strtod and feeds the result
49 to g_ddfmt.
50
51 Program dItest exercises strtodI and strtoId.
52
53 Programs dItestsi and ddtestsi are for testing the sudden-underflow
54 logic (on double and double-double conversions).
55
56 Program strtodt tests strtod on some hard cases (in file testnos3)
57 posted by Fred Tydeman to comp.arch.arithmetic on 26 Feb. 1996.
58
59 These are simple test programs, not meant for exhaustive testing,
60 but for manually testing "interesting" cases.  Paxson's testbase
61 is good for more exhaustive testing, in part with random inputs.