psmile_ddadd.c File Reference

#include <stddef.h>
#include "PSMILe_f2c.h"
Include dependency graph for psmile_ddadd.c:

Go to the source code of this file.

Functions/Subroutines

void psmile_ddadd (double *dda, double *ddb)

Function Documentation

void psmile_ddadd ( double *  dda,
double *  ddb 
)

Definition at line 31 of file psmile_ddadd.c.

Referenced by psmile_ddadd_mpi_callback(), psmile_get_field_dble(), psmile_get_field_real(), psmile_global_sum_compute_dble(), psmile_put_field_dble(), and psmile_put_field_real().

00037 {
00038    volatile double e, t1, t2, t2_1, t2_2, t2_3;
00039 /* Compute dda + ddb using Knuth's trick.*/
00040    t1 = dda[0] + ddb[0];
00041    e = t1 - dda[0];
00042    t2_1 = t1 - e;
00043    t2_2 = dda[0] - t2_1;
00044    t2_3 = ddb[0] - e;
00045    t2   = t2_3 + t2_2;
00046    t2  += dda[1];
00047    t2  += ddb[1];
00048 
00049 /* The result is t1 + t2, after normalization.*/
00050    ddb[0] = t1 + t2;
00051    e = t1 + t2;
00052    e -= t1;
00053    ddb[1] = t2 - e;
00054    
00055    return;
00056 }

Here is the caller graph for this function:


Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1