- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for trailingZeroBits (0.27 sec)
-
src/math/big/prime.go
// The number n is known to be non-zero. func (n nat) probablyPrimeMillerRabin(reps int, force2 bool) bool { nm1 := nat(nil).sub(n, natOne) // determine q, k such that nm1 = q << k k := nm1.trailingZeroBits() q := nat(nil).shr(nm1, k) nm3 := nat(nil).sub(nm1, natTwo) rand := rand.New(rand.NewSource(int64(n[0]))) var x, y, quotient nat nm3Len := nm3.bitLen() NextRandom:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 02 14:43:52 UTC 2022 - 10.4K bytes - Viewed (0) -
src/math/big/int.go
// changes must be reviewed by a security expert. return x.abs.bitLen() } // TrailingZeroBits returns the number of consecutive least significant zero // bits of |x|. func (x *Int) TrailingZeroBits() uint { return x.abs.trailingZeroBits() } // Exp sets z = x**y mod |m| (i.e. the sign of m is ignored), and returns z.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 17:02:38 UTC 2024 - 33.1K bytes - Viewed (0) -
src/math/big/decimal.go
// Optimization: If we need to shift right, first remove any trailing // zero bits from m to reduce shift amount that needs to be done in // decimal format (since that is likely slower). if shift < 0 { ntz := m.trailingZeroBits() s := uint(-shift) if s >= ntz { s = ntz // shift at most ntz bits } m = nat(nil).shr(m, s) shift += int(s) } // Do any shift left in binary representation. if shift > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 29 22:45:29 UTC 2020 - 6.6K bytes - Viewed (0) -
src/math/big/ratconv.go
d := x.Denom().abs // d >= 1 // Determine p2 by counting factors of 2. // p2 corresponds to the trailing zero bits in d. // Do this first to reduce q as much as possible. var q nat p2 := d.trailingZeroBits() q = q.shr(d, p2) // Determine p5 by counting factors of 5. // Build a table starting with an initial power of 5, // and use repeated squaring until the factor doesn't
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 15 22:16:34 UTC 2023 - 12.3K bytes - Viewed (0) -
src/math/big/nat.go
top |= top >> 16 top |= top >> 16 >> 16 // ">> 32" doesn't compile on 32-bit architectures return i*_W + bits.Len(top) } return 0 } // trailingZeroBits returns the number of consecutive least significant zero // bits of x. func (x nat) trailingZeroBits() uint { if len(x) == 0 { return 0 } var i uint for x[i] == 0 { i++ } // x[i] != 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 31.7K bytes - Viewed (0) -
src/math/big/int_test.go
{"-0x8000000000000000000", 75}, } func TestTrailingZeroBits(t *testing.T) { for i, test := range tzbTests { in, _ := new(Int).SetString(test.in, 0) want := test.out got := in.TrailingZeroBits() if got != want { t.Errorf("#%d: got %v want %v", i, got, want) } } } func BenchmarkBitset(b *testing.B) { z := new(Int) z.SetBit(z, 512, 1) b.ResetTimer()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 58.5K bytes - Viewed (0) -
src/math/big/float.go
// The result is 0 for |x| == 0 and |x| == Inf. func (x *Float) MinPrec() uint { if x.form != finite { return 0 } return uint(len(x.mant))*_W - x.mant.trailingZeroBits() } // Mode returns the rounding mode of x. func (x *Float) Mode() RoundingMode { return x.mode } // Acc returns the accuracy of x produced by the most recent
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 15:46:54 UTC 2024 - 44.5K bytes - Viewed (0) -
api/go1.13.txt
pkg log/syslog (netbsd-arm64), method (*Writer) Write([]uint8) (int, error) pkg log/syslog (netbsd-arm64), type Priority int pkg log/syslog (netbsd-arm64), type Writer struct pkg math/big, method (*Int) TrailingZeroBits() uint pkg math/big, method (*Rat) SetUint64(uint64) *Rat pkg net/http, const SameSiteNoneMode = 4 pkg net/http, const SameSiteNoneMode SameSite pkg net/http, const StatusEarlyHints = 103
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 08 18:44:16 UTC 2019 - 452.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(*Int).SetUint64", Method, 1}, {"(*Int).Sign", Method, 0}, {"(*Int).Sqrt", Method, 8}, {"(*Int).String", Method, 0}, {"(*Int).Sub", Method, 0}, {"(*Int).Text", Method, 6}, {"(*Int).TrailingZeroBits", Method, 13}, {"(*Int).Uint64", Method, 1}, {"(*Int).UnmarshalJSON", Method, 1}, {"(*Int).UnmarshalText", Method, 3}, {"(*Int).Xor", Method, 0}, {"(*Rat).Abs", Method, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)