[NLUUG]   Welcome to ftp.vim.org,
Hosted by ftp.nluug.nl
Current directory: /ftp/pub/NetBSD/NetBSD-release-10/src/lib/libc/gdtoa/test/
Contents of README:
This directory contains source for several test programs:

dt is for conversion to/from double; it permits input of pairs of
32-bit hex integers as #hhhhhhhh hhhhhhhh (i.e., the initial '#'
indicates hex input).  No initial # ==> decimal input.
After the input number is an optional : mode ndigits
(colon, and decimal integers for parameters "mode" and "ndigits"
to gdtoa).

Qtest, ddtest, dtest, ftest, xLtest and xtest are for conversion to/from

	f	IEEE single precision
	d	IEEE double precision
	xL	IEEE extended precision, as on Motorola 680x0 chips
	x	IEEE extended precision, as on Intel 80x87 chips or
			software emulation of Motorola 680x0 chips
	Q	quad precision, as on Sun Sparc chips
	dd	double double, pairs of IEEE double numbers
		whose sum is the desired value

They're all similar, except for the precision.  They test both
directed roundings and interval input (the strtoI* routines).
Lines that begin with "r" specify or interrogate the desired rounding
direction:

	0 = toward 0
	1 = nearest (default)
	2 = toward +Infinity
	3 = toward -Infinity

These are the FPI_Round_* values in gdota.h.  The "r" value is sticky:
it stays in effect til changed.  To change the value, give a line that
starts with r followed by 0, 1, 2, or 3.  To check the value, give "r"
by itself.

Lines that begin with n followed by a number specify the ndig
argument for subsequent calls to the relevant g_*fmt routine.

Lines that start with # followed by the appropriate number of
hexadecimal strings (see the comments) give the big-endian
internal representation of the desired number.

When routines Qtest, xLtest, and xtest are used on machines whose
long double is of type "quad" (for Qtest) or "extended" (for x*test),
they try to print with %Lg as another way to show binary values.

Program ddtest also accepts (white-space separated) pairs of decimal
input numbers; it converts both with strtod and feeds the result
to g_ddfmt.

Program dItest exercises strtodI and strtoId.

Programs dItestsi and ddtestsi are for testing the sudden-underflow
logic (on double and double-double conversions).

Program strtodt tests strtod on some hard cases (in file testnos3)
posted by Fred Tydeman to comp.arch.arithmetic on 26 Feb. 1996.
To get correct results on Intel (x86) systems, the rounding precision
must be set to 53 bits.  This can be done, e.g., by invoking
fpinit_ASL(), whose source appears in
http://www.netlib.org/ampl/solvers/fpinit.c .

The obad directory shows results expected on (at least some) Intel x86
Linux systems and may not be relevant to other systems.

You can optionally compile getround.c with -DHonor_FLT_ROUNDS
to manually test strtof, strtod, etc., using fegetround().
You can also or alternatively compile getround.c with
-DUSE_MY_LOCALE (when ../gdtoa.a is compiled with -DUSE_LOCALE)
to test multi-byte decimal points.

If in the parent directory, you have successfully invoked "make Printf"
to add a "printf" (called Printf and accessed via ../stdio1.h), then
here you can use "make pf_test" and (if you have both a 64-bit long
double and a 113-bit "quad" double type) "make pf_testLq" for a brief
test of %g and %a variants in Printf.

These are simple test programs, not meant for exhaustive testing,
but for manually testing "interesting" cases.  Paxson's testbase
is good for more exhaustive testing, in part with random inputs.
See ftp://ftp.ee.lbl.gov/testbase-report.ps.Z .

Icon  Name                                                  Last modified      Size  
[DIR] Parent Directory - [DIR] CVS/ 17-Dec-2022 21:37 - [DIR] obad/ 17-Dec-2022 21:35 - [   ] Q.ou0 19-Mar-2011 17:26 28K [   ] Q.ou1 19-Mar-2011 17:26 39K [TXT] Qtest.c 21-Mar-2011 00:15 5.0K [TXT] README 16-Sep-2021 23:29 3.3K [   ] d.out 19-Mar-2011 17:26 27K [   ] dI.out 19-Mar-2011 17:26 4.3K [   ] dIsi.out 19-Mar-2011 17:26 4.2K [TXT] dItest.c 19-Mar-2011 17:26 2.3K [   ] dd.out 19-Mar-2011 17:26 40K [   ] ddsi.out 19-Mar-2011 17:26 10K [TXT] ddtest.c 19-Mar-2011 17:26 4.9K [TXT] dt.c 19-Mar-2011 17:26 6.6K [TXT] dtest.c 19-Mar-2011 17:26 4.0K [   ] dtst.out 19-Mar-2011 17:26 23K [   ] f.out 19-Mar-2011 17:26 21K [TXT] ftest.c 19-Mar-2011 17:26 3.9K [TXT] getround.c 19-Mar-2011 17:26 2.4K [TXT] makefile 21-Mar-2011 00:15 5.8K [   ] pfLqtestnos 19-Mar-2011 17:26 99 [TXT] pftest.c 19-Mar-2011 17:26 3.4K [   ] pftestLq.out 19-Mar-2011 17:26 845 [   ] pftestQ.out 19-Mar-2011 17:26 830 [   ] pftestnos 19-Mar-2011 17:26 101 [   ] pftestx.out 19-Mar-2011 17:26 788 [   ] rtestnos 19-Mar-2011 17:26 336 [TXT] strtoIdSI.c 19-Mar-2011 17:26 49 [TXT] strtoIddSI.c 19-Mar-2011 17:26 50 [TXT] strtodISI.c 19-Mar-2011 17:26 49 [TXT] strtodt.c 19-Mar-2011 17:26 3.3K [TXT] strtopddSI.c 19-Mar-2011 17:26 50 [TXT] strtorddSI.c 19-Mar-2011 17:26 50 [   ] testnos 19-Mar-2011 17:26 485 [   ] testnos1 19-Mar-2011 17:26 294 [   ] testnos3 19-Mar-2011 17:26 14K [   ] x.ou0 19-Mar-2011 17:26 25K [   ] x.ou1 19-Mar-2011 17:26 34K [   ] xL.ou0 19-Mar-2011 17:26 26K [TXT] xL.ou1 19-Mar-2011 17:26 36K [TXT] xLtest.c 21-Mar-2011 00:15 4.8K [TXT] xQtest.c 19-Mar-2011 17:26 1.9K [   ] xsum0.out 19-Mar-2011 17:26 924 [TXT] xtest.c 21-Mar-2011 00:15 4.7K

NLUUG - Open Systems. Open Standards
Become a member and get discounts on conferences and more, see the NLUUG website!