Archive: forth/utilities

Up to parent directory

primes.fs 30Nov04 13:37:08EST 3.3K A commented version of Eratosthenes' sieve, designed for viewing primes in a range.
byteprimes.fs 30Nov04 13:36:19EST 3.9K The Gilbreath, Byte Magazine version of the above.

ttester and xftester
ttester.fs Anton Ertl's ttester.fs extends the original Hayes tester to floating point, including some ideas from ftester-old.fs, and adds support for an integrated floating point stack. Tests preserve initial stacks. It works on ANS Forth systems with or without floating point, and with or without an integrated stack. Consult the gforth CVS link at left for history and probably the newest version.
ttester-xf.fs 03Feb18 16:41:52EST 21K A revision of ttester restricted to a separate floating-point stack. With some restrictions on the words used, it remains compatible with ttester. It does overflow checking for initial, resultant, and goal stack storage, with configurable limits. Error reporting and approximate equality continue to be vectorized, as with ttester, but with independent error reporting for the two stacks.
03Feb18 16:42:30EST
03Feb18 16:41:03EST
03Feb18 16:41:16EST
These three files are functionally identical to ttester-xf.fs, with xftester.fs a short driver that loads the independent components, xtester.fs and ftester.fs, which test the data and floating-point stacks.
03Feb18 12:50:43EST
03Feb18 12:50:58EST
Test file for ttester-xf.fs or xftester.fs that uses themselves and the color terminal support and enhanced error reporting files below, along with a pdf image of the terminal output.
tester-display.fs 08Feb18 15:06:56EST 5.1K Krishna Myneni's ANSI color terminal support for ttester, ttester-xf, and other test files, with printing words conditional on VERBOSE.
03Feb18 12:51:30EST
03Feb18 12:51:54EST
Enhanced error reporting for tests that use xtester or ftester. Both require tester-display.fs. 08Feb18 15:07:08EST 63K Both the consolidated and separated ttester-xf and xftester testers and components, their tests, and the display and enhanced error files needed to run their tests.

floating point
fslflocals.fs 30Nov04 13:36:37EST 2.2K FSL floating point locals with an alignment fix.
fatan2-test.fs 27Mar09 10:07:32EDT 4.8K Tests whether FATAN2 returns the principal angle, including the ISO C / Special UNIX 3 specification for signed zero, signed infinity, and NaN inputs. Requires ttester.fs
ieee-fprox-test.fs 01Jul09 08:41:48EDT 9.0K Tests whether F~ meets the proposed Forth 200x, IEEE-FP specification for signed zero, infinity, and nan arguments. Requires ttester.fs
ieee-arith-test.fs 02Oct09 18:23:48EDT 7.3K Tests whether basic floating-point arithmetic, except for F*+, meets the proposed Forth 200x, IEEE-FP specification for special arguments. Requires ttester.fs
fnextup.fs 28Jul09 10:49:56EDT 5.7K Contains a reference implementation of the proposed Forth 200x, IEEE-FP FNEXTUP for double precision, due to Andrew Haley. Requires rawfloat.fs, and includes tests that require mixfloat.fs and ttester.fs
fulps.fs 28Jul09 10:50:07EDT 1.7K Compute error in units of reference value ulps. Uses rawfloat.fs and the same FNEXTUP as fnextup.fs. Only for doubles.
ftester-old.fs 07Nov10 10:03:09EST 5.8K John R. Hayes' extended to include a separate floating point stack, with a treatment of approximate equality inspired by Dirk Zoller's float.4th (05Aug93). This has been superceded by ttester.fs and the ftester component of ttester-xf.fs.
dztest-float.fs 30Nov04 13:36:35EST 7.2K Dirk Zoller's float tests rewritten for ftester-old.fs.
23Dec10 08:20:04EST
25Jul09 09:11:44EDT
Convert among IEEE 754-2008 mixed hex/decimal, radix 2 power strings, raw32, raw64, raw80, and raw128 floating-point encodings on the data stack (corresponding to IEEE interchange formats), raw 8-, 16-, 20-, and 32-digit hex strings, and default floats on the floating-point stack. Also store/fetch the raw formats to memory. Works for both big- and little-endian systems, and with or without a separate fp stack. The test program requires ttester.fs.
01Aug09 10:09:01EDT
31Jul09 15:24:47EDT
A small sublibrary of mixfloat.fs which makes the bits of floating-point encodings portably accessible. It converts between raw32, raw64, raw80, and raw128 encodings on the data stack (corresponding to IEEE interchange formats), and default floats on the fp stack. Also stores/fetches the raw formats to/from system memory formats. Works for big- and little-endian systems. The test program requires ttester.fs.
29Jul09 08:12:30EDT
25Jul09 08:42:23EDT
A small sublibrary of mixfloat.fs which converts between raw floating-point hex strings and raw32, raw64, raw80, and raw128 data-stack formats. The test program requires ttester.fs.
hexfloat.fs 23Jul09 08:13:07EDT 36K Replaced by mixfloat.fs. Soon to disappear.
hexfloat-test.fs 23Jul09 08:22:28EDT 28K Replaced by mixfloat-test.fs. Soon to disappear.
rawhex2float.fs 15Mar09 08:21:22EDT 3.2K Convert a raw float hex string to an ANS Forth default float.
plainfarray.fs 08Jun07 17:56:43EDT 4.8K Plain floating point arrays for ANS Forth default floats, with some variation from FSL conventions. The words work with or without a separate float stack.

