|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 19-Apr-2023 | - |
| obad/ | H | 08-May-2022 | - | 1,468 | 1,066 |
| Q.ou0 | H A D | 08-May-2022 | 28.1 KiB | 1,181 | 780 |
| Q.ou1 | H A D | 08-May-2022 | 38.6 KiB | 1,469 | 1,068 |
| Qtest.c | H A D | 08-May-2022 | 5 KiB | 179 | 117 |
| README | H A D | 08-May-2022 | 3.3 KiB | 82 | 64 |
| d.out | H A D | 08-May-2022 | 27.5 KiB | 987 | 686 |
| dI.out | H A D | 08-May-2022 | 4.3 KiB | 169 | 112 |
| dIsi.out | H A D | 08-May-2022 | 4.2 KiB | 169 | 112 |
| dItest.c | H A D | 08-May-2022 | 2.3 KiB | 83 | 44 |
| dd.out | H A D | 08-May-2022 | 40 KiB | 1,357 | 1,056 |
| ddsi.out | H A D | 08-May-2022 | 10 KiB | 377 | 292 |
| ddtest.c | H A D | 08-May-2022 | 4.9 KiB | 178 | 119 |
| dt.c | H A D | 08-May-2022 | 6.6 KiB | 292 | 232 |
| dtest.c | H A D | 08-May-2022 | 4 KiB | 140 | 83 |
| dtst.out | H A D | 08-May-2022 | 23.2 KiB | 685 | 684 |
| f.out | H A D | 08-May-2022 | 21 KiB | 989 | 688 |
| ftest.c | H A D | 08-May-2022 | 3.9 KiB | 141 | 84 |
| getround.c | H A D | 08-May-2022 | 2.4 KiB | 91 | 52 |
| makefile | H A D | 08-May-2022 | 5.8 KiB | 170 | 100 |
| pfLqtestnos | H A D | 08-May-2022 | 99 | 14 | 13 |
| pftest.c | H A D | 08-May-2022 | 3.4 KiB | 159 | 130 |
| pftestLq.out | H A D | 08-May-2022 | 845 | 14 | 13 |
| pftestQ.out | H A D | 08-May-2022 | 830 | 16 | 15 |
| pftestnos | H A D | 08-May-2022 | 101 | 16 | 15 |
| pftestx.out | H A D | 08-May-2022 | 788 | 16 | 15 |
| rtestnos | H A D | 08-May-2022 | 336 | 77 | 76 |
| strtoIdSI.c | H A D | 08-May-2022 | 49 | 3 | 2 |
| strtoIddSI.c | H A D | 08-May-2022 | 50 | 3 | 2 |
| strtodISI.c | H A D | 08-May-2022 | 49 | 3 | 2 |
| strtodt.c | H A D | 08-May-2022 | 3.3 KiB | 139 | 84 |
| strtopddSI.c | H A D | 08-May-2022 | 50 | 3 | 2 |
| strtorddSI.c | H A D | 08-May-2022 | 50 | 3 | 2 |
| testnos | H A D | 08-May-2022 | 485 | 29 | 28 |
| testnos1 | H A D | 08-May-2022 | 294 | 21 | 20 |
| testnos3 | H A D | 08-May-2022 | 14.1 KiB | 353 | 349 |
| x.ou0 | H A D | 08-May-2022 | 24.8 KiB | 1,183 | 782 |
| x.ou1 | H A D | 08-May-2022 | 33.8 KiB | 1,461 | 1,060 |
| xL.ou0 | H A D | 08-May-2022 | 25.7 KiB | 1,183 | 782 |
| xL.ou1 | H A D | 08-May-2022 | 36.3 KiB | 1,463 | 1,062 |
| xLtest.c | H A D | 08-May-2022 | 4.8 KiB | 170 | 107 |
| xQtest.c | H A D | 08-May-2022 | 1.9 KiB | 59 | 29 |
| xsum0.out | H A D | 08-May-2022 | 924 | 42 | 41 |
| xtest.c | H A D | 08-May-2022 | 4.7 KiB | 171 | 111 |
README
1This directory contains source for several test programs:
2
3dt is for conversion to/from double; it permits input of pairs of
432-bit hex integers as #hhhhhhhh hhhhhhhh (i.e., the initial '#'
5indicates hex input). No initial # ==> decimal input.
6After the input number is an optional : mode ndigits
7(colon, and decimal integers for parameters "mode" and "ndigits"
8to gdtoa).
9
10Qtest, 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
21They're all similar, except for the precision. They test both
22directed roundings and interval input (the strtoI* routines).
23Lines that begin with "r" specify or interrogate the desired rounding
24direction:
25
26 0 = toward 0
27 1 = nearest (default)
28 2 = toward +Infinity
29 3 = toward -Infinity
30
31These are the FPI_Round_* values in gdota.h. The "r" value is sticky:
32it stays in effect til changed. To change the value, give a line that
33starts with r followed by 0, 1, 2, or 3. To check the value, give "r"
34by itself.
35
36Lines that begin with n followed by a number specify the ndig
37argument for subsequent calls to the relevant g_*fmt routine.
38
39Lines that start with # followed by the appropriate number of
40hexadecimal strings (see the comments) give the big-endian
41internal representation of the desired number.
42
43When routines Qtest, xLtest, and xtest are used on machines whose
44long double is of type "quad" (for Qtest) or "extended" (for x*test),
45they try to print with %Lg as another way to show binary values.
46
47Program ddtest also accepts (white-space separated) pairs of decimal
48input numbers; it converts both with strtod and feeds the result
49to g_ddfmt.
50
51Program dItest exercises strtodI and strtoId.
52
53Programs dItestsi and ddtestsi are for testing the sudden-underflow
54logic (on double and double-double conversions).
55
56Program strtodt tests strtod on some hard cases (in file testnos3)
57posted by Fred Tydeman to comp.arch.arithmetic on 26 Feb. 1996.
58To get correct results on Intel (x86) systems, the rounding precision
59must be set to 53 bits. This can be done, e.g., by invoking
60fpinit_ASL(), whose source appears in
61http://www.netlib.org/ampl/solvers/fpinit.c .
62
63The obad directory shows results expected on (at least some) Intel x86
64Linux systems and may not be relevant to other systems.
65
66You can optionally compile getround.c with -DHonor_FLT_ROUNDS
67to manually test strtof, strtod, etc., using fegetround().
68You can also or alternatively compile getround.c with
69-DUSE_MY_LOCALE (when ../gdtoa.a is compiled with -DUSE_LOCALE)
70to test multi-byte decimal points.
71
72If in the parent directory, you have successfully invoked "make Printf"
73to add a "printf" (called Printf and accessed via ../stdio1.h), then
74here you can use "make pf_test" and (if you have both a 64-bit long
75double and a 113-bit "quad" double type) "make pf_testLq" for a brief
76test of %g and %a variants in Printf.
77
78These are simple test programs, not meant for exhaustive testing,
79but for manually testing "interesting" cases. Paxson's testbase
80is good for more exhaustive testing, in part with random inputs.
81See ftp://ftp.ee.lbl.gov/testbase-report.ps.Z .
82