Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SetInt64 (0.21 sec)

  1. misc/cgo/gmp/pi.go

    	return tmp1.Int64()
    }
    
    func nextTerm(k int64) {
    	y2 := k*2 + 1
    	accum.Add(accum, tmp1.Lsh(numer, 1))
    	accum.Mul(accum, tmp1.SetInt64(y2))
    	numer.Mul(numer, tmp1.SetInt64(k))
    	denom.Mul(denom, tmp1.SetInt64(y2))
    }
    
    func eliminateDigit(d int64) {
    	accum.Sub(accum, tmp1.Mul(denom, tmp1.SetInt64(d)))
    	accum.Mul(accum, ten)
    	numer.Mul(numer, ten)
    }
    
    func main() {
    	i := 0
    	k := int64(0)
    	for {
    		d := int64(-1)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 10 22:32:35 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. misc/wasm/wasm_exec.js

    			}
    
    			const loadSlice = (addr) => {
    				const array = getInt64(addr + 0);
    				const len = getInt64(addr + 8);
    				return new Uint8Array(this._inst.exports.mem.buffer, array, len);
    			}
    
    			const loadSliceOfValues = (addr) => {
    				const array = getInt64(addr + 0);
    				const len = getInt64(addr + 8);
    				const a = new Array(len);
    				for (let i = 0; i < len; i++) {
    JavaScript
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon May 22 17:47:47 GMT 2023
    - 16.3K bytes
    - Viewed (1)
  3. misc/cgo/gmp/gmp.go

    // and sets z to that value.
    func (z *Int) SetBytes(b []byte) *Int {
    	z.doinit()
    	if len(b) == 0 {
    		z.SetInt64(0)
    	} else {
    		C.mpz_import(&z.i[0], C.size_t(len(b)), 1, 1, 1, 0, unsafe.Pointer(&b[0]))
    	}
    	return z
    }
    
    // SetInt64 sets z = x and returns z.
    func (z *Int) SetInt64(x int64) *Int {
    	z.doinit()
    	// TODO(rsc): more work on 32-bit platforms
    	C.mpz_set_si(&z.i[0], C.long(x))
    	return z
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
Back to top