- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for complexAbs (0.13 sec)
-
src/go/parser/testdata/linalg.go2
if a < 0 { return -a } return a } // ComplexAbs is a helper type that defines an Abs method for // complex types. type ComplexAbs[T Complex] T func (a ComplexAbs[T]) Abs() ComplexAbs[T] { r := float64(real(a)) i := float64(imag(a)) d := math.Sqrt(r * r + i * i) return ComplexAbs[T](complex(d, 0)) } func OrderedAbsDifference[T OrderedNumeric](a, b T) T {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 15:34:22 UTC 2021 - 2K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/testdata/linalg.go
if a < 0 { return -a } return a } // ComplexAbs is a helper type that defines an Abs method for // complex types. type ComplexAbs[T Complex] T func (a ComplexAbs[T]) Abs() ComplexAbs[T] { r := float64(real(a)) i := float64(imag(a)) d := math.Sqrt(r * r + i * i) return ComplexAbs[T](complex(d, 0)) } func OrderedAbsDifference[T OrderedNumeric](a, b T) T {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 30 18:02:18 UTC 2022 - 2.1K bytes - Viewed (0) -
test/typeparam/absdiff.go
// if a < 0 { // return -a // } // return a // } // // // complexAbs is a helper type that defines an Abs method for // // complex types. // type complexAbs[T Complex] T // // func (a complexAbs[T]) Abs() complexAbs[T] { // r := float64(real(a)) // i := float64(imag(a)) // d := math.Sqrt(r*r + i*i) // return complexAbs[T](complex(d, 0)) // } //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 2.9K bytes - Viewed (0) -
test/typeparam/absdiffimp.dir/a.go
// if a < 0 { // return -a // } // return a // } // // // complexAbs is a helper type that defines an Abs method for // // complex types. // type complexAbs[T Complex] T // // func (a complexAbs[T]) Abs() complexAbs[T] { // r := float64(real(a)) // i := float64(imag(a)) // d := math.Sqrt(r*r + i*i) // return complexAbs[T](complex(d, 0)) // } //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 00:11:24 UTC 2021 - 2.1K bytes - Viewed (0) -
src/internal/types/testdata/check/linalg.go
// if a < 0 { // return -a // } // return a // } // // // ComplexAbs is a helper type that defines an Abs method for // // complex types. // type ComplexAbs[T Complex] T // // func (a ComplexAbs[T]) Abs() ComplexAbs[T] { // r := float64(real(a)) // i := float64(imag(a)) // d := math.Sqrt(r * r + i * i) // return ComplexAbs[T](complex(d, 0)) // } // // func OrderedAbsDifference[T OrderedNumeric](a, b T) T {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 2.2K bytes - Viewed (0) -
test/typeparam/absdiff2.go
// implications on the spec. See issue #51576. // Use accessor method instead. func (a orderedAbs[T]) Value() T { return a.Value_ } // complexAbs is a helper type that defines an Abs method for // a struct containing a complex type. type complexAbs[T Complex] struct { Value_ T } func realimag(x any) (re, im float64) { switch z := x.(type) { case complex64: re = float64(real(z))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 09 21:26:42 UTC 2022 - 3.6K bytes - Viewed (0) -
test/typeparam/absdiffimp2.dir/a.go
// implications on the spec. See issue #51576. // Use accessor method instead. func (a orderedAbs[T]) Value() T { return a.Value_ } // complexAbs is a helper type that defines an Abs method for // a struct containing a complex type. type complexAbs[T Complex] struct { Value_ T } func realimag(x any) (re, im float64) { switch z := x.(type) { case complex64: re = float64(real(z))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 09 21:26:42 UTC 2022 - 2.8K bytes - Viewed (0) -
test/typeparam/absdiff3.go
case complex64: re = float64(real(z)) im = float64(imag(z)) case complex128: re = real(z) im = imag(z) default: panic("unknown complex type") } return } func ComplexAbs[T Complex](a T) T { // TODO use direct conversion instead of realimag once #50937 is fixed r, i := realimag(a) // r := float64(real(a)) // i := float64(imag(a)) d := math.Sqrt(r*r + i*i) return T(complex(d, 0))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 2.6K bytes - Viewed (0) -
tensorflow/cc/framework/gradient_checker.h
/// <X_T, Y_T, JAC_T> should be <complex64, complex64, float> /// Note that JAC_T is always real-valued, and should be an appropriate /// precision to host the partial derivatives for dy/dx /// /// if y = ComplexAbs(x) where x is DT_COMPLEX64 (so y is DT_FLOAT) /// <X_T, Y_T, JAC_T> should be <complex64, float, float> /// /// if y = Complex(x, x) where x is DT_FLOAT (so y is DT_COMPLEX64)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 05 15:35:17 UTC 2022 - 2.8K bytes - Viewed (0) -
tensorflow/compiler/jit/mark_for_compilation_pass.cc
static absl::flat_hash_map<string, std::vector<string>>* result = new absl::flat_hash_map<string, std::vector<string>>{ // Unary {"PW", {"ComplexAbs", "Angle", "Conj", "Abs", "Acos", "Acosh", "Asin", "Atan", "Atanh", "Ceil", "Cos", "Cosh", "Sin", "Exp", "Expm1", "Floor", "IsFinite", "IsInf", "IsNan", "Inv", "Reciprocal", "Log",
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 21 12:19:41 UTC 2024 - 85.3K bytes - Viewed (0)