Message Boards Message Boards

0
|
2798 Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Gamma function evaluation with arbitrary precision

Posted 2 years ago
POSTED BY: Nicolas Legnazzi
5 Replies

Hi, I have a new question. How can I make Mathematica interpret that the variable of a function must be worked with the precision that I want. For example, I would like Mathematica to understand that the argument of my Laguerre polynomial is written with 100 significant figures, but I cannot do this:

LaguerreL[k, 2, r´100]

As in the future I am going to incorporate the Laguerre polynomials into an integral, I need precision to be incorporated into the function. Thank you

POSTED BY: Nicolas Legnazzi

Maybe:

  f[k_, r_] := LaguerreL[SetPrecision[k, 100], 2, SetPrecision[r, 100]]
  f[3.33, 10.14]

  (*-16.253378012832750669487606211204418150244508376350192594107493361445\
  8686734122774716077406778543804*)
POSTED BY: Mariusz Iwaniuk

Thanks! You solved my problem!

POSTED BY: Nicolas Legnazzi

Since your arguments only have machine precision the output will be limited to machine precision. If you input the arguments with more precision this will then be automatically be used throughout the calculation:

Gamma[3.33`100, 10.14`100]
POSTED BY: Sander Huisman

Brilliant! Many thanks. You have solved my problem, now I will be able to continue investigating. Thank you again.

POSTED BY: Nicolas Legnazzi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract