Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 600 for add64 (0.05 sec)

  1. src/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go

    		if len(msg) >= TagSize {
    			h0, c = bits.Add64(h0, binary.LittleEndian.Uint64(msg[0:8]), 0)
    			h1, c = bits.Add64(h1, binary.LittleEndian.Uint64(msg[8:16]), c)
    			h2 += c + 1
    
    			msg = msg[TagSize:]
    		} else {
    			var buf [TagSize]byte
    			copy(buf[:], msg)
    			buf[len(msg)] = 1
    
    			h0, c = bits.Add64(h0, binary.LittleEndian.Uint64(buf[0:8]), 0)
    			h1, c = bits.Add64(h1, binary.LittleEndian.Uint64(buf[8:16]), c)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  2. test/fixedbugs/issue27718.go

    // license that can be found in the LICENSE file.
    
    // (-0)+0 should be 0, not -0.
    
    package main
    
    //go:noinline
    func add64(x float64) float64 {
    	return x + 0
    }
    
    func testAdd64() {
    	var zero float64
    	inf := 1.0 / zero
    	negZero := -1 / inf
    	if 1/add64(negZero) != inf {
    		panic("negZero+0 != posZero (64 bit)")
    	}
    }
    
    //go:noinline
    func sub64(x float64) float64 {
    	return x - 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 28 02:29:42 UTC 2019
    - 1.6K bytes
    - Viewed (0)
  3. src/math/rand/v2/pcg.go

    		incHi = 6364136223846793005
    		incLo = 1442695040888963407
    	)
    
    	// state = state * mul + inc
    	hi, lo = bits.Mul64(p.lo, mulLo)
    	hi += p.hi*mulLo + p.lo*mulHi
    	lo, c := bits.Add64(lo, incLo, 0)
    	hi, _ = bits.Add64(hi, incHi, c)
    	p.lo = lo
    	p.hi = hi
    	return hi, lo
    }
    
    // Uint64 return a uniformly-distributed random uint64 value.
    func (p *PCG) Uint64() uint64 {
    	hi, lo := p.next()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. src/runtime/internal/math/math.go

    	lo = x * y
    	return
    }
    
    // Add64 returns the sum with carry of x, y and carry: sum = x + y + carry.
    // The carry input must be 0 or 1; otherwise the behavior is undefined.
    // The carryOut output is guaranteed to be 0 or 1.
    //
    // This function's execution time does not depend on the inputs.
    // On supported platforms this is an intrinsic lowered by the compiler.
    func Add64(x, y, carry uint64) (sum, carryOut uint64) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 16:03:04 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  5. src/math/bits/example_math_test.go

    func ExampleAdd64() {
    	// First number is 33<<64 + 12
    	n1 := []uint64{33, 12}
    	// Second number is 21<<64 + 23
    	n2 := []uint64{21, 23}
    	// Add them together without producing carry.
    	d1, carry := bits.Add64(n1[1], n2[1], 0)
    	d0, _ := bits.Add64(n1[0], n2[0], carry)
    	nsum := []uint64{d0, d1}
    	fmt.Printf("%v + %v = %v (carry bit was %v)\n", n1, n2, nsum, carry)
    
    	// First number is 1<<64 + 9223372036854775808
    	n1 = []uint64{1, 0x8000000000000000}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 11 21:27:05 UTC 2021
    - 6.3K bytes
    - Viewed (0)
  6. src/crypto/internal/edwards25519/field/fe_generic.go

    // bits.Mul64 and bits.Add64 intrinsics.
    type uint128 struct {
    	lo, hi uint64
    }
    
    // mul64 returns a * b.
    func mul64(a, b uint64) uint128 {
    	hi, lo := bits.Mul64(a, b)
    	return uint128{lo, hi}
    }
    
    // addMul64 returns v + a * b.
    func addMul64(v uint128, a, b uint64) uint128 {
    	hi, lo := bits.Mul64(a, b)
    	lo, c := bits.Add64(lo, v.lo, 0)
    	hi, _ = bits.Add64(hi, v.hi, c)
    	return uint128{lo, hi}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 27 01:16:19 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  7. src/math/trig_reduce.go

    	// Multiply mantissa by the digits and extract the upper two digits (hi, lo).
    	z2hi, _ := bits.Mul64(z2, ix)
    	z1hi, z1lo := bits.Mul64(z1, ix)
    	z0lo := z0 * ix
    	lo, c := bits.Add64(z1lo, z2hi, 0)
    	hi, _ := bits.Add64(z0lo, z1hi, c)
    	// The top 3 bits are j.
    	j = hi >> 61
    	// Extract the fraction and find its magnitude.
    	hi = hi<<3 | lo>>61
    	lz := uint(bits.LeadingZeros64(hi))
    	e := uint64(bias - (lz + 1))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  8. src/math/fma.go

    	zm1, zm2 = shrcompress(zm1, zm2, uint(pe-ze))
    
    	// Compute resulting significands, normalizing if necessary.
    	var m, c uint64
    	if ps == zs {
    		// Adding (pm1:pm2) + (zm1:zm2)
    		pm2, c = bits.Add64(pm2, zm2, 0)
    		pm1, _ = bits.Add64(pm1, zm1, c)
    		pe -= int32(^pm1 >> 63)
    		pm1, m = shrcompress(pm1, pm2, uint(64+pm1>>63))
    	} else {
    		// Subtracting (pm1:pm2) - (zm1:zm2)
    		// TODO: should we special-case cancellation?
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 05 22:05:30 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  9. src/net/netip/uint128.go

    // subOne returns u - 1.
    func (u uint128) subOne() uint128 {
    	lo, borrow := bits.Sub64(u.lo, 1, 0)
    	return uint128{u.hi - borrow, lo}
    }
    
    // addOne returns u + 1.
    func (u uint128) addOne() uint128 {
    	lo, carry := bits.Add64(u.lo, 1, 0)
    	return uint128{u.hi + carry, lo}
    }
    
    // halves returns the two uint64 halves of the uint128.
    //
    // Logically, think of it as returning two uint64s.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 07 21:28:44 UTC 2022
    - 2.2K bytes
    - Viewed (1)
  10. src/math/cmplx/tan.go

    	// Multiply mantissa by the digits and extract the upper two digits (hi, lo).
    	z2hi, _ := bits.Mul64(z2, ix)
    	z1hi, z1lo := bits.Mul64(z1, ix)
    	z0lo := z0 * ix
    	lo, c := bits.Add64(z1lo, z2hi, 0)
    	hi, _ := bits.Add64(z0lo, z1hi, c)
    	// Find the magnitude of the fraction.
    	lz := uint(bits.LeadingZeros64(hi))
    	e := uint64(bias - (lz + 1))
    	// Clear implicit mantissa bit and shift into place.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 8.5K bytes
    - Viewed (0)
Back to top