diff options
author | xuri <xuri.me@gmail.com> | 2022-09-01 00:41:52 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-09-01 00:41:52 +0800 |
commit | 75ce2317286181e2c250c10206df892278d5b981 (patch) | |
tree | 5e040d90cbb170a0cbdc0c6a57e0b86c7bc82845 /calc.go | |
parent | 18cd63a548afa1abcddc86a998fdefa3b4cc60c1 (diff) |
This closes #1323, an error will be returned when set the not exist style ID
Diffstat (limited to 'calc.go')
-rw-r--r-- | calc.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -6037,7 +6037,7 @@ func getBetaHelperContFrac(fX, fA, fB float64) float64 { bfinished = math.Abs(cf-cfnew) < math.Abs(cf)*fMachEps } cf = cfnew - rm += 1 + rm++ } return cf } @@ -6914,7 +6914,7 @@ func (fn *formulaFuncs) CHIDIST(argsList *list.List) formulaArg { for z <= x1 { e = math.Log(z) + e s += math.Exp(c*z - a - e) - z += 1 + z++ } return newNumberFormulaArg(s) } @@ -6926,7 +6926,7 @@ func (fn *formulaFuncs) CHIDIST(argsList *list.List) formulaArg { for z <= x1 { e = e * (a / z) c = c + e - z += 1 + z++ } return newNumberFormulaArg(c*y + s) } @@ -15286,10 +15286,10 @@ func (fn *formulaFuncs) coupons(name string, arg formulaArg) formulaArg { month -= coupon } if month > 11 { - year += 1 + year++ month -= 12 } else if month < 0 { - year -= 1 + year-- month += 12 } day, lastDay := maturity.Day(), time.Date(year, time.Month(month), 1, 0, 0, 0, 0, time.UTC) |