Mail Archives: djgpp/1993/12/16/10:08:58
In go32/npx.asm the invalid operation bit is cleared in the NPX
control word. This means that 0.0/0.0 will give an exception. Since we
don't have signal(), there is no easy way to trap this exception in
the program. I would suggest, to initialize the control word in
npx.asm to 0x137f, which yields correct rounding and best precision
and doesn't give any exceptions. You will get NaNs and Infs as
result instead. Also -- an may be more important -- then the result
of a calculation does not depend on the status of the NPX when the
program is called.
Dieter
- Raw text -