ScalES-PPM
Loading...
Searching...
No Matches
ppm_math_extensions.f90 File Reference

utility routines for floating-point math More...

Data Types

interface  ppm_math_extensions::ddp_add
 
interface  ppm_math_extensions::ddp_sum
 
interface  ppm_math_extensions::ppm_ddp_sum_dp
 
interface  ppm_math_extensions::ppm_ddp_add_dp_dp
 
interface  ppm_math_extensions::ppm_ddp_add_ddp_ddp
 
interface  ppm_math_extensions::assign_nan
 

Functions/Subroutines

elemental complex(dp) function ppm_math_extensions::ddp_add_ddp_ddp (a, b)
 This function computes c = a(i)+b(i) but gives as result a complex that stores a Kahan correction term in the imaginary part.
 
elemental complex(dp) function ppm_math_extensions::ddp_add_dp_dp (a, b)
 
elemental complex(dp) function, public ppm_math_extensions::ddp_abs (a)
 
pure complex(dp) function ppm_math_extensions::ddp_sum_dp_1d (a)
 compute double-double-precision corrected sum of 1d-array, should give better results than sum(a) for arrays a where cancellation occurs.
 
pure complex(dp) function ppm_math_extensions::ddp_sum_dp_2d (a)
 compute double-double-precision corrected sum of 2d-array
 
pure complex(dp) function ppm_math_extensions::ddp_sum_dp_3d (a)
 compute double-double-precision corrected sum of 3d-array
 
subroutine, public ppm_math_extensions::initialize_math_extensions
 
subroutine, public ppm_math_extensions::finalize_math_extensions
 

Variables

real(dp), parameter, public ppm_math_extensions::m_pi_dp =3.14159265358979323846_dp
 
real(sp), parameter, public ppm_math_extensions::m_pi_sp =3.14159265358979323846_sp
 
character(len= *), parameter, public ppm_math_extensions::de_g_sp = "g16.9"
 data edit descriptors for real kinds sp and dp
 
character(len= *), parameter, public ppm_math_extensions::de_g_dp = "g25.17e3"
 
integer, parameter, public ppm_math_extensions::de_g_sp_width = 16
 character width needed for the corresponding data edit descriptor
 
integer, parameter, public ppm_math_extensions::de_g_dp_width = 25
 
character(len= *), parameter ppm_math_extensions::filename = 'ppm_math_extensions.f90'
 

Detailed Description

utility routines for floating-point math

Version
1.0
Author
Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Function/Subroutine Documentation

◆ ddp_sum_dp_1d()

pure complex(dp) function ppm_math_extensions::ddp_sum_dp_1d ( real(dp), dimension(:), intent(in) a)
private

compute double-double-precision corrected sum of 1d-array, should give better results than sum(a) for arrays a where cancellation occurs.

Parameters
aarray a(1)..a(n) to sum up
Returns
$\sum^n_{i=1} a_i$

◆ ddp_sum_dp_2d()

pure complex(dp) function ppm_math_extensions::ddp_sum_dp_2d ( real(dp), dimension(:, :), intent(in) a)
private

compute double-double-precision corrected sum of 2d-array

See also
ddp_sum_dp_1d
Parameters
aarray a(1,1)..a(m,n) to sum up
Returns
$\sum^m_{i=1}\sum^n_{j=1} a_{i,j}$

◆ ddp_sum_dp_3d()

pure complex(dp) function ppm_math_extensions::ddp_sum_dp_3d ( real(dp), dimension(:, :, :), intent(in) a)
private

compute double-double-precision corrected sum of 3d-array

See also
ddp_sum_dp_1d
Parameters
aarray a(1,1,1)..a(m,n,o) to sum up
Returns
$\sum^m_{i=1}\sum^n_{j=1}\sum^o_{l=1} a_{i,j,l}$

Das diesem Bericht zugrundeliegende Vorhaben wurde mit Mitteln des Bundesministeriums für Bildung, und Forschung unter dem Förderkennzeichen 01IH08004E gefördert. Die Verantwortung für den Inhalt dieser Veröffentlichung liegt beim Autor.