V3FIT
r8psp_tolsum.f
1 C utility routines for (r8)pspltsub
2 
3  subroutine r8psp_tolsum(refval,tolval,sum)
4 
5 C for R4 sum.eq.refval expected, for R8 difference will be detectable
6 C refval =~ 1.0; tolval =~1.0e-6
7 
8  IMPLICIT NONE
9  INTEGER, PARAMETER :: R8=selected_real_kind(12,100)
10  real*8 refval, tolval ! input
11  real*8 sum ! output
12 
13  sum = refval + tolval*tolval
14 
15  return
16  end