From a94452c8c8161b9526f5b15f89d46e18a7ad5a8a Mon Sep 17 00:00:00 2001 From: Kent English Date: Wed, 22 Feb 2017 23:18:01 -0500 Subject: [PATCH] Closes #32 --- internal/cephes/cephes.go | 2 +- internal/cephes/igam.go | 4 ++-- internal/cephes/igami.go | 2 +- internal/cephes/incbeta.go | 4 ++-- internal/cephes/ndtri.go | 4 ++-- internal/cephes/zeta.go | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/cephes/cephes.go b/internal/cephes/cephes.go index b4b4430a..9d0b6f6d 100644 --- a/internal/cephes/cephes.go +++ b/internal/cephes/cephes.go @@ -15,7 +15,7 @@ https://lists.debian.org/debian-legal/2004/12/msg00295.html */ var ( - badParamOutOfBounds = "cephes: parameter out of bounds" + paramOutOfBounds = "cephes: parameter out of bounds" badParamUnderflow = "cephes: underflow error" badParamFunctionSingularity = "cephes: function singularity" ) diff --git a/internal/cephes/igam.go b/internal/cephes/igam.go index 1abf144d..392b7691 100644 --- a/internal/cephes/igam.go +++ b/internal/cephes/igam.go @@ -135,7 +135,7 @@ func Igam(a, x float64) float64 { } if x < 0 || a <= 0 { - panic(badParamOutOfBounds) + panic(paramOutOfBounds) } // Asymptotic regime where a ~ x; see [2]. @@ -155,7 +155,7 @@ func Igam(a, x float64) float64 { // IgamC computes the complement of the incomplete Gamma integral func IgamC(a, x float64) float64 { if x < 0 || a <= 0 { - panic(badParamOutOfBounds) + panic(paramOutOfBounds) } else if x == 0 { return 1 } else if math.IsInf(x, 0) { diff --git a/internal/cephes/igami.go b/internal/cephes/igami.go index e00f49a9..1c4dc650 100644 --- a/internal/cephes/igami.go +++ b/internal/cephes/igami.go @@ -78,7 +78,7 @@ func IgamI(a, y0 float64) float64 { dithresh := 5.0 * machEp if y0 < 0 || y0 > 1 || a <= 0 { - panic(badParamOutOfBounds) + panic(paramOutOfBounds) } if y0 == 0 { diff --git a/internal/cephes/incbeta.go b/internal/cephes/incbeta.go index 87cc3759..1ea77160 100644 --- a/internal/cephes/incbeta.go +++ b/internal/cephes/incbeta.go @@ -24,7 +24,7 @@ const ( // Incbet computes the regularized incomplete beta function. func Incbet(aa, bb, xx float64) float64 { if aa <= 0 || bb <= 0 { - panic(badParamOutOfBounds) + panic(paramOutOfBounds) } if xx <= 0 || xx >= 1 { if xx == 0 { @@ -33,7 +33,7 @@ func Incbet(aa, bb, xx float64) float64 { if xx == 1 { return 1 } - panic(badParamOutOfBounds) + panic(paramOutOfBounds) } var flag int diff --git a/internal/cephes/ndtri.go b/internal/cephes/ndtri.go index 1b26abdc..1ac239d5 100644 --- a/internal/cephes/ndtri.go +++ b/internal/cephes/ndtri.go @@ -108,13 +108,13 @@ func Ndtri(y0 float64) float64 { if y0 <= 0.0 { if y0 < 0 { - panic(badParamOutOfBounds) + panic(paramOutOfBounds) } return math.Inf(-1) } if y0 >= 1.0 { if y0 > 1 { - panic(badParamOutOfBounds) + panic(paramOutOfBounds) } return math.Inf(1) } diff --git a/internal/cephes/zeta.go b/internal/cephes/zeta.go index 3a98f0c8..a05c31f5 100644 --- a/internal/cephes/zeta.go +++ b/internal/cephes/zeta.go @@ -82,7 +82,7 @@ func Zeta(x, q float64) float64 { } if x < 1 { - panic(badParamOutOfBounds) + panic(paramOutOfBounds) } if q <= 0 { @@ -90,7 +90,7 @@ func Zeta(x, q float64) float64 { panic(badParamFunctionSingularity) } if x != math.Floor(x) { - panic(badParamOutOfBounds) // because q^-x not defined + panic(paramOutOfBounds) // because q^-x not defined } }