vendor: Mega update all dependencies
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4080
This commit is contained in:
12
vendor/github.com/cznic/mathutil/mathutil.go
generated
vendored
12
vendor/github.com/cznic/mathutil/mathutil.go
generated
vendored
@@ -5,7 +5,9 @@
|
||||
// Package mathutil provides utilities supplementing the standard 'math' and
|
||||
// 'math/rand' packages.
|
||||
//
|
||||
// Compatibility issues
|
||||
// Release history and compatibility issues
|
||||
//
|
||||
// 2016-10-10: New functions QuadPolyDiscriminant and QuadPolyFactors.
|
||||
//
|
||||
// 2013-12-13: The following functions have been REMOVED
|
||||
//
|
||||
@@ -89,7 +91,7 @@ func GCDUint16(a, b uint16) uint16 {
|
||||
return a
|
||||
}
|
||||
|
||||
// GCD returns the greatest common divisor of a and b.
|
||||
// GCDUint32 returns the greatest common divisor of a and b.
|
||||
func GCDUint32(a, b uint32) uint32 {
|
||||
for b != 0 {
|
||||
a, b = b, a%b
|
||||
@@ -97,7 +99,7 @@ func GCDUint32(a, b uint32) uint32 {
|
||||
return a
|
||||
}
|
||||
|
||||
// GCD64 returns the greatest common divisor of a and b.
|
||||
// GCDUint64 returns the greatest common divisor of a and b.
|
||||
func GCDUint64(a, b uint64) uint64 {
|
||||
for b != 0 {
|
||||
a, b = b, a%b
|
||||
@@ -257,7 +259,7 @@ func ModPowByte(b, e, m byte) byte {
|
||||
return byte(r)
|
||||
}
|
||||
|
||||
// ModPowByte computes (b^e)%m. It panics for m == 0 || b == e == 0.
|
||||
// ModPowUint16 computes (b^e)%m. It panics for m == 0 || b == e == 0.
|
||||
func ModPowUint16(b, e, m uint16) uint16 {
|
||||
if b == 0 && e == 0 {
|
||||
panic(0)
|
||||
@@ -382,7 +384,7 @@ func MulUint128_64(a, b uint64) (hi, lo uint64) {
|
||||
mid2 := ahi * blo
|
||||
c1, lo := AddUint128_64(lo, mid1<<w)
|
||||
c2, lo := AddUint128_64(lo, mid2<<w)
|
||||
_, hi = AddUint128_64(ahi*bhi, mid1>>w+mid2>>w+uint64(c1+c2))
|
||||
_, hi = AddUint128_64(ahi*bhi, mid1>>w+mid2>>w+c1+c2)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user