🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4627

Re: Help, best way to compare doubles

#4627
From: Greg Bacon
Date: Sat, 13 Jan 1996 15:11
21 lines
855 bytes
Jeff Tomich (jtomich@IntNet.net) wrote:
: Having a hard time to figure out a function on how to compare doubles. 
: Any ideas?

: thanks, Jeff

No function necessary.. C has this really cool boolean equality operator
that does this sort of thing for you.  Have a look:

{
double a, b;

if (a == b) {
   /* you know what to do */
   }

Greg
--
Greg Bacon <gbacon@cs.uah.edu>
University of Alabama in Huntsville
CS Department Systems Support Team
Technical Details
Message-ID: <4d8i3o$pjb@info.uah.edu>
Path: arc1-ca.pugleaf.net!info.uah.edu!oreo!gbacon
References: <4d1k09$aqq@mercury.IntNet.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!info.uah.edu!oreo!gbacon
From: gbacon@oreo (Greg Bacon)
Newsgroups: comp.std.c
Subject: Re: Help, best way to compare doubles
Date: 13 Jan 1996 15:11:52 GMT
Organization: The University of Alabama in Huntsville
Message-ID: <4d8i3o$pjb@info.uah.edu>
References: <4d1k09$aqq@mercury.IntNet.net>
NNTP-Posting-Host: oreo.aspire.cs.uah.edu
X-Newsreader: TIN [version 1.2 PL2]