[R] Hypergeometric Function seems to give wrong results

Carlos Nasher carlos.nasher at googlemail.com
Mon Jul 6 12:03:22 CEST 2015


Hello R helpers,

I need to evaluate the Hypergeometric Function of the 2nd kind (Tricomi
confluent hypergeometric function). Therefore I'm using the kummerU
function from the fAsianOptions package. It seems to me that kummerU is
giving wrong results. Here's an example:

library("fAsianOptions")
kummerU(a=19, b=19, x = 10)

R gives 1838.298 for the real part.

If I use Mathematica via the wolfram site (
http://functions.wolfram.com/webMathematica/FunctionEvaluation.jsp?name=HypergeometricU)
the result is 3.52603e-20 which is more reasonable in the context of my
analysis.

Can anyone help how to compute the correct values within R?

Best regards,
Carlos

	[[alternative HTML version deleted]]



More information about the R-help mailing list