www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/12/16/11:08:59

Date: Thu, 16 Dec 93 16:09:38 +0100
From: buers AT dg1 DOT chemie DOT uni-konstanz DOT de (Dieter Buerssner)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: suggestion for NPX initialization

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019