lerch(x, s, v, tolerance=1.0e-10, iter=100)
x
, s
, and
v
if necessary.iter
is too small then a result of NA
may occur;
if so, try increasing its value.x
, s
, v
.
If the above ranges of $x$ and $v$ are not satisfied,
or some numeric problems occur, then
this function will return a NA
for those values.NA
will be returned.Bateman, H. (1953) Higher Transcendental Functions. Volume 1. McGraw-Hill, NY, USA.
zeta
.s=2; v=1; x = seq(-1.1, 1.1, len=201)
plot(x, lerch(x, s=s, v=v), type="l", col="red", las=1,
main=paste("lerch(x, s=",s,", v=",v,")",sep=""))
abline(v=0, h=1, lty="dashed")
s = rnorm(n=100)
max(abs(zeta(s)-lerch(x=1,s=s,v=1))) # This fails (a bug); should be 0
Run the code above in your browser using DataLab