ecd.diff: Utility to diff a vector of numeric or mpfr to get first derivative
Description
This utility uses diff to get first derivative dy/dx.
but it handles mpfr vector properly
Usage
ecd.diff(y, x, pad = 0)
Arguments
y
a vector of numeric or mpfr
x
a vector of numeric or mpfr
pad
integer, to manage padding so that the output vector has
the same length as the input. 0 for no padding,
1 to repeat the first element, -1 to repeat the last element.