09Jul10 12:29:16EDT
04Aug10 10:41:29EDT
Structure words, including most of those in the Forth 200x standard. Includes optional explicit (not state smart) early binding. Formerly named plainstruct-200x.fs. Tests require ttester.fs.
qdstruct.fs 30Nov04 13:37:14EST 3.1K Quick and dirty structures.
qdstruct-pfe.fs 30Nov04 13:37:12EST 2.0K Nonstandard word and string fields for quick and dirty structures.
namedstruct.fs 28Aug10 09:51:34EDT 6.8K Named structures with reusable field and method names.
qdnamstruct.fs 30Nov04 13:37:10EST 4.3K Quick and dirty structures with reusable member names.

A modules library compatible with Forth 200x, by Krishna Myneni and David N. Williams. The literate programming source is modular-forth.lyx, and modules.fs and modular-forth.pdf are the generated Forth source and documentation.
modules-test.fs 16Feb12 20:02:51EST 8.7K Tests for modules.fs. They require otester.fs and ttester-xf.fs, plus tester display and error support files. 16Feb12 20:02:55EST 182K All of the above, plus all files needed to run the tests.

search order
16Feb12 20:02:28EST
16Feb12 20:02:28EST
A small extension library based on the Search-Order word set, an anthology of words discussed in comp.lang.forth which emphasizes the role of the search order as a stack. The tests require otester.fs, ttester-xf.fs, and display support files.
03Feb18 16:56:34EST
03Feb18 16:56:33EST
03Feb18 16:56:33EST
Hayes-style tester and enhanced error display support for the search order considered as another stack, plus a tester for the tester. 03Feb18 16:57:19EST 23K All of the above, plus support files needed to run the tests.

tester.fs 04Sep06 10:14:02EDT 1.6K John R. Hayes'
testerplus.fs 04Sep06 10:09:00EDT 2.4K The above file modifed to include Krishna Myneni's color-coded commenting and a count of errors. This is being phased out in favor of ttester-xf.fs plus its enhanced display support files.
recurse-test.fs 19Mar10 11:15:25EDT 5.7K Tests for RECURSE using examples supplied by Bill Muench. Requires ttester.fs
undef.fs 30Nov04 13:37:26EST 729 ANS Forth bootstrap for [UNDEFINED].
lfinput.fs 28Aug06 06:38:40EDT 9.1K Line file parsing analogous to the input stream. Needs either parsing.fs or our pfe external parsing library.
04Aug10 10:21:39EDT
02Aug06 12:18:11EDT
02Aug06 12:08:05EDT
Rudimentary tests for lfinput.fs.
AAma-count.fs 26Apr09 09:33:24EDT 4.5K This utility counts the basic kinds of lines in text source files for Martinus Veltman's Ann Arbor macro assembler, and accumulates totals for successive files. It uses lfinput.fs and part of the mstrings library collection.
aelocals-xl.fs 29Aug08 08:46:46EDT 2.0K Two modifications of Anton Ertl's anslocal.fs that work across lines. Needs parsing.fs and dstrings.fs.
xstacks.fs 25Oct09 09:50:27EDT 8.9K An ANS Forth implementation of the "basic" xstack words in the pfe xstacks loadable module, and of the xstack defining words in xstacks-pfe.fs
xstacks-test.fs 20Dec06 21:16:29EST 5.6K Hayes-type tests for xstacks.fs, with a switch for the pfe implementation of the basic xstacks words. Needs twx.fs
twx.fs 09Sep06 13:41:45EDT 3.5K John Hayes' Forth testing words modified to work with xstacks.
qdexeca-pfe.fs 24Dec04 13:00:02EST 2.1K Defining words for execution arrays, based on pfe primitives in execution-ext.c
sudoku.fs 18Nov05 15:02:14EST 14K Robert Spykerman's Sudoku puzzle solver enhanced to input a full puzzle from the command line or a file.
copyinput.fs 30Nov04 13:36:21EST 5.2K Words to save the input stream across lines up to a terminating string so it can be processed later. Includes a word for extending structures.
sarray.fs 30Mar07 13:03:21EDT 3.4K ANS Forth string arrays.
dstring-array.fs 30Mar07 10:35:29EDT 3.6K Dynamic string arrays.
mkindexfile.fs 08Nov06 17:37:46EST 11K Write a index.html file for this archive from user input.

Up to top of archive

Files in this directory under the GNU LGPL typically have a POLITENESS request.