- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 312 for newRat (0.21 sec)
-
src/go/constant/value_test.go
{Bool, false, false}, {String, "hello", "hello"}, {Int, int64(1), int64(1)}, {Int, big.NewInt(10), int64(10)}, {Int, new(big.Int).Lsh(big.NewInt(1), 62), int64(1 << 62)}, dup(Int, new(big.Int).Lsh(big.NewInt(1), 63)), {Float, big.NewFloat(0), floatVal0.val}, dup(Float, big.NewFloat(2.0)), dup(Float, big.NewRat(1, 3)), } { val := Make(test.arg) got := Val(val)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 15.6K bytes - Viewed (0) -
src/crypto/rsa/rsa.go
Qinv, err := bigmod.NewNat().SetBytes(priv.Precomputed.Qinv.Bytes(), P) if err != nil { return nil, ErrDecryption } c, err = bigmod.NewNat().SetBytes(ciphertext, N) if err != nil { return nil, ErrDecryption } // m = c ^ Dp mod p m = bigmod.NewNat().Exp(t0.Mod(c, P), priv.Precomputed.Dp.Bytes(), P) // m2 = c ^ Dq mod q
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 23.4K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa.go
} // SEC 1, Version 2.0, Section 4.1.4 r, err := bigmod.NewNat().SetBytes(rBytes, c.N) if err != nil || r.IsZero() == 1 { return false } s, err := bigmod.NewNat().SetBytes(sBytes, c.N) if err != nil || s.IsZero() == 1 { return false } e := bigmod.NewNat() hashToNat(c, e, hash) // w = s⁻¹ w := bigmod.NewNat() inverse(c, w, s) // p₁ = [e * s⁻¹]G
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 20.4K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat.go
// are likely to be more efficient if necessary. table := [(1 << 4) - 1]*Nat{ // table[i] = x ^ (i+1) // newNat calls are unrolled so they are allocated on the stack. NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), } table[0].set(x).montgomeryRepresentation(m) for i := 1; i < len(table); i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 24K bytes - Viewed (0) -
pkg/apis/certificates/validation/validation_test.go
goodCert1 := mustMakeCertificate(t, &x509.Certificate{ SerialNumber: big.NewInt(0), Subject: pkix.Name{ CommonName: "root1", }, IsCA: true, BasicConstraintsValid: true, }) goodCert2 := mustMakeCertificate(t, &x509.Certificate{ SerialNumber: big.NewInt(0), Subject: pkix.Name{ CommonName: "root2", }, IsCA: true,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 03 18:40:49 UTC 2023 - 61K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat_test.go
N, _ := NewModulusFromBig(n) A := NewNat().setBig(a).ExpandFor(N) B := NewNat().setBig(b).ExpandFor(N) if A.Mul(B, N).IsZero() != 1 { t.Error("a * b mod (a * b) != 0") } i := new(big.Int).ModInverse(a, b) N, _ = NewModulusFromBig(b) A = NewNat().setBig(a).ExpandFor(N) I := NewNat().setBig(i).ExpandFor(N) one := NewNat().setBig(big.NewInt(1)).ExpandFor(N) if A.Mul(I, N).Equal(one) != 1 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 12 00:56:20 UTC 2024 - 11.6K bytes - Viewed (0) -
src/runtime/slice.go
// gives a smooth-ish transition between the two. newcap += (newcap + 3*threshold) >> 2 // We need to check `newcap >= newLen` and whether `newcap` overflowed. // newLen is guaranteed to be larger than zero, hence // when newcap overflows then `uint(newcap) > uint(newLen)`. // This allows to check for both with the same comparison. if uint(newcap) >= uint(newLen) { break } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 12.2K bytes - Viewed (0) -
test/fixedbugs/bug284.go
// Test cases for revised conversion rules. package main func main() { type NewInt int i0 := 0 var i1 int = 1 var i2 NewInt = 1 i0 = i0 i0 = i1 i0 = int(i2) i1 = i0 i1 = i1 i1 = int(i2) i2 = NewInt(i0) i2 = NewInt(i1) i2 = i2 type A1 [3]int type A2 [3]NewInt var a0 [3]int var a1 A1 var a2 A2 a0 = a0 a0 = a1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 04:49:59 UTC 2012 - 3.5K bytes - Viewed (0) -
test/fixedbugs/issue9604b.go
a = append(a, r.Lsh(r, t.bits-1).Sub(r, big.NewInt(1))) r = big.NewInt(1) a = append(a, r.Lsh(r, t.bits-1).Sub(r, big.NewInt(2))) r = big.NewInt(1) a = append(a, r.Lsh(r, t.bits-1).Neg(r)) r = big.NewInt(1) a = append(a, r.Lsh(r, t.bits-1).Neg(r).Add(r, big.NewInt(1))) } else { r := big.NewInt(1) a = append(a, r.Lsh(r, t.bits).Sub(r, big.NewInt(1))) r = big.NewInt(1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 4.8K bytes - Viewed (0) -
test/fixedbugs/issue29013b.go
} type Int struct { i int } func NewInt(v int) Int { return Int{i: v} } var Suites = []TestSuite{ Dicts, } var Dicts = TestSuite{ Tests: []Test{ { Want: map[Int]bool{NewInt(1): true}, }, { Want: map[Int]string{ NewInt(3): "3", }, }, }, } func main() { if Suites[0].Tests[0].Want.(map[Int]bool)[NewInt(3)] { panic("bad") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 03 16:48:21 UTC 2018 - 616 bytes - Viewed (0)