complex number word sets
complex.fs | 06May11 18:52:58EDT | 23K | A revision of Julian V. Noble's complex arithmetic lexicon, with OpenMath principal expressions for inverse functions. Included in the FSL as Algorithm #60. |
complex-kahan.fs | 12Dec10 16:53:15EST | 34K | Another revision that uses William Kahan's extended accuracy algorithms. |
complex-kahan.log | 12Dec10 16:52:50EST | 5.8K | Change log for complex-kahan.fs. |
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 complex-test-xf.fs |
24Dec10 07:44:57EST 06May11 18:49:14EDT |
27K 28K |
Formal correctness tests for complex.fs, complex-kahan.fs, and pfe's COMPLEX-EXT environment. Here complex-test uses ttester.fs, and is included as an auxiliary file in the FSL, while complex-test-xf uses ttester-xf and supporting files in ttester-xf.zip. |
complex-ieee-test.fs complex-ieee-test-xf.fs |
30Nov10 18:05:30EST 12Dec10 17:05:29EST |
28K 29K |
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. Here complex-ieee-test uses ttester.fs, while complex-ieee-test-xf uses ztester, and ttester-xf and supporting files in ttester-xf.zip. |
ztester.fs ztester-test.fs |
06Dec10 14:50:34EST 10Dec10 11:00:18EST |
9.3K 11K |
Tester for complex numbers on the fp stack, and tests for itself. The tester requires a complex number library such as complex.fs, complex-kahan.fs, and pfe's COMPLEX-EXT environment, plus ttester-xf; and the tests require ttester-xf and supporting files in ttester-xf.zip. td> |
lagroots-test.fs lagroots.zip |
30Nov10 16:05:36EST 02Dec10 12:50:04EST |
14K 33K |
Tests using ttester-xf for Julian Noble's Forth Scientific Library Algorithm 61, the Laguerre algorithm for complex polynomial roots. The .zip file includes the algorithm, tests, and all files necessary to run them. |
ftester-old.fs | 07Nov10 10:03:09EST | 5.8K | Obsolete, functionality absorbed into ttester. |
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 | 11Jan09 09:56:54EST | 45K | The plots as pdf. |
borda.fs | 11Jan09 08:58:32EST | 6.7K | ANSForth source for the plot data. |
borda.tar.gz | 11Jan09 09:57:30EST | 51K | 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.