delorie.com/archives/browse.cgi | search |
From: | "Lars O. Hansen" <lars DOT o DOT hansen AT gmx DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: C preprocessor not capable of floating point division ? |
Date: | Sat, 21 Dec 2002 05:58:12 +0100 |
Organization: | 1&1 Internet AG |
Lines: | 7 |
Message-ID: | <au0scv$ht2$1@news.online.de> |
References: | <au0qd9$hkj$1 AT news DOT online DOT de> <Xns92EAF18D1776Casu1cornelledu AT 132 DOT 236 DOT 56 DOT 8> <au0s1n$hqn$1 AT news DOT online DOT de> |
NNTP-Posting-Host: | p5083854e.dip0.t-ipconnect.de |
X-Trace: | news.online.de 1040446687 18338 80.131.133.78 (21 Dec 2002 04:58:07 GMT) |
X-Complaints-To: | abuse AT online DOT de |
NNTP-Posting-Date: | 21 Dec 2002 04:58:07 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 |
> But DJ Delorie is right, the preprocessor or compiler which does expression evaluation beforehand > "obeyes" the rules of x86 "integer division", so 4/8 is 0. so it's 0 even when assigned to a float: float a=4/8 results in a being 0.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |