Re: calculation accuracy



On Mar 28, 2:33 pm, Thomas Koenig <Thomas.Koe...@xxxxxxxxx> wrote:
Richard Maine <nos...@xxxxxxxxxxxxx> wrote:
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).

Can we have a standardized way to specify pi? Please?

Usually I don't use plain pi repeatedly in my code but 2*pi or sqrt(pi/
2) or ... . Should the committee standardize all of these? I use Paul
van Delst's "Fundamental Constants" for pi and related quantities. It
is part of his "Utility Source Code" at http://www.ssec.wisc.edu/~paulv/Fortran90/Utility/
..

.



Relevant Pages

  • Re: Sweeney presentation "The Next Mainstream Language"
    ... Specify int to be more specific than real. ... possibly helped by programmer annotations or checks. ... test just before the access to make the compiler see that the index is ... he included compiler-checked manual region allocation in Cyclone. ...
    (comp.lang.functional)
  • Bounds checked arrays
    ... As everybody knows, the C language lacks ... When the state of this toggle is ON, the compiler ... Important is to know that the array updates ... We have just to allow him/her to specify what to do ...
    (comp.lang.c)
  • Re: Boolean Buyers Beware ... AIX compiler bug --- PMR 26241,756
    ... But the compiler does have other options for updating byte fields, ... I didn't bring the C++ standard into the discussion, ... C++ doesn't specify anything here, and still one needs multithreading. ...
    (comp.programming.threads)
  • Re: Bounds checked arrays
    ... > more at each array access will not make any ... > this problem in the C language to do their dirty ... > When the state of this toggle is ON, the compiler ... > We have just to allow him/her to specify what to do ...
    (comp.lang.c)
  • Re: In-Out Parameters for functions
    ... Ada, but you who didn't specify it. ... exemptions Ada leaves that to the compiler. ...
    (comp.lang.ada)