robin wrote:
>
> >
> > The specifications are:
> > write a function which sums a 1D real array, using an accumulator
> > whose precision is large enough (let's say at least twice the precision
> > of the *original* array) to reduce round-off problems.
> > write several versions for the different possible real kinds.
>
> Now it's several versions?
>
different real kinds => several versions of the function, it seems.
> And now it's the different possible real kinds?
>
One version of the function for each _used_ real kind,
if you prefer.
> I'm sorry, this is a very rubbery specification. It keeps changing.
>
I'm sorry too, I haven't changed my specifications from the beginning.
To be clear:
In the calling programs I usually have two real kinds
REAL(selected_real_kind(p=6)) :: a6(n)
REAL(selected_real_kind(p=12)):: a12(n)
I try to process a6 with ~6 digits accuracy
I try to process a12 with ~12 digits accuracy
I want a library with functions which sum these arrays
using an accumulator whose precision is high enough to honour
the desired accuracies of my variables (let's say that
twice the desired accurary as accu precision is OK).
-These functions should have a generic interface
-The library should be portable (with the assumption that
24 digits precision exist on the target machine)
-The functions should be as efficient (CPU, memory) as possible
Note that I discriminate the words "accuracy" and "precision":
The precision relates to the representation of a variable
The accuracy relates to the significant digits of a variable
after some processing (of course accuracy<=precision)
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
--------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|