Skip to content

Commit

Permalink
Update math/gf8192/gf8192.go
Browse files Browse the repository at this point in the history
Co-authored-by: Armando Faz <armfazh@users.noreply.github.com>
  • Loading branch information
pufferffish and armfazh committed Oct 10, 2022
1 parent ab6b880 commit 6a03acb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions math/gf8192/gf8192.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ func sqr2Mul(a, b Gf) Gf {

// Inv calculates the multiplicative inverse of Gf element a
func Inv(a Gf) Gf {
return Div(a, 1)
return Div(1, a)
}

// Div calculates a / b
func Div(b, a Gf) Gf {
func Div(a, b Gf) Gf {
tmp3 := sqrMul(b, b) // b^3
tmp15 := sqr2Mul(tmp3, tmp3) // b^15 = b^(3*2*2+3)
out := sqr2(tmp15)
Expand Down

0 comments on commit 6a03acb

Please sign in to comment.