www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/13/05:11:45

Date: Sun, 13 Aug 95 09:58:33+030
From: emilw AT msil DOT sps DOT mot DOT com (Emil Wataralov)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Problem with double on large program

Hello, 

Be aware for following problem with djgpp's printf command.
_doprnt engine, crashes program with Floating point exception,
if trying to print FP NaNs (Not A Numbers). This happens with
all printf, sprintf, fprintf, vsprintf...

Rajiv, I've fixed this by checking FP numbers for NaNs before calling 
printf. Mail me if you need the code or try V2.0, maybe there _doprnt
works fine.

Emil

> From djgpp-bounces AT sun DOT soe DOT clarkson DOT edu Sat Aug 12 20:28:57 1995
> From: Rajiv Ellepola <rajiv AT cs DOT uwa DOT edu DOT au>
> Subject: Problem with double on large program
> To: djgpp AT sun DOT soe DOT clarkson DOT edu
> Date: Sat, 12 Aug 1995 00:14:22 +0800 (WST)
> X-Mailer: ELM [version 2.4 PL24]
> Content-Type> : > text> 
> Content-Length: 1590
> 
> Hello All,
> 
> I got a strange problem in that when I run a small program which does
> the following :
> 	int u1 = 350, u2 = 207, v1 = 296, v2 = 408;
> 	printf("%lf\n", atan2((double)(u1-u2), (double)(v1-v2)));
> 
> it works fine, but when I try to do the same thing in a very large
> program, the program crashes giving the following dump.
> 
> Floating point exception at eip=26b79
> eax=00000122 ebx=7ffffc0f ecx=00000000 edx=00000000 esi=7fffe891 edi=0000000e
> ebp=7fffe824 esp=7fffe7bc cs=d8 ds=48 es=48 fs=48 gs=38 ss=48 cr2=00003076
> Call frame traceback EIPs:
>   0x00026b79
>   0x000265a6
>   0x00024b28
>   0x00023ae5
>   0x00022218
> 
> Would it be possible for some one to tell me what the problem is ? ( I am
> using a 486PC. The code runs fine under unix ).
>                                                            \\__/(\
> Thank you very much,                                        Q Q  \)
>   Rajiv                                                   =(_T_)=
> --------------------------------------------------------------------------
> Rajiv Ellepola,
> Robotics & Vision Research Group,    _--_|\  Internet: rajiv AT cs DOT uwa DOT edu DOT au
> Department of Computer Science,     /      \ Tel (work): +61 9 380 3778
> The University of Western Australia,*_.--._/ Fax (work): +61 9 380 1089 
> Western Australia  6907.                  v
> --------------------------------------------------------------------------
>         Humble experiments in early vertebrates eventually resulted
>         in human beings.  -  Hans Moravec
> 
> 	Diplomacy is the ability to tell someone to "Go to hell" in
>         such a way that he looks forward to the trip.
> 

- Raw text -


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