From: "J.W. Dare" Newsgroups: comp.os.msdos.djgpp Subject: Re: DBL_EPSILON Date: 15 Nov 2001 10:36:05 -0600 Lines: 31 Message-ID: References: <3BF1FDC4 DOT 93E42C1B AT earthlink DOT net> NNTP-Posting-Host: 216.40.2.76 X-Trace: 1005841995 newscene.com 216.40.2.76 216.40.2.76 Filter-NNTP-Posting-Host: 216.40.2.76 Filter-X-Trace: 1005841995 newscene.com 52233 216.40.2.76 X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 15 Nov 2001 06:43:08 GMT, Martin Ambuhl wrote: >"J.W. Dare" wrote: >> >> Can someone tell me the value of DBL_EPSILON defined in float.h. > >You can: > >#include >#include > >int main(void) >{ > printf("DBL_EPSILON is %.*g\n", DBL_DIG, DBL_EPSILON); > return 0; >} Thank you. I'm writing in C++ and I wasn't sure of what value to pass to setprecision()in order to obtain a reliable answer. May I conclude then that DBL_DIG is the number of significant digits of accuracy for a type double? As an aside, I'm not yet familiar with precision issues concerning floating point numbers. Can someone point me in the direction of a good book or web page that discusses this information? -- J.W.Dare jwdare AT novia DOT net