gamma function

7 views
Skip to first unread message

Vickram Ratnam

unread,
Feb 15, 2024, 11:01:16 AMFeb 15
to mpmath
Hi,

The gamma function: gamma(-1.8) is wrong on the 14th decimal place!

gamma(-1.8)
mpf('3.18808591111028039124867553323532716863956391866129741806715381936241028063577249148281557253678571408')

Thanks
Vickram

Oscar Benjamin

unread,
Feb 15, 2024, 1:46:24 PMFeb 15
to mpm...@googlegroups.com
Use a string rather than a float:

In [24]: mpmath.gamma('-1.8')
Out[24]: mpf('3.1880859111102798980588599138396888912736874988148709')
> --
> You received this message because you are subscribed to the Google Groups "mpmath" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mpmath+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mpmath/5637b8f4-0a51-4244-b0d1-c60498ead87cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages