l2err Subroutine

subroutine l2err(iprfun, ftau, error)

************80

! L2ERR computes the errors of an L2 approximation.

Discussion:

This routine computes various errors of the current L2 approximation, 
whose piecewise polynomial representation is contained in common 
block APPROX, to the given data contained in common block DATA.

It prints out the average error ERRL1, the L2 error ERRL2, and the
maximum error ERRMAX.

Modified:

16 February 2007

Author:

Carl DeBoor

Reference:

Carl DeBoor,
A Practical Guide to Splines,
Springer, 2001,
ISBN: 0387953663,
LC: QA1.A647.v27.

Parameters:

Input, integer ( kind = 4 ) IPRFUN.  If IPRFUN = 1, the routine prints out
the value of the approximation as well as its error at
every data point.

Output, real ( kind = 8 ) FTAU(NTAU), contains the value of the computed
approximation at each value TAU(1:NTAU).

Output, real ( kind = 8 ) ERROR(NTAU), with 
  ERROR(I) = SCALE * ( G - F )(TAU(I)).  Here, SCALE equals 1
in case IPRFUN /= 1, or the absolute error is greater than 100 
somewhere.  Otherwise, SCALE is such that the maximum of the
absolute value of ERROR(1:NTAU) lies between 10 and 100.  This
makes the printed output more illustrative.

Arguments

Type IntentOptional Attributes Name
integer(kind=4) :: iprfun
real(kind=8) :: ftau(ntau)
real(kind=8) :: error(ntau)

Common Blocks

colloc (subroutine)
difequ (subroutine)
l2err (subroutine)
colloc (subroutine)
difequ (subroutine)
"> common /approx/

Type Attributes Name Initial
real :: break(lpkmax)
real :: coef(ltkmax)
integer(kind=4) :: l
integer(kind=4) :: k

l2appr (subroutine)
l2err (subroutine)
l2appr (subroutine)
"> common /i4data/

Type Attributes Name Initial
integer(kind=4) :: ntau

l2appr (subroutine)
l2err (subroutine)
l2appr (subroutine)
"> common /r8data/

Type Attributes Name Initial
real :: tau(ntmax)
real :: gtau(ntmax)
real :: weight(ntmax)
real(kind=8) :: totalw