Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for Multiplication (0.18 sec)

  1. src/math/big/calibrate_test.go

    	return time.Duration(res.NsPerOp())
    }
    
    func computeKaratsubaThresholds() {
    	fmt.Printf("Multiplication times for varying Karatsuba thresholds\n")
    	fmt.Printf("(run repeatedly for good results)\n")
    
    	// determine Tk, the work load execution time using basic multiplication
    	Tb := measureKaratsuba(1e9) // th == 1e9 => Karatsuba multiplication disabled
    	fmt.Printf("Tb = %10s\n", Tb)
    
    	// thresholds
    	th := 4
    	th1 := -1
    	th2 := -1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  2. src/crypto/internal/edwards25519/field/fe_generic.go

    func feMulGeneric(v, a, b *Element) {
    	a0 := a.l0
    	a1 := a.l1
    	a2 := a.l2
    	a3 := a.l3
    	a4 := a.l4
    
    	b0 := b.l0
    	b1 := b.l1
    	b2 := b.l2
    	b3 := b.l3
    	b4 := b.l4
    
    	// Limb multiplication works like pen-and-paper columnar multiplication, but
    	// with 51-bit limbs instead of digits.
    	//
    	//                          a4   a3   a2   a1   a0  x
    	//                          b4   b3   b2   b1   b0  =
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 27 01:16:19 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  3. src/crypto/internal/nistec/p256_ordinv.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build (amd64 || arm64) && !purego
    
    package nistec
    
    import "errors"
    
    // Montgomery multiplication modulo org(G). Sets res = in1 * in2 * R⁻¹.
    //
    //go:noescape
    func p256OrdMul(res, in1, in2 *p256OrdElement)
    
    // Montgomery square modulo org(G), repeated n times (n >= 1).
    //
    //go:noescape
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. src/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go

    			h1, c = bits.Add64(h1, binary.LittleEndian.Uint64(buf[8:16]), c)
    			h2 += c
    
    			msg = nil
    		}
    
    		// Multiplication of big number limbs is similar to elementary school
    		// columnar multiplication. Instead of digits, there are 64-bit limbs.
    		//
    		// We are multiplying a 3 limbs number, h, by a 2 limbs number, r.
    		//
    		//                        h2    h1    h0  x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  5. src/math/big/floatconv.go

    	// may be a nonzero exponent exp. The radix point amounts to a
    	// division by b**(-fcount). An exponent means multiplication by
    	// ebase**exp. Finally, mantissa normalization (shift left) requires
    	// a correcting multiplication by 2**(-shiftcount). Multiplications
    	// are commutative, so we can apply them in any order as long as there
    	// is no loss of precision. We only have powers of 2 and 10, and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  6. src/runtime/internal/math/math.go

    // license that can be found in the LICENSE file.
    
    package math
    
    import "internal/goarch"
    
    const MaxUintptr = ^uintptr(0)
    
    // MulUintptr returns a * b and whether the multiplication overflowed.
    // On supported platforms this is an intrinsic lowered by the compiler.
    func MulUintptr(a, b uintptr) (uintptr, bool) {
    	if a|b < 1<<(4*goarch.PtrSize) || a == 0 {
    		return a * b, false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 16:03:04 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  7. src/hash/fnv/fnv.go

    		hash ^= sum64a(c)
    		hash *= prime64
    	}
    	*s = hash
    	return len(data), nil
    }
    
    func (s *sum128) Write(data []byte) (int, error) {
    	for _, c := range data {
    		// Compute the multiplication
    		s0, s1 := bits.Mul64(prime128Lower, s[1])
    		s0 += s[1]<<prime128Shift + prime128Lower*s[0]
    		// Update the values
    		s[1] = s1
    		s[0] = s0
    		s[1] ^= uint64(c)
    	}
    	return len(data), nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 22:36:41 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/api/resource/amount_test.go

    			t.Errorf("unexpeted failure: %v", c)
    		} else if ok {
    			if c != test.c {
    				t.Errorf("%v: unexpected result: %d", test, c)
    			}
    		} else {
    			if c != test.a {
    				t.Errorf("%v: overflow multiplication mutated source: %d", test, c)
    			}
    		}
    	}
    }
    
    func TestInt64AsCanonicalString(t *testing.T) {
    	for _, test := range []struct {
    		value    int64
    		scale    Scale
    		result   string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 20:54:15 UTC 2023
    - 7K bytes
    - Viewed (0)
  9. src/crypto/ecdh/ecdh.go

    	curve      Curve
    	privateKey []byte
    	boring     *boring.PrivateKeyECDH
    	// publicKey is set under publicKeyOnce, to allow loading private keys with
    	// NewPrivateKey without having to perform a scalar multiplication.
    	publicKey     *PublicKey
    	publicKeyOnce sync.Once
    }
    
    // ECDH performs an ECDH exchange and returns the shared secret. The [PrivateKey]
    // and [PublicKey] must use the same curve.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  10. src/crypto/ecdh/nist.go

    	// invalid scalars and the zero value. BytesX returns an error for the point
    	// at infinity, but in a prime order group such as the NIST curves that can
    	// only be the result of a scalar multiplication if one of the inputs is the
    	// zero scalar or the point at infinity.
    
    	if boring.Enabled {
    		return boring.ECDH(local.boring, remote.boring)
    	}
    
    	boring.Unreachable()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top