Skip to content

Commit

Permalink
osmomath: AddMut and QuoMut (#3779)
Browse files Browse the repository at this point in the history
* mut add

* test add mut

* quo  mut

* test quo mut/ remove want from test struct

* refactor exp

* change mutatives code

* change

* not allocaing

* exp change to quomut

* remove file

* refactor quo

* refactor ad

* refactor tests
  • Loading branch information
pysel authored and czarcas7ic committed Jan 5, 2023
1 parent 7d25928 commit f864dcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions osmomath/exp2.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ func exp2ChebyshevRationalApprox(x BigDec) BigDec {
for i := 1; i < len(numeratorCoefficients13Param); i++ {
x_exp_i.MulMut(x)

h_x = h_x.Add(numeratorCoefficients13Param[i].Mul(x_exp_i))
p_x = p_x.Add(denominatorCoefficients13Param[i].Mul(x_exp_i))
h_x.AddMut(numeratorCoefficients13Param[i].Mul(x_exp_i))
p_x.AddMut(denominatorCoefficients13Param[i].Mul(x_exp_i))
}

return h_x.Quo(p_x)
return h_x.QuoMut(p_x)
}

0 comments on commit f864dcf

Please sign in to comment.