Message Boards Message Boards

GROUPS:

Gamma function evaluation with arbitrary precision

Posted 1 month ago
440 Views
|
5 Replies
|
5 Total Likes
|

Hello, I am a Physics student and I am trying to get values of incomplete Gamma function with arbitrary precision. On the Mathematica page they clarify that the Gamma function can be evaluated with arbitrary precision. I have the 11.1.1 version of Mathematica and I am entering the following code to evaluate with 64 digits:

N[Gamma[3.33, 10.14], 64]

However the result appears with 18 digits:

0.010989671959126465

Is there a way to get it with at least 32 digits? Thank you.

5 Replies

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]

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

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

Maybe:

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

  (*-16.253378012832750669487606211204418150244508376350192594107493361445\
  8686734122774716077406778543804*)

Thanks! You solved my problem!

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