HP Forums
Polygamma strangeness - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Polygamma strangeness (/thread-8051.html)



Polygamma strangeness - John Keith - 03-28-2017 10:18 PM

I am a Prime noob (just got it yesterday!) and I noticed while messing with it some strange behavior of the Psi (polygamma) function.

Firstly, on the HP 50, PSI(1,0) in the same as Psi(1). (Note that on the '50 PSI is the polygamma function whereas Psi is the digamma function.)

On the Prime, there is the function Psi which when given two arguments calculates the polygamma function. However, Psi(1,0) returns negative infinity, not the correct answer which is negative gamma, approximately -.57721566.

The digamma function can be calculated correctly on the Prime using Psi with a single argument but that is not documented in the manual or in Help. I do not know if the behavior of Psi(x,0) is a bug or whether it is intended to calculate something other than the digamma function, but the documentation is definitely incomplete.

On a (possibly) related note, If I use the Sigma function to calculate a harmonic number, e.g.

Code:

'Sigma(n^-1, n, 1, 100)'

I get the following large ratio:

Code:

14466636279520351160221518043104131447711/2788815009188499086581352357412492142272

which is correct, but if I calculate the same sum on the HP 50 (in exact mode) I get instead

Code:

'Psi(101) - Psi(1)

which is also correct but obviously different.

I expected that the two calculators would return the same results since the CAS is essentially similar on both machines but this is just my assumption, not based on actual knowledge.

John


RE: Polygamma strangeness - parisse - 03-29-2017 06:04 AM

There is indeed a bug for Psi(x,0), I'm fixing it in giac source. Thanks for reporting.