- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for setInt64 (0.09 sec)
-
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)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Apr 10 22:32:35 UTC 2023 - 1.3K bytes - Viewed (0) -
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
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 9.5K bytes - Viewed (0)