www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/20/23:30:22

From: "Lars O. Hansen" <lars DOT o DOT hansen AT gmx DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: C preprocessor not capable of floating point division ?
Date: Sat, 21 Dec 2002 05:24:14 +0100
Organization: 1&1 Internet AG
Lines: 16
Message-ID: <au0qd9$hkj$1@news.online.de>
NNTP-Posting-Host: p5083854e.dip0.t-ipconnect.de
X-Trace: news.online.de 1040444649 18067 80.131.133.78 (21 Dec 2002 04:24:09 GMT)
X-Complaints-To: abuse AT online DOT de
NNTP-Posting-Date: 21 Dec 2002 04:24:09 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

so sth. like int a=4/8  (which the preprocessor should evaluate)  does not become 0.5 ?   (although
it is highly unlikely that the programmer did not intend to have just that)

or #define sth 8; int a=2/sth;  results in a being 0?


Is this a problem of the C language or specific to gccs C preprocessor?


How can I achieve floating point division or similar having the same result by the C preprocessor
for #define d values ?


thanks -as usual- for any help, Lars


- Raw text -


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