Description Usage Arguments Value Examples
View source: R/lib_gaver_stehfest.R
Note Gaver-Stehfest algorithm is theoretically convergent but practically high precision arithmetic is required.
This is not achieved in R as R4.0+ uses "long-double" in C, which is 64bit floating point. As a result, using high
n
would yield results divergent to infinity. Therefore, small n
should be used. Using default arguments,
values for different n
would be printed along with a plot which assists in determining an appropriate n
.
1 |
Fn |
Function. Function to be inversed. |
x |
Numeric (positive). Location of the function to be approximated. |
n |
Numeric. Number of terms used in the Gaver-Stehfest algorithm. |
try_n |
Logical. Whether all n values up to |
plot |
Logical. In case |
... |
Other arguments to be passed to |
Numeric. Vector of length n
if try_n
is TRUE
(Default). Otherwise, length is 1.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.