ChangeLog for complex-ext.c and complex-ext.h. Unattributed changes are by David N. Williams. Last revision dates in source files may reflect cosmetic changes not recorded here. Unless stated otherwise, all tests are done under MacOS X. Version 0.8.9 6Sep06 * Skipped version 0.8.8, to sync with complex-kahan.fs. * Removed I/, renamed (-I)* as -I*, and renamed minimal mixed ops, with P4_xOLD for old names. 7Oct06 * Fixed some comments for doc autogeneration, removed superfluous _Bool, deprecated Z-ROT with P4_xOLD in favor of -ZROT, and informally tested ZLITERAL. 4Sep08 * Replaced with pfe CVS version, Revision: 1.8, modified 2008/05/25 11:42:39, which Guido updated for changes in pfe. 21Sep10 * Replaced with pfe SVN version. Version 0.8.7 15Jan05 * Changed ZBOX to conserve signs for all cases, contrary to Kahan, p. 198, but in agreement with its use in ARG, p. 199. * Fixed bug in p4_carg(): x and y stack order reversed in ZBOX call when x or y is infinite. 16Jan05 * Replaced in complex-ext.c: _extern double p4_cabs by _export double p4_cabs * Reordered and updated complex-ext.h. 21Jan05 * Added optional calls to C99 elementary functions for comparison of results. 25Jan05 * Reordered exception save in |Z|. 30Jan05 * Found out that R2P1 and T2P1 were inverted! Our tests for |Z| were all perfect, and remain so after the fix! More motivation for a table driven test. 31Jan05 * Understood a discrepancy with complex-kahan.fs as due to compiled x*x + y*y keeping doubles in registers enough to benefit from the G4/PPC guard bit. Did that with a special version of |Z|^2 and -ffloat-store. * We noticed sometime earlier, and confirmed today, that using the MacOS X complex functions in complex.h requires -lmx, whereas fenv.h does not, although it says it does. 15Feb05 * Removed Z=0, etc. Version 0.8.6 5Jan05 * Replaced logical && by bitwise & in the part of ZSQRT that uses p4_cssqs(), which fixes the problem with extreme small numnbers, but not the zelefunt discrepancy in accuracy for nonextreme points. 6Jan05 * Replaced logical || by bitwise | in args of fe calls in p4_cssqs(). This bug seems to have affected efficiency only. The zelefunt discrepancy at nonextreme points remains. 7Jan05 * Put a conditional compilation into ZSQRT, controlled by P4_ZSQRT_USES_CSSQS. When it's zero (the default), ZSQRT compiles with p4_cabs() instead of p4_cssqs(); and the zelefunt discrepancy disappears. Is this a genuine difference in the accuracy of the Kahan algorithms for p4_cssqs() and p4_cabs()? * Incorporated Guido's replacement of P4_VAR by P4_PTR, and "#error no fenv.h". * Removed all cssqs() references in favor of p4_cssqs(). * Incorporated Guido's addition of (int) casts to PRECISION in pfe-0.33.56. 11Jan05 * Removed P4_ZSQRT_USES_CSSQS in favor of explicit "true" for conditional compilation. Can't claim there's really an inaccuracy in Kahan's algorithm for cssqs because it's less than 0.5 ulp, as good as theory guarantees. We'll just trust Kahan on this, and enjoy the better large extreme behavior. * Replaced x & 1 by x % 2 for int oddness test, in case one's complement might be a problem. * Added new names, plan to deprecate the old ones, but for now they're synonyms: New Old --- --- I/ (-I)* ZF* Z*F ZF/ Z/F FZ/ F/Z * Added new words to complete implementation of Kahan's minimal calculation rules: FZ*, IFZ*, IFZ/, ZIF*, ZIF/. * Added tests to complex-test.fs for X+, X-, Y+, Y-, Z*REAL, Z*IMAG, * Fixed wrong number of fstack results for Z*REAL and Z*IMAG revealed by the new tests! Version 0.8.5 7Nov04 * Replaced scalb() by scalbn() in ZSQRT. Had no effect on discrepancy in zsqrt-results.txt. Version 0.8.4 14Apr03 * Reconstruction from source comparison collected under this date. * Added explicit static p4cell p4_dfaligned() and static FCode(p4_d_f_align) to replace external calls. * Replaced autoload attempt by if (! p4_loadm_once ("floating", 8)) p4_outf (" -- load failed: '%.*s'\n", 8, "floating"); in complex_init. This works, but Guido thinks it should be done at the system level, since ELF systems can handle such dependences. 9Sep04 * Fixed mispellings: "CONPLEX" and "Kanah" replaced by "COMPLEX" and "Kahan". 28Nov04 * Removed missing Z*IF and IF*Z and a duplicate Z*F from comments. For completeness, Z*IF, IF*Z, I/Z, IF/Z, and Z/IF should be added. Version 0.8.3 (released around pfe-0.33.28, with edits by Guido) 26Mar03 * Reconstruction from source comparison collected under this date. * Conditional define of fp exception flags when PFE_HAVE_FENV_H not defined. * Added _export for numerical subroutines. * Duplicated mathematical constant #define's from complex-ext.h to complex-ext.c. Actually complex-ext.h is now generated in Guido's distribution. * Changed Z-ROT to -ZROT in glossary documentation. * Renamed p4_z_abs as p4_cabs ,p4_farg as p4_carg, and cssqs as p4_cssqs. * Mispelled, "Kahan" as "Kanah", in ZLN. FIXME!! * Replaced asinh(DBL_MAX)/4 by PFE.asinh_MAX_over_4 and ldexp(sqrt(DBL_MAX),-2) by PFE.sqrt_MAX_over_4. * Added static FCode (complex_init) to initialize the above via P4_XXco ("CONPLEX-INIT", complex_init), and tried to get floating to load automatically. I don't think the autoload worked. (Note mispelling.) * Added p4_z_constant_RT_SEE(). * Fixed code in FCode_RT (p4_z_constant_RT). * Replaced P4RUNTIME1(p4_z_constant, p4_z_constant_RT) by P4RUNTIMES1_(p4_z_constant, p4_z_constant_RT, 0,p4_z_constant_RT_SEE). * Renamed p4_lit_complex_SEE as p4_z_literal_SEE. * Inserted static before FCode (r2p1) and FCode (t2p1). Version 0.8.2 5Mar03 * Added -ZROT as a synonym for Z-ROT. 7Mar03 * Tested |Z| with zabs.fs and found that hypot() is not nearly as good as the Kahan algorithm in complex-kahan.fs 10Mar03 * Started Kahan algorithm for |Z|. 11Mar03 * Finished Kahan algorithm for |Z|. 13Mar03 * Factored out p4_z_abs(), replaced remaining calls to hypot(). Fixed a couple of bugs. Guido has installed complex-* into pfe-0.33.xx. Version 0.8.1 4Mar03 * Finished several days ago. Version number skipped to agree with complex.fs and complex-kahan.fs. Didn't keep a log. Did Kahan code, including the inverse functions. Added signed-zero display in Z. and ZS.. Passes all our tests. Version 0.5.0 6Dec02 * Started port of Julian V. Noble's complex.f. * Wrote nonstandard fp words. Should be moved to floating-mix.c? * Wrote load and store words. 7Dec02 * Wrote stack manipulation words. * Wrote complex algebra words. The policy is to make the code flat for performance, i.e., give each word its own copy of common coding phrases, no subroutines. * Wrote complex functions through Z^N. 8Dec02 * Started debugging words written so far. * Entered and checked some high precision constants. 10Dec02 * Finished coding, except for interpreter hooks. Decided to omit ZASIN, etc., because Noble's high level code seems about as efficient as what we could do in C, at least after ^Forth translation. 11Dec02 * Julian Noble agrees LGPL is okay. 12Dec02 * Wrote ftester.fs and dztest-float.fs. 13Dec02 * Wrote and ran complex-test.fs. Calculated constants, but decided to remove all the extra ones. They're easy for the application to define.