home *** CD-ROM | disk | FTP | other *** search
- Path: 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
-
- 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
-
-