Phillip Helbig wrote:
>
> > Let us first consider the server aspect and assume that the
> > machine/compiler supports 6, 15 and 30 digits precision. (Case A)
> > (If it doesn't support more than 23 digits, you are out of luck for
> > p=24; you would have to get a different compiler or computer.)
> > For case B we assume that it just supports 15 and 30 digits.
> >
> > Now you write your library for all available precisions, which in the
> > current state is not so easy portably.
> >
> > Now if your program - the client - asks for p1=6 and p2=12, it will really get
> > p1=6 and p2=15 in case A and p1=p2=15 in case B.
> >
> > If it asks for p1=12 and p2=24, it will get p1=15 and p2=30 in both
> > cases.
>
> This sums up what to many people is `the problem'. One CAN specify a
> given precision in the `client' and the `server' fulfills this request,
> but its answer might differ, as illustrated above.
>
> As someone else has pointed out, often a greater RELATIVE precision is
> desired, not a greater absolute precision. This can be done portably
> with DOUBLE PRECISION, thus this shouldn't be frowned upon. However, it
> needs its equivalent DOUBLE COMPLEX to be standardised, and perhaps
> QUADRUPLE PRECISION should be standardised, but not necessarily with the
> requirement that the processor must support this.
>
Right. In F77 we were working with relative precisions.
SELECTED_REAL_KIND() mechanism introduced in F90 the
opportunity to work with absolute precisions, but IMO this
goal has been only partly reached. It's a pity
that no improvement has been planned for F2K. Fortran
is likely to survive if it brings specialised features
for numerical processing. From this point of view,
a full absolute precisions handling is more important than
advanced OOP features: C++ is now *THE* OOP langage, so
why Fortran should compete on this topic?
Moreover, there are only a few things to add to get
this full absolute precision handling: for example the
standard could specify the minimum precisions and ranges
for REAL, DOUBLE PRECISION, and standardised QUADRUPLE PRECISION,
instead of requiring two kinds with any (different) precisions.
Best regards
--
+-----------------------------------+----------------------------+
| Pierre Hugonnet | mail....CGG |
| | 1, rue Leon Migaux |
| Seismic Data Processing R&D | 91341 MASSY cedex |
| | FRANCE |
| COMPAGNIE GENERALE DE GEOPHYSIQUE | phone...(33) 164 47 45 59 |
| Massy processing centre (France) | fax.....(33) 164 47 32 49 |
| http://www.cgg.com | [log in to unmask] |
+-----------------------------------+----------------------------+
My opinions are not necessarily those of CGG
--------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|