Alois Steindl wrote:
>
> >>
> >> >
> >> > For Stolz's example:
> >> >
> >> > p1 = selected_real_kind(1) ! -> Extnd1
> >> > p2 = selected_real_kind(precision(1.0_p1)+1) ! -> Single
> >> > p3 = selected_real_kind(precision(1.0_p2)+1) ! -> Double
> >> >
> >>
> >> Here I don't understand what you mean. Anyway selected_real_kind(1)
> >> is not portable.
> >>
>
> A) Really?
> B) Why not?
>
selected_real_kind(1) in itself is portable, I confused myself.
But this solution globally is not portable because on some machines
(64 bits without 6 digits kind) p1 will be directly the default REAL,
p2 the DOUBLE PRECISION and p3 is likely to be -1
> (I assume that selected_real_kind(1) should give you the real type with
> the smallest precision. My answer just repeats a previously given
> solution (maybe by Robin? ) to an equivalent problem.
> This example demonstrates quite nicely - at least to me - that the
> new concept with selected_*_kind is sometimes more useful than using
> the old single and double concepts. Of course I would appreciate some
> more features which would allow me to write a 'loop of subroutines
> over all precisions'.)
>
> Best regards
> Alois
--
+-----------------------------------+----------------------------+
| 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
--------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|