Hello,
let me give it another try:
Pierre Hugonnet wrote:
>> On a 64bits machine,
>>
>> REAL(selected_real_kind(p=6)) :: X
>> will select the default REAL (precision=15). So the compiler
>> will select the default REAL version of MYSUM. In this version
>>
>> REAL(selected_real_kind(precision(1.0)+1) :: accu
>> will select the available 30digits kind (once again assuming that
>> nothing exist between 15 and 30). But my original request for
>> X was only 6 digits, so that a 12digits (15 in fact on this machine)
>> accumulator would fit. Using the 30digits kind in that case
>> will waste a lot of CPU (since these kinds are most of time
>> emulated) and memory (not a lot here, for a scalar variable :-)).
>>
Let us assume that 15 and 30 digits are available.
I would think that if your X has 6 digits precision and you want 12
digits for the accu, then 15 digits for the accu - and also for X -
should be sufficient. Can the result be worse than that by using
arrays with less precision?
If 15 digits is insufficient, you need to use 30 digits for that
machine. What's your point?
Quite clueless
Alois
--
___________________________________________________________________________
Alois Steindl, Tel.: +43 (1) 58801 / 32558
Inst. for Mechanics II, Fax.: +43 (1) 58801 32599
Vienna University of Technology,
A-1040 Wiedner Hauptstr. 8-10 Email: [log in to unmask]
___________________________________________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|