- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 255 for ABS (0.13 sec)
-
src/math/big/int.go
if x.neg == y.neg { // x + y == x + y // (-x) + (-y) == -(x + y) z.abs = z.abs.add(x.abs, y.abs) } else { // x + (-y) == x - y == -(y - x) // (-x) + y == y - x == -(x - y) if x.abs.cmp(y.abs) >= 0 { z.abs = z.abs.sub(x.abs, y.abs) } else { neg = !neg z.abs = z.abs.sub(y.abs, x.abs) } } z.neg = len(z.abs) > 0 && neg // 0 has no sign return z }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 17:02:38 UTC 2024 - 33.1K bytes - Viewed (0) -
src/math/big/rat.go
// a squared Rat is positive and can't be reduced (no need to call norm()) z.a.neg = false z.a.abs = z.a.abs.sqr(x.a.abs) if len(x.b.abs) == 0 { z.b.abs = z.b.abs.setWord(1) } else { z.b.abs = z.b.abs.sqr(x.b.abs) } return z } z.a.Mul(&x.a, &y.a) z.b.abs = mulDenom(z.b.abs, x.b.abs, y.b.abs) return z.norm() } // Quo sets z to the quotient x/y and returns z.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 13.5K bytes - Viewed (0) -
src/cmd/internal/objabi/line.go
func AbsFile(dir, file, rewrites string) string { abs := file if dir != "" && !filepath.IsAbs(file) { abs = filepath.Join(dir, file) } abs, rewritten := ApplyRewrites(abs, rewrites) if !rewritten && buildcfg.GOROOT != "" && hasPathPrefix(abs, buildcfg.GOROOT) { abs = "$GOROOT" + abs[len(buildcfg.GOROOT):] } // Rewrite paths to match the slash convention of the target.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 23:10:31 UTC 2023 - 3.8K bytes - Viewed (0) -
src/math/big/ratmarsh.go
func (x *Rat) GobEncode() ([]byte, error) { if x == nil { return nil, nil } buf := make([]byte, 1+4+(len(x.a.abs)+len(x.b.abs))*_S) // extra bytes for version and sign bit (1), and numerator length (4) i := x.b.abs.bytes(buf) j := x.a.abs.bytes(buf[:i]) n := i - j if int(uint32(n)) != n { // this should never happen return nil, errors.New("Rat.GobEncode: numerator too large") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 2.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/tests/legalize-stablehlo-vhlo.mlir
%0 = stablehlo.abs %arg0 : tensor<f32> %1 = tfl.add %0, %arg0 {fused_activation_function = "NONE"} : tensor<f32> %2 = stablehlo.abs %1 : tensor<f32> return %2 : tensor<f32> } // ----- // CHECK-LABEL: mixed_tfl_shlo_tfl func.func @mixed_tfl_shlo_tfl(%arg0 : tensor<f32>) -> (tensor<f32>) { %0 = "tfl.abs"(%arg0) {fused_activation_function = "NONE"} : (tensor<f32>) -> tensor<f32>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Mar 07 22:39:35 UTC 2024 - 5.7K bytes - Viewed (0) -
src/internal/types/testdata/check/linalg.go
} return r } // NumericAbs matches numeric types with an Abs method. type NumericAbs[T any] interface { Numeric Abs() T } // AbsDifference computes the absolute value of the difference of // a and b, where the absolute value is determined by the Abs method. func AbsDifference[T NumericAbs[T]](a, b T) T { d := a - b return d.Abs() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 2.2K bytes - Viewed (0) -
src/math/big/ratconv.go
if n > 1e6 { return nil, false // avoid excessively large exponents } pow5 := z.b.abs.expNN(natFive, nat(nil).setWord(Word(n)), nil, false) // use underlying array of z.b.abs if exp5 > 0 { z.a.abs = z.a.abs.mul(z.a.abs, pow5) z.b.abs = z.b.abs.setWord(1) } else { z.b.abs = pow5 } } else { z.b.abs = z.b.abs.setWord(1) } // apply exp2 contributions if exp2 < -1e7 || exp2 > 1e7 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 15 22:16:34 UTC 2023 - 12.3K bytes - Viewed (0) -
src/cmd/go/internal/workcmd/use.go
func pathRel(workDir, dir string) (abs, canonical string) { if filepath.IsAbs(dir) { abs = filepath.Clean(dir) return abs, abs } abs = filepath.Join(base.Cwd(), dir) rel, err := filepath.Rel(workDir, abs) if err != nil { // The path can't be made relative to the go.work file, // so it must be kept absolute instead. return abs, abs }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Jun 03 21:13:11 UTC 2023 - 7K bytes - Viewed (0) -
src/math/big/intmarsh.go
return fmt.Errorf("Int.GobDecode: encoding version %d not supported", b>>1) } z.neg = b&1 != 0 z.abs = z.abs.setBytes(buf[1:]) return nil } // MarshalText implements the [encoding.TextMarshaler] interface. func (x *Int) MarshalText() (text []byte, err error) { if x == nil { return []byte("<nil>"), nil } return x.abs.itoa(x.neg, 10), nil } // UnmarshalText implements the [encoding.TextUnmarshaler] interface.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 2.2K bytes - Viewed (0) -
src/runtime/float.go
return !isNaN(f - f) } // isInf reports whether f is an infinity. func isInf(f float64) bool { return !isNaN(f) && !isFinite(f) } // abs returns the absolute value of x. // // Special cases are: // // abs(±Inf) = +Inf // abs(NaN) = NaN func abs(x float64) float64 { const sign = 1 << 63 return float64frombits(float64bits(x) &^ sign) } // copysign returns a value with the magnitude
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 02:39:39 UTC 2022 - 1.4K bytes - Viewed (0)