Article View: comp.os.os2.programmer
Article #3599Floating point underflow
From: Claudio Fahey
Date: Sun, 24 Jan 1993 13:24
Date: Sun, 24 Jan 1993 13:24
12 lines
1050 bytes
1050 bytes
I'm trying to write a program with the IBM C Set/2. Every
once in a while, the program just terminates when I perform
a specific action. IPMD ( the debugger ) tells me that it
gets a floating point underflow on a line such as this:
LONG rc; float Temp;
rc = Temp * NUMCOLORS/MAXTEMP;
When I trace into it, Temp is around 1e-40 and NUMCOLORS/MAXTEMP is
around 0.93. Why is it giving me this error? Why doesn't it just
set rc to 0? How can I avoid this problem? Thanks.
---
. OLX 2.1 TD . !enilgaT siht edisni deppart m'I !pleH
Technical Details
Message-ID:
<1430.1034.uupcb@idcbbs.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!tcsi.com!iat.holonet.net!idcbbs!claudio.faheyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!tcsi.com!iat.holonet.net!idcbbs!claudio.fahey From: claudio.fahey@idcbbs.com (Claudio Fahey) Newsgroups: comp.os.os2.programmer Subject: Floating point underflow Message-ID: <1430.1034.uupcb@idcbbs.com> Date: 24 Jan 93 13:24:00 GMT Distribution: world Organization: IDC BBS - Alameda, CA - 510-865-7115 Reply-To: claudio.fahey@idcbbs.com (Claudio Fahey) Lines: 12