Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for mod_sqrt (0.88 sec)

  1. src/math/big/int_test.go

    	if z != &sqrtChk || z.Cmp(sqrt) != 0 {
    		t.Errorf("ModSqrt returned inconsistent value %s", z)
    	}
    	sqChk.Sub(sq, mod)
    	z = sqrtChk.ModSqrt(&sqChk, mod)
    	if z != &sqrtChk || z.Cmp(sqrt) != 0 {
    		t.Errorf("ModSqrt returned inconsistent value %s", z)
    	}
    
    	// test x aliasing z
    	z = sqrtChk.ModSqrt(sqrtChk.Set(sq), mod)
    	if z != &sqrtChk || z.Cmp(sqrt) != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  2. src/crypto/elliptic/elliptic.go

    		return nil, nil
    	}
    	p := curve.Params().P
    	x = new(big.Int).SetBytes(data[1:])
    	if x.Cmp(p) >= 0 {
    		return nil, nil
    	}
    	// y² = x³ - 3x + b
    	y = curve.Params().polynomial(x)
    	y = y.ModSqrt(y, p)
    	if y == nil {
    		return nil, nil
    	}
    	if byte(y.Bit(0)) != data[0]&1 {
    		y.Neg(y).Mod(y, p)
    	}
    	if !curve.IsOnCurve(x, y) {
    		return nil, nil
    	}
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 9K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modload/buildlist.go

    // The dependencies of the roots will be loaded lazily at the first call to the
    // Graph method.
    //
    // The rootModules slice must be sorted according to gover.ModSort.
    // The caller must not modify the rootModules slice or direct map after passing
    // them to newRequirements.
    //
    // If vendoring is in effect, the caller must invoke initVendor on the returned
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 16:04:44 UTC 2024
    - 53.8K bytes
    - Viewed (0)
  4. src/math/big/int.go

    		b.Mul(&b, &g).Mod(&b, p)
    		r = m
    	}
    }
    
    // ModSqrt sets z to a square root of x mod p if such a square root exists, and
    // returns z. The modulus p must be an odd prime. If x is not a square mod p,
    // ModSqrt leaves z unchanged and returns nil. This function panics if p is
    // not an odd integer, its behavior is undefined if p is odd but not prime.
    func (z *Int) ModSqrt(x, p *Int) *Int {
    	switch Jacobi(x, p) {
    	case -1:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 17:02:38 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modcmd/vendor.go

    	for m := range isExplicit {
    		vendorMods = append(vendorMods, m)
    	}
    	for m := range modpkgs {
    		if !isExplicit[m] {
    			vendorMods = append(vendorMods, m)
    		}
    	}
    	gover.ModSort(vendorMods)
    
    	var (
    		buf bytes.Buffer
    		w   io.Writer = &buf
    	)
    	if cfg.BuildV {
    		w = io.MultiWriter(&buf, os.Stderr)
    	}
    
    	if modload.MainModules.WorkFile() != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 14:19:59 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/tests/decompose_resource_ops.mlir

        // CHECK: [[MG_SUB:%.*]] = "tf.Sub"([[MS_NEW]], [[MG_MG]])
        // CHECK: [[MG_NEW:%.*]] = "tf.AddV2"([[MG_SUB]], [[EPSILON]])
        // CHECK: [[MG_SQRT:%.*]] = "tf.Sqrt"([[MG_NEW]])
        // CHECK: [[MOM_DIV:%.*]] = "tf.Div"([[LR_GRAD]], [[MG_SQRT]])
        // CHECK: [[MOM_NEW:%.*]] = "tf.AddV2"([[MOM_MOM]], [[MOM_DIV]])
    
        // CHECK: [[VAR:%.*]] = "tf.ReadVariableOp"([[VAR_HANDLE]])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 51.3K bytes
    - Viewed (0)
  7. src/cmd/go/internal/modload/edit.go

    	for rootsDirty && len(conflicts) == 0 {
    		roots = roots[:0]
    		for p, v := range selectedRoot {
    			if v != "none" {
    				roots = append(roots, module.Version{Path: p, Version: v})
    			}
    		}
    		gover.ModSort(roots)
    
    		// First, we extend the graph so that it includes the selected version
    		// of every root. The upgraded roots are in addition to the original
    		// roots, so we will have enough information to trace a path to each
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 21:46:32 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modload/load.go

    			// that we can.
    			break
    		}
    
    		toAdd := make([]module.Version, 0, len(modAddedBy))
    		for m := range modAddedBy {
    			toAdd = append(toAdd, m)
    		}
    		gover.ModSort(toAdd) // to make errors deterministic
    
    		// We ran updateRequirements before resolving missing imports and it didn't
    		// make any changes, so we know that the requirement graph is already
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 84K bytes
    - Viewed (0)
  9. src/cmd/go/internal/modload/init.go

    		}
    		modFile := modFiles[0]
    		roots, direct = rootsFromModFile(MainModules.mustGetSingleMainModule(), modFile, withToolchainRoot)
    	}
    
    	gover.ModSort(roots)
    	rs := newRequirements(pruning, roots, direct)
    	return rs
    }
    
    type addToolchainRoot bool
    
    const (
    	omitToolchainRoot addToolchainRoot = false
    	withToolchainRoot                  = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
  10. src/cmd/go/internal/load/pkg.go

    			}
    		}
    		q = append(q, p1.Internal.Imports...)
    	}
    	sortedMods := make([]module.Version, 0, len(mdeps))
    	for mod := range mdeps {
    		sortedMods = append(sortedMods, mod)
    	}
    	gover.ModSort(sortedMods)
    	deps := make([]*debug.Module, len(sortedMods))
    	for i, mod := range sortedMods {
    		deps[i] = mdeps[mod]
    	}
    
    	pkgPath := p.ImportPath
    	if p.Internal.CmdlineFiles {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
Back to top