Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 517 for bigN (0.04 sec)

  1. src/math/big/floatexample_test.go

    	operands := []float64{2.6, 2.5, 2.1, -2.1, -2.5, -2.6}
    
    	fmt.Print("   x")
    	for mode := big.ToNearestEven; mode <= big.ToPositiveInf; mode++ {
    		fmt.Printf("  %s", mode)
    	}
    	fmt.Println()
    
    	for _, f64 := range operands {
    		fmt.Printf("%4g", f64)
    		for mode := big.ToNearestEven; mode <= big.ToPositiveInf; mode++ {
    			// sample operands above require 2 bits to represent mantissa
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. src/crypto/dsa/dsa.go

    // This has better constant-time properties than Euclid's method (implemented
    // in math/big.Int.ModInverse) although math/big itself isn't strictly
    // constant-time so it's not perfect.
    func fermatInverse(k, P *big.Int) *big.Int {
    	two := big.NewInt(2)
    	pMinus2 := new(big.Int).Sub(P, two)
    	return new(big.Int).Exp(k, pMinus2, P)
    }
    
    // Sign signs an arbitrary length hash (which should be the result of hashing a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  3. src/crypto/elliptic/nistec.go

    func (curve *nistCurve[Point]) pointToAffine(p Point) (x, y *big.Int) {
    	out := p.Bytes()
    	if len(out) == 1 && out[0] == 0 {
    		// This is the encoding of the point at infinity, which the affine
    		// coordinates API represents as (0, 0) by convention.
    		return new(big.Int), new(big.Int)
    	}
    	byteLen := (curve.params.BitSize + 7) / 8
    	x = new(big.Int).SetBytes(out[1 : 1+byteLen])
    	y = new(big.Int).SetBytes(out[1+byteLen:])
    	return x, y
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 21 16:19:34 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  4. src/math/big/arith_s390x.s

    	VPDI  $0x4, V18, V18, V18 // flip the doublewords to big-endian order
    	VPDI  $0x4, V19, V19, V19 // flip the doublewords to big-endian order
    	VPDI  $0x4, V20, V20, V20 // flip the doublewords to big-endian order
    	VPDI  $0x4, V21, V21, V21 // flip the doublewords to big-endian order
    	VPDI  $0x4, V22, V22, V22 // flip the doublewords to big-endian order
    	VPDI  $0x4, V23, V23, V23 // flip the doublewords to big-endian order
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  5. misc/cgo/gmp/pi.go

    //go:build ignore
    
    package main
    
    import (
    	big "."
    	"fmt"
    	"runtime"
    )
    
    var (
    	tmp1  = big.NewInt(0)
    	tmp2  = big.NewInt(0)
    	numer = big.NewInt(1)
    	accum = big.NewInt(0)
    	denom = big.NewInt(1)
    	ten   = big.NewInt(10)
    )
    
    func extractDigit() int64 {
    	if big.CmpInt(numer, accum) > 0 {
    		return -1
    	}
    	tmp1.Lsh(numer, 1).Add(tmp1, numer).Add(tmp1, accum)
    	big.DivModInt(tmp1, tmp2, tmp1, denom)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 10 22:32:35 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  6. src/crypto/rsa/boring.go

    	for i, p := range k.Primes {
    		dst.Primes[i] = new(big.Int).Set(p)
    	}
    	if x := k.Precomputed.Dp; x != nil {
    		dst.Precomputed.Dp = new(big.Int).Set(x)
    	}
    	if x := k.Precomputed.Dq; x != nil {
    		dst.Precomputed.Dq = new(big.Int).Set(x)
    	}
    	if x := k.Precomputed.Qinv; x != nil {
    		dst.Precomputed.Qinv = new(big.Int).Set(x)
    	}
    	return dst
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 18 00:30:19 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  7. src/internal/types/testdata/check/lookup2.go

    // instead we use the big.Float and ast.File types as they provide a suitable mix of exported and un-
    // exported fields and methods.
    
    func _() {
    	var x *big.Float
    	_ = x.Neg  // OK
    	_ = x.NeG  // ERROR "x.NeG undefined (type *big.Float has no field or method NeG, but does have method Neg)"
    	_ = x.Form // ERROR "x.Form undefined (type *big.Float has no field or method Form, but does have unexported field form)"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 07 16:41:56 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. src/crypto/ecdsa/ecdsa_legacy.go

    // [SignASN1] instead of dealing directly with r, s.
    func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error) {
    	sig, err := SignASN1(rand, priv, hash)
    	if err != nil {
    		return nil, nil, err
    	}
    
    	r, s = new(big.Int), new(big.Int)
    	var inner cryptobyte.String
    	input := cryptobyte.String(sig)
    	if !input.ReadASN1(&inner, asn1.SEQUENCE) ||
    		!input.Empty() ||
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  9. src/crypto/elliptic/elliptic.go

    	IsOnCurve(x, y *big.Int) bool
    
    	// Add returns the sum of (x1,y1) and (x2,y2).
    	//
    	// Deprecated: this is a low-level unsafe API.
    	Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int)
    
    	// Double returns 2*(x,y).
    	//
    	// Deprecated: this is a low-level unsafe API.
    	Double(x1, y1 *big.Int) (x, y *big.Int)
    
    	// ScalarMult returns k*(x,y) where k is an integer in big-endian form.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/inline/inlheur/testdata/dumpscores.go

    	if x > 101 {
    		// Drive up the cost of inlining this func over the
    		// regular threshold.
    		return big(big(big(big(big(G + x)))))
    	}
    	if x < 100 {
    		// make sure this callsite is scored properly
    		G += inlinable(101, inlinable2)
    		if G == 101 {
    			return 0
    		}
    		panic(inlinable2(3))
    	}
    	return G
    }
    
    func big(q int) int {
    	return noninl(q) + noninl(-q)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 14:26:26 UTC 2023
    - 794 bytes
    - Viewed (0)
Back to top