From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Use of FLT_EPSILON Date: Wed, 15 Jul 1998 14:43:50 +0100 Organization: wot? me? Message-ID: <2kS7KGAWILr1EwAu@foobar.co.uk> References: <6odqk1$p23$1 AT nnrp1 DOT dejanews DOT com> NNTP-Posting-Host: chocolat.foobar.co.uk Mime-Version: 1.0 Lines: 19 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article , Eli Zaretskii writes >Also, I think you are mistaken in your perception of ugliness: by far >the most inefficient part of the above computation is the call to >`fabs' library function, all the rest is usually very fast on modern >machines. Does djgpp actually generate a function call? mingw32 inlines it. The really expensive part is the float compare which probably takes longer than all the other arithmetic. I rely on fabs being a fast fpu op (1 pipeline clock on Pentium) to avoid compares in my 3d code. In general on P5 class machines you lose very little speed by conditioning the operands of a float compare correctly. You gain a much more robust program. --- Paul Shirley: my email address is 'obvious'ly anti-spammed