Bug 14020 - trigamma for very large arguments
Summary: trigamma for very large arguments
Alias: None
Product: R
Classification: Unclassified
Component: Accuracy (show other bugs)
Version: old
Hardware: ix86 (32-bit) Windows 32-bit
: P5 normal
Assignee: Jitterbug compatibility account
Depends on:
Reported: 2009-10-22 07:15 UTC by Jitterbug compatibility account
Modified: 2009-10-23 17:12 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jitterbug compatibility account 2009-10-22 07:15:28 UTC
From: Jerry.Lewis@BiogenIdec.com
Full_Name: Jerry W. Lewis
Version: 2.9.2
OS: Windows XP Professional
Submission from: (NULL) (

trigamma(x) returns 0 for x>1e152, yet
  trigamma <- function(x) 1/x
gives machine accuracy for any x>1e16

Comment 1 Jitterbug compatibility account 2009-10-23 08:54:22 UTC
From: Jerry Lewis <jerry.lewis@biogenidec.com>
More generally, the accuracy and working range of psigamma(x,deriv) can be 
improved by having it return the leading term of the asymptotic expansion
whenever deriv>=1 and x>=1e15
	[[alternative HTML version deleted]]

Comment 2 Jitterbug compatibility account 2009-10-23 17:12:16 UTC
From: Martin Maechler <maechler@stat.math.ethz.ch>
>>>>> "JL" == Jerry Lewis <Jerry.Lewis@BiogenIdec.com>
>>>>>     on Thu, 22 Oct 2009 04:20:13 +0200 (CEST) writes:

    JL> Full_Name: Jerry W. Lewis
    JL> Version: 2.9.2
    JL> OS: Windows XP Professional
    JL> Submission from: (NULL) (

    JL> trigamma(x) returns 0 for x>1e152, yet
    JL> trigamma <- function(x) 1/x
    JL> gives machine accuracy for any x>1e16

Thank you, yes, and the problem is worse for digamma().
I will fix this, but not anymore for R 2.10.0 (we are in code freeze!)

Martin Maechler, ETH Zurich

Comment 3 Jitterbug compatibility account 2009-10-31 12:35:53 UTC
Audit (from Jitterbug):
Sat Oct 31 07:35:53 2009	ripley	moved from incoming to Accuracy-fixed