Home | History | Annotate | only in /src/lib/libc/gdtoa/test
Up to higher level directory
NameDateSize
d.out19-Mar-201127.5K
dd.out19-Mar-201140K
ddsi.out19-Mar-201110K
ddtest.c19-Mar-20114.9K
dI.out19-Mar-20114.3K
dIsi.out19-Mar-20114.2K
dItest.c19-Mar-20112.3K
dt.c19-Mar-20116.6K
dtest.c19-Mar-20114K
dtst.out19-Mar-201123.2K
f.out19-Mar-201121K
ftest.c19-Mar-20113.9K
getround.c19-Mar-20112.4K
makefile20-Mar-20115.8K
obad/09-Nov-2022
pfLqtestnos19-Mar-201199
pftest.c19-Mar-20113.4K
pftestLq.out19-Mar-2011845
pftestnos19-Mar-2011101
pftestQ.out19-Mar-2011830
pftestx.out19-Mar-2011788
Q.ou019-Mar-201128.1K
Q.ou119-Mar-201138.6K
Qtest.c20-Mar-20115K
README16-Sep-20213.3K
rtestnos19-Mar-2011336
strtodISI.c19-Mar-201149
strtodt.c19-Mar-20113.3K
strtoIddSI.c19-Mar-201150
strtoIdSI.c19-Mar-201149
strtopddSI.c19-Mar-201150
strtorddSI.c19-Mar-201150
testnos19-Mar-2011485
testnos119-Mar-2011294
testnos319-Mar-201114.1K
x.ou019-Mar-201124.8K
x.ou119-Mar-201133.8K
xL.ou019-Mar-201125.7K
xL.ou119-Mar-201136.3K
xLtest.c20-Mar-20114.8K
xQtest.c19-Mar-20111.9K
xsum0.out19-Mar-2011924
xtest.c20-Mar-20114.7K

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 To get correct results on Intel (x86) systems, the rounding precision
     59 must be set to 53 bits.  This can be done, e.g., by invoking
     60 fpinit_ASL(), whose source appears in
     61 http://www.netlib.org/ampl/solvers/fpinit.c .
     62 
     63 The obad directory shows results expected on (at least some) Intel x86
     64 Linux systems and may not be relevant to other systems.
     65 
     66 You can optionally compile getround.c with -DHonor_FLT_ROUNDS
     67 to manually test strtof, strtod, etc., using fegetround().
     68 You can also or alternatively compile getround.c with
     69 -DUSE_MY_LOCALE (when ../gdtoa.a is compiled with -DUSE_LOCALE)
     70 to test multi-byte decimal points.
     71 
     72 If in the parent directory, you have successfully invoked "make Printf"
     73 to add a "printf" (called Printf and accessed via ../stdio1.h), then
     74 here you can use "make pf_test" and (if you have both a 64-bit long
     75 double and a 113-bit "quad" double type) "make pf_testLq" for a brief
     76 test of %g and %a variants in Printf.
     77 
     78 These are simple test programs, not meant for exhaustive testing,
     79 but for manually testing "interesting" cases.  Paxson's testbase
     80 is good for more exhaustive testing, in part with random inputs.
     81 See ftp://ftp.ee.lbl.gov/testbase-report.ps.Z .
     82