Ticket #199 (closed defect)
Bug in gamma-inc implementation and documentation
Reported by: | williams | Owned by: | williams |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | williams/science.plt | Keywords: | |
Cc: | noelwelsh@… | Version: | (3 5) |
Racket Version: | 4.2.1 |
Description
Noel Welsh send the following:
The gamma-inc function in the science collection has an error:
In gamma-inc-impl.ss it reads:
(define (gamma-inc-F-CF a x)
(define nmax 5000)
(define small (exp double-epsilon 3))
...
That last function call should be expt, not exp.
The documentation for gamma-inc states
"Computes the normalized incomplete gamma function"
but the equation below that line corresponds to the *un*normalised
function. I compared the corrected function against Matlab and believe
it is correctly implementing the unnormalised function.
Change History
Note: See
TracTickets for help on using
tickets.