Welcome to iraf.net Sunday, May 19 2024 @ 06:17 PM GMT
Anonymous: Guest |
03/21/1990 03:46AM (Read 258 times)
|
|
|
|
[I am copying this to the sites mail as the note on how the 386i does
[floating point computation is of general interest.]I checked out the 386i bug. It is a simple compiler optimization bug.
In ap_pratio, the statement signal = asumr (array, nx * ny) - sky * nx * nyis being compiled incorrectly. Execution of the incorrect code for this
statement causes a stack underflow in the 80387 floating point coprocessor
(the 80387 is rather novel in that it uses a RPN stack to evaluate floating
point expressions!). Evidently, this underflow merely causes a bit to be
set in the coprocessor status register and the main processor does not
discover the error and generate an exception until the next floating point
instruction is executed, in asumr, although the bad code is actually in
ap_pratio.We could put this file on the special file list for SUN-386i/IRAF, but the
following change makes the code more readable and avoids the compiler bug
in the process: npix = nx * ny
signal = asumr (array, npix) - sky * npix
|
|
|
|
| |
|