how many terms uses the function hypergeom

If we use the matlab build in function
hypergeom(N,D,z)
which is a infitite sum
hypergeom(N,D,z) = sum(k=0:inf, (C(N,k)/C(D,k))*z^k/k!)
How many terms are used? I.e. what is
inf
Thank you very much for any suggestions!
Best,
Rafael

4 comentarios

Walter Roberson
Walter Roberson el 9 de Jun. de 2019
hypergeom is executed inside the symbolic engine. The symbolic engine uses as many terms as it needs to in order to meet the tolerance that is in effect at the time.
Thank you very much. Is there an expression for the error. What is the tolerance set to in the symbolic engine?
At the MATLAB command prompt give the command
mupad
MATLAB will whine and try to convince you to use LiveScript instead. Do not let it use LiveScript: tell it to go ahead and open a MuPAD notebook.
Once the MuPAD notebook has opened, and you are at the [ prompt, type in the command
expose(hypergeom)
You will see that there are a couple of hundred lines of code, and that there are dozens of special cases that are handled, including some cases where the calculations is built up recursively. We cannot really talk about the error analysis unless we know which case is being invoked.
Thank you very much. It answers my question well.

Iniciar sesión para comentar.

Respuestas (0)

Productos

Versión

R2018b

Preguntada:

el 9 de Jun. de 2019

Comentada:

el 10 de Jun. de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by