complex number word sets
| complex.fs complex-words.txt |
24Apr05 19:27:55EDT 24Apr05 19:28:01EDT |
17K 667 |
A revision of Julian V. Noble's complex arithmetic lexicon, with OpenMath principal expressions for inverse functions. |
| complex-kahan.fs complex-kahan-words.txt |
24Apr05 19:28:18EDT 24Apr05 19:28:24EDT |
31K 1.1K |
Another revision that uses William Kahan's extended accuracy algorithms. |
| complex.seq | 19Feb03 14:42:46EST | 7.8K | The basic complex arithmetic lexicon from the Forth Scientific Library. |
| zabs.seq | 19Feb03 14:42:50EST | 6.2K | A subset of complex.seq modified for testing zabs with the celefunt port in zabs.fs below. |
| complex-test.fs | 06Sep06 13:32:42EDT | 24K | Formal correctness tests for complex.fs and complex-kahan.fs, and for a pfe primitive port of the lexicon. |
| complex-ieee-test.fs | 06Sep06 13:21:52EDT | 25K | Additional tests for IEEE 754 signed zero, signed infinity, and NaN properties of the complex functions, including the evaluation of functions having principal branches on either side of their cuts, by using appropriate real or imaginary, signed zero arguments. |
| ftester.fs | 24Apr05 19:26:40EDT | 5.7K | Required by complex-test.fs and complex-ieee-test.fs. |
ports of celefunt tests
The following complex function accuracy tests are ported
from W. J. Cody's celefunt Fortran package.
They all require machar.fs and ren.fs from the
next section, and all but zabs.fs require
zfunstat.fs as well. In the style of the JVN lexicon,
we call the port zelefunt.
These are not intended as models of Forth code; they are
fairly literal translations from Fortran, aimed at allowing
exact comparison of the Fortran and Forth results. This
especially applies to the random number generator
ren.fs. Cody asserts that its algorithm is good enough
for this purpose, while acknowledging its crudeness.
| zabs.fs | 19Jan05 17:40:37EST | 8.9K | |
| zexp.fs | 19Jan05 17:41:05EST | 5.7K | |
| zln.fs | 19Jan05 17:41:16EST | 4.5K | |
| zpow.fs | 19Jan05 17:41:30EST | 5.6K | |
| zsincos.fs | 19Jan05 17:42:53EST | 7.1K | |
| zsqrt.fs | 19Jan05 17:41:59EST | 4.1K | |
| zabs-results.txt | 19Jan05 17:40:42EST | 3.1K | |
| zexp-results.txt | 19Jan05 17:40:57EST | 7.8K | |
| zln-results.txt | 19Jan05 17:41:11EST | 6.8K | |
| zpow-results.txt | 19Jan05 17:41:25EST | 6.8K | |
| zsincos-results.txt | 19Jan05 17:41:45EST | 6.7K | |
| zsqrt-results.txt | 19Jan05 17:41:55EST | 3.8K |
ports of celefunt subprograms
| machar.fs | 09Mar05 08:44:50EST | 15K | |
| ren.fs | 04Dec04 10:17:52EST | 1.6K | |
| zfunstat.fs | 19Jan05 17:40:06EST | 13K |
Borda's mouthpiece
William Kahan uses Borda's mouthpiece as an example where the
proper treatment of signed zero makes a dramatic difference. See
the plots in his article on The Baleful Effect of Computer
Benchmarks. The files below verify correctness for the same
example with any of complex.fs, complex-kahan.fs, or the pfe primitive port
of the complex lexicon, and incorrectness with a g77
version of Fortran.
| borda.html | 04Feb05 15:13:00EST | 2.5K | The plots. |
| borda.pdf | 14Sep07 08:57:08EDT | 45K | The plots as pdf. |
| borda.fs | 13Apr04 13:33:40EDT | 6.5K | ANSForth source for the plot data. |
| borda.tar.gz | 14Sep07 09:02:44EDT | 52K | An archive containing the above two files, Fortran source, and the LaTeX/PSTricks source for borda.pdf, with the UPDL license. |
links
Files in this directory under the GNU LGPL typically have a POLITENESS request.