delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/17/11:20:16

Xref: news2.mv.net comp.os.msdos.djgpp:3955
From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: V2.x and -On
Date: Fri, 17 May 1996 08:46:44 +0100
Organization: Lehrstuhl fuer Stroemungsmechanik
Lines: 52
Message-ID: <319C2EE4.794B@LSTM.Ruhr-UNI-Bochum.De>
References: <199605150619 DOT AA00859 AT sun17 DOT thp DOT Uni-Koeln DOT DE>
NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Wolfram Brenig wrote:
> 
> So once again I have to bug you friendly DJGPP gurus with one
> these problems I experience with V2.x : I am getting unexpected
> SIGFPE's in combination with lengthy algebraic expressions if
> compiled with -On.
[..]  
> I get
> 
> Exiting due to signal SIGFPE
> Floating Point exception at eip=00001665
> eax=3ff00000 ebx=00000000 ecx=0005304c edx=3fe00000 esi=3fe00000 edi=0000d8c0
> ebp=0004d898 esp=0004d860 cs=00a7 ds=00af es=00af fs=008f gs=00bf ss=00af
> Call frame traceback EIPs:
>   0x00001665   _main+193
>   0x00003d9f   ___crt1_startup+115
[...]
> 
> Since the expression in the code snipped does not seem ill-defined,
> does this imply some problems with optimizing and V2.x ?
> Any help is most appreciated. I am *not* subscribing to the djgpp mailing
> list so please mail your comments to: brenig AT thp DOT uni-koeln DOT de
> 
> Thanks :-) !

This is the bug in libm.a. I just compiled the program with the fixed 
version and it gives -5.701e+00, regardless of optimization.

Go to
ftp://ftp.lstm.ruhr-uni-bochum.de/pub/djgpp/libm.zip
and relink your program. 



Anyway, can somebody enlight me about the differences of the math functions
in libc and libm?
-- 
Ciao
Tom



*************************************************************
* Thomas Demmer                                             *
* Lehrstuhl fuer Stroemungsmechanik                         *
* Ruhr-Uni-Bochum                                           *
* Universitaetsstr. 150                                     *
* D-44780  Bochum                                           *
* Tel: +49 234 700 6434                                     *
* Fax: +49 234 709 4162                                     *
* http://www.lstm.ruhr-uni-bochum.de/~demmer                *
*************************************************************

- Raw text -


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