Re: [R] Hypergeometric Function seems to give wrong results

2015-07-08 Thread Ben Bolker
Carlos Nasher via R-help r-help at r-project.org writes:



[snip]

 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.
 

 [snip]

  Your best bet is probably to contact the package maintainer
(use maintainer(fAsianOptions) to see who it is, or look on 
the CRAN page for the package).  If this functionality is very
commonly used in finance you might try the r-sig-finance mailing
list (indicating that you've already tried here).

  good luck
Ben Bolker

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Hypergeometric Function seems to give wrong results

2015-07-06 Thread Carlos Nasher via R-help
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]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.