From: Eric Rudd Newsgroups: comp.os.msdos.djgpp Subject: Re: Code to Fix sinh() in libm.a Date: Wed, 20 May 1998 13:25:18 -0500 Organization: CyberOptics Lines: 23 Message-ID: <3563200E.87AEA5D1@cyberoptics.com> References: Reply-To: rudd AT cyberoptics DOT com NNTP-Posting-Host: rudd.cyberoptics.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Eli Zaretskii wrote: > If you ask whether GCC emits instructions which change the x87 status > word, then I don't think it does, at least in simple programs that I > tried. Did you mean changes to the x87 control word? The x87 status word is, of course, set as a result of most floating-point instructions; gcc changes the control word at various times also, but AFAIK gcc always saves and restores the original state. For instance, if one writes double x; int ix; ... ix = (int) x; then gcc changes the control word from "round-to-nearest" to "round towards zero", saves the number in ix, then changes the control word back to its original state. Unfortunately, I have seen no documentation that guarantees what that original state is. -Eric Rudd rudd AT cyberoptics DOT com