spf | R Documentation |
A utility function to calculate a ratio.
spf(x=seq(-1,1,by=0.2),eps=1.0e-3)
x |
A vector |
eps |
tolerance |
This is to calculate
\Phi_l(x)=\frac{\int_0^x s^le^{-s}ds}{x^{l+1}},\hspace{0.5cm}l=0,1,2.
This function is well defined even when x=0. However, it is numerical chanllenging to calculate it when x is small. So when
|x|\le \code{eps}
we approximate this function and the absolute error is \code{eps}^5
.
fx1 |
when |
fx2 |
when |
fx3 |
when |
Version 1.0 (7/19/2016)
Xiaodong Luo
Luo, et al. (2017)
fun<-spf(x=seq(-1,1,by=0.2),eps=1.0e-3)
fun
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.