(git:6a2e663)
minimax_exp Module Reference

Routines to calculate the minimax coefficients in order to approximate 1/x as a sum over exponential functions 1/x ~ SUM_{i}^{K} w_i EXP(-a_i * x) for x belonging to [1:Rc]. More...

Functions/Subroutines

subroutine, public check_exp_minimax_range (k, Rc, ierr)
 Check that a minimax approximation is available for given input k, Rc. ierr == 0: everything ok ierr == 1: Rc too small ierr == -1: k too large. More...
 
subroutine, public get_exp_minimax_coeff (k, Rc, aw, mm_error, which_coeffs)
 Get best minimax approximation for given input parameters. Automatically chooses the most exact set of minimax coefficients (k15 or k53) for given k, Rc. More...
 
subroutine, public validate_exp_minimax (n_R, iw)
 Unit test checking that numerical error of minimax approximations generated using any k15 or k53 coefficients is consistent with tabulated error. More...
 

Detailed Description

Routines to calculate the minimax coefficients in order to approximate 1/x as a sum over exponential functions 1/x ~ SUM_{i}^{K} w_i EXP(-a_i * x) for x belonging to [1:Rc].

This module is an extension of original minimax module minimax_exp_k15 (up to K = 15) to provide minimax approximations for larger ranges Rc (up to K = 53).

k53 implementation is based on directly tabulated coefficients from D. Braess and W. Hackbusch, IMA Journal of Numerical Analysis 25.4 (2005): 685-697 http://www.mis.mpg.de/scicomp/EXP_SUM/1_x

Note: Due to discrete Rc values, the k53 implementation does not yield optimal approximations for arbitrary Rc. If optimal minimax coefficients are needed, the minimax_exp_k15 module should be extended by interpolating k53 coefficients.

History
02.2016 created [Patrick Seewald]

Function/Subroutine Documentation

◆ check_exp_minimax_range()

subroutine, public minimax_exp::check_exp_minimax_range ( integer, intent(in)  k,
real(kind=dp), intent(in)  Rc,
integer, intent(out)  ierr 
)

Check that a minimax approximation is available for given input k, Rc. ierr == 0: everything ok ierr == 1: Rc too small ierr == -1: k too large.

Parameters
k...
Rc...
ierr...
Note
: ierr == 1 is not a fatal error since get_exp_minimax_coeff will return k53 minimax coefficients with smallest possible range.

Definition at line 100 of file minimax_exp.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_exp_minimax_coeff()

subroutine, public minimax_exp::get_exp_minimax_coeff ( integer, intent(in)  k,
real(kind=dp), intent(in)  Rc,
real(kind=dp), dimension(2*k), intent(out)  aw,
real(kind=dp), intent(out), optional  mm_error,
integer, intent(out), optional  which_coeffs 
)

Get best minimax approximation for given input parameters. Automatically chooses the most exact set of minimax coefficients (k15 or k53) for given k, Rc.

Parameters
kNumber of minimax terms
RcMinimax range
awThe a_i and w_i coefficient are stored in aw such that the first 1:K elements correspond to a_i and the K+1:2k correspond to w_i.
mm_errorNumerical error of minimax approximation for given k, Rc
which_coeffsWhether the coefficients returned have been generated from k15 or k53 coefficients (mm_k15 or mm_k53).

Definition at line 126 of file minimax_exp.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_exp_minimax()

subroutine, public minimax_exp::validate_exp_minimax ( integer, intent(in)  n_R,
integer, intent(in)  iw 
)

Unit test checking that numerical error of minimax approximations generated using any k15 or k53 coefficients is consistent with tabulated error.

Parameters
n_RNumber of Rc values to be tested.
iw...

Definition at line 245 of file minimax_exp.F.

Here is the call graph for this function:
Here is the caller graph for this function: