Re: calculation accuracy
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Tue, 27 Mar 2007 16:46:03 -0700
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> wrote:
DOUBLE PRECISION PI_D
PI_D = 3.1415927D0
You would get A
a lot closer to zero if P_D was closer to pi.
Yes. It seems sort of pointless to declare pi_d as double precision and
also properly specify the literal as double precision, but then give
only 8 digits of it. It isn't as though the compiler is going to be able
to guess "oh, that's close to pi, and the variable name has pi in it, so
maybe I should use a more accurate value of pi instead of the one
specified).
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: calculation accuracy
- From: Thomas Koenig
- Re: calculation accuracy
- References:
- calculation accuracy
- From: Ben
- Re: calculation accuracy
- From: glen herrmannsfeldt
- calculation accuracy
- Prev by Date: Re: calculation accuracy
- Next by Date: Re: calculation accuracy
- Previous by thread: Re: calculation accuracy
- Next by thread: Re: calculation accuracy
- Index(es):
Relevant Pages
|