home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / os2 / programm / 7973 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.0 KB

  1. Path: sparky!uunet!tcsi.com!iat.holonet.net!idcbbs!claudio.fahey
  2. From: claudio.fahey@idcbbs.com (Claudio Fahey) 
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Floating point underflow
  5. Message-ID: <1430.1034.uupcb@idcbbs.com>
  6. Date: 24 Jan 93 13:24:00 GMT
  7. Distribution: world
  8. Organization: IDC BBS - Alameda, CA - 510-865-7115
  9. Reply-To: claudio.fahey@idcbbs.com (Claudio Fahey) 
  10. Lines: 12
  11.  
  12. I'm trying to write a program with the IBM C Set/2.  Every
  13. once in a while, the program just terminates when I perform
  14. a specific action.  IPMD ( the debugger ) tells me that it
  15. gets a floating point underflow on a line such as this:
  16.     LONG rc; float Temp;
  17.         rc = Temp * NUMCOLORS/MAXTEMP;
  18.         When I trace into it, Temp is around 1e-40 and NUMCOLORS/MAXTEMP is
  19.         around 0.93.  Why is it giving me this error?  Why doesn't it just
  20.         set rc to 0?  How can I avoid this problem?  Thanks.
  21. ---
  22.  . OLX 2.1 TD . !enilgaT siht edisni deppart m'I !pleH
  23.                                                                        
  24.