ChangeLog for ieeefp-ext.c OBSOLETE as of December 24, 2020. Code moved into floating-ext.c and fpaux-ext.c Unattributed changes are by David N. Williams. Last revision dates in source files may reflect cosmetic changes not recorded here. Version 0.6.2 28Aug20 * Revised hexdouble union with ABI_32 and ABI_64 conditionals to get the special constants to work for 64 bits. Updated machine language flag control to the same scheme. * Added FH., (name borrowed from Peter Falth, c.l.f.), for exactly reproducible hex fp output. A simple mod of the code for F. by changing the format option in the p4_outf wrapper for vsprintf to ".a ", and dropping the PRECISION argument. 29Aug20 * Added >IEEEFLOAT, by copying a conditional branch in PFE's >FLOAT, based on sscanf, which gets turned off in our builds with -DUSE_SSCANF=0. Accepts the special constants, and hex fp format as well as other useful decimal formats. 30Aug20 * Added 64-bit Andrew Haley version of NEXTUP. * Added FDENORMALOPERAND flag, conditional on DEFINED_INTEL, with temporary throw code -55, "floating-point unidentified fault". 31Aug20 * Testing under Linxu Mint finds FDENORMALOPERAND not implemented. Made it conditional on !defined __linux__. 02Sep20 * Renamed FEGETROUND and FESETROUND as GET-FROUND and SET-FROUND. 04Sep20 * Renamed: old new FE_TONEAREST FR-TONEAREST FE_UPWARD FR-UPWARD FE_DOWNWARD FR-DOWNWARD FE_TOWARDZERO FR-TOWARDZERO 08Sep20 * Renamed FDENORMALOPERAND as FDENORMOPAND. 24Dec20 * Log retired. Partially merged into floating-ext.c, with a new module in fpaux-ext.c for the environment, rounding, and exception parts. Version 0.6.0 19Aug20 * Revised 2 casts get machine code for fp flag control registers to work with current gcc for macOS and Linux Mint 64-bit systems. Version 0.5.5 23Sep09 * New version to incorporate wisdom from fe-handling-example.c, which turns out to be a godsend. 24Sep09 * Added FPSCR@ and FPSCR! to ieee-fp-ext.c, and redid the LINUX switch logic like fe-handling-example.c. 26Sep09 * Worked on longjmp() fenv clobbering in pfe. 27Sep09 * Mostly fixed it, with the help of fegetenv() and fesetenv(). To compile on Linux, had to modify pfe build to use libm. Did that with CFLAGS. 28Sep09 * Revised fhdl() to use the guts of FCode (p4_execute) from core-ext.c. * Handler gets uninstalled on OS X by ABORT. Not on Linux. * Terry Lambert from the darwin-dev list says that sigaction() is fixed in Snow Leopard, which is intel, but ppc was already okay. 29Sep09 * Fixed some names. Updated ieeefp-ext.h. The fp environment words seem only indirectly useful for Forth. The fenv_t structure they use is entirely opaque. One might use them to make copies of special environments for easy restoration. * Revised FEGETROUND and FESETROUND to give a fatal error if rounding mode can't be got or set. * Made INSTALL-FHANDLING initialize the xt. 30Sep09 * Figured out how to set the default xt. * Problem compiling on Linux, whereas fe-handling-example.c works fine. Some kind of behind the scenes include. Explicitly including ucontext.h fixes it. 1Oct09 * Renamed register versions of FENABLE and FDISABLE as (FENABLE) and (FDISABLE), then implemented FENABLE and FDISABLE to be the same as FEENABLEEXCEPT and FEDISABLEEXCEPT with dropped output. * Revised FENABLE and FDISABLE to clear all flags first. 2Oct09 * Added fatal errors to SET-FFLAGS and CLEAR-FFLAGS. Assumes POSIX compliance. * Added: +INF -INF +NAN -NAN FCEIL FNEARBYINT NEXTUP FNEXTDOWN * Started ieeefp-ext-test.fs for regressions tests. It contains its own log. 4Oct09 * Added X87SR@. * Renamed FEGETEXCEPT as FENABLED. 23Jun10 * Replaced LINUX by __linux__. 25Jun10 * Deleted erroneous statement that INSTALL-FHANDLING is in the ENVIRONMENT word set. Version 0.5.4 1Sep09 * Started alternate handling code. 9Sep09 * Experimented with FENABLE-ALL SET-FDIAGNOSTIC. Problems with longjmp() fp state clobbering. 10Sep09 * Got hard-wired handler to work. 12Sep09 * Got vectored handler to work with p4_call(xt) and a system variable. 13Sep09 * Tried to make named deferred word for the vector, but missing carnal knowledge of pfe. Instead kept system variable with GET-FHANDLER, SET-FHANDLER. 17Sep09 * Works pretty well for ppc. Experiments with simple words to check fpu control/status registers for intel. Learned that gcc uses SIMD. 19Sep09 * Learned that OS X intel fenv_t interfaces to x87 control/status and MSCSR. Linux is somewhat similar. 20Sep09 * Implementing gclib fegetexcxept(), feenableexcept(), and fedisableexcept(). Present on GNU/Linux, not OS X Leopard. Doing it first in generic fe-handling-example.c. * Couldn't find unambiguous linux switch in pfe. Have to compile with -DLINUX. * Finished coding intel version. 21Sep09 * Tests work, but 1e 0e f/ on OS X intel gives -55 throw code, because sigaction() handler receives SIGFPE FPE_NOOP. 22Sep09 * Learned that sigset_t is a structure on Linux, not an unsigned int, with 128 bytes, and how to initialize one with sigemptyset(). * Linker on Linux can't find fegetexcept() or feenableexcept(). Have to link with libm there. * Linux fenv_t is silent about SIMD MXCSR, so it's good to have the functions above in libm. Version 0.5.3 29May09 * Started revision to implement the new IEEE-FP proposal. 18May09 * Forked from fpieee-ext.c into a new file, named ieeefp-ext.c. Version 0.5.2 6Nov05 * Added caching of the rounding mode to circumvent longjmp() clobbering in the inner interpreter. 7Nov05 * Revised comments for FEGETROUND and FESETROUND to conform with Single UNIX 3. Version 0.5.1 29Aug05 * Changed return for SIGNBIT to an ANS Forth flag instead of a bit. Version 0.5.0 21Jan05 * Start. 26Jan05 * Dereference bug in FESETEXCEPTFLAG. Realized there will be a problem if TOS is ever a register. 27Jan05 * Added floating-point auxilliary functions and constants (not all). Seem to have found a darwin bug in ilogb() vs. FP_ILOGB0 and FP_ILOGBNAN. Also Harbison and Steele say FP_ILOGB instead of FP_ILOGB0. 1Feb05 * Added FLOATING-EXT autoload, since the functions here use the floating point stack and numbers. 3Feb05 * Added P4_INTO ("EXTENSIONS", 0). 21Feb05 * Added MODF, MODFD. Added FEXP2, FLOG2 in the new elementary functions section, which should eventually go in some other module. 22Feb05 * Added new elementary functions FCBRT, FMA, FDIM, FERF, FERFC, FGAMMA, FLNGAMMA. 23Feb05 * Changed FMA to F*+, and changed stack effect. 13May05 * Decided not to add the nonraising fp comparisons, because they seem of marginal use, and ordinary comparisons don't raise an exception anyway in our system.