| delorie.com/archives/browse.cgi | search |
| From: | david AT temss2 DOT main DOT temple DOT edu (David Tucker) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Floating point accuracy |
| Date: | 3 Mar 1997 19:05:42 GMT |
| Organization: | Temple University, Academic Computer Services |
| Lines: | 19 |
| Message-ID: | <5ff7e6$974@cronkite.ocis.temple.edu> |
| NNTP-Posting-Host: | temss2.isr.temple.edu |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
I have a question. When I do a calculation such as: X = a / b; // where int a = 994 and int b = 1000 or cout << "X = " << a / b << endl; my result is 0. Does anyone know why this happens? Thank in advance... David
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |