- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for ComplexAbsDifference (0.29 sec)
-
test/typeparam/absdiff3.go
func OrderedAbsDifference[T OrderedNumeric](a, b T) T { return absDifference(a, b, Abs[T]) } // ComplexAbsDifference returns the absolute value of the difference // between a and b, where a and b are of a complex type. func ComplexAbsDifference[T Complex](a, b T) T { return absDifference(a, b, ComplexAbs[T]) } func main() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 2.6K bytes - Viewed (0) -
test/typeparam/absdiff.go
// func orderedAbsDifference[T orderedNumeric](a, b T) T { // return T(absDifference(orderedAbs[T](a), orderedAbs[T](b))) // } // // // ComplexAbsDifference returns the absolute value of the difference // // between a and b, where a and b are of a complex type. // func complexAbsDifference[T Complex](a, b T) T { // return T(absDifference(complexAbs[T](a), complexAbs[T](b))) // } func main() {
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/absdiff2.go
func OrderedAbsDifference[T orderedNumeric](a, b T) T { return absDifference(orderedAbs[T]{a}, orderedAbs[T]{b}) } // ComplexAbsDifference returns the absolute value of the difference // between a and b, where a and b are of a complex type. func ComplexAbsDifference[T Complex](a, b T) T { return absDifference(complexAbs[T]{a}, complexAbs[T]{b}) } func main() {
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/main.go
if got, want := a.OrderedAbsDifference(-20, 15), 35; got != want { panic(fmt.Sprintf("got = %v, want = %v", got, want)) } if got, want := a.ComplexAbsDifference(5.0+2.0i, 2.0-2.0i), 5+0i; got != want { panic(fmt.Sprintf("got = %v, want = %v", got, want)) } if got, want := a.ComplexAbsDifference(2.0-2.0i, 5.0+2.0i), 5+0i; got != want { panic(fmt.Sprintf("got = %v, want = %v", got, want)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 879 bytes - Viewed (0) -
test/typeparam/absdiffimp.dir/main.go
// panic(fmt.Sprintf("got = %v, want = %v", got, want)) // } // // if got, want := a.ComplexAbsDifference(5.0+2.0i, 2.0-2.0i), 5+0i; got != want { // panic(fmt.Sprintf("got = %v, want = %v", got, want)) // } // if got, want := a.ComplexAbsDifference(2.0-2.0i, 5.0+2.0i), 5+0i; got != want { // panic(fmt.Sprintf("got = %v, want = %v", got, want)) // }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 00:11:24 UTC 2021 - 998 bytes - Viewed (0) -
test/typeparam/absdiffimp.dir/a.go
// func OrderedAbsDifference[T orderedNumeric](a, b T) T { // return T(absDifference(orderedAbs[T](a), orderedAbs[T](b))) // } // // // ComplexAbsDifference returns the absolute value of the difference // // between a and b, where a and b are of a complex type. // func ComplexAbsDifference[T Complex](a, b T) T { // return T(absDifference(complexAbs[T](a), complexAbs[T](b)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 00:11:24 UTC 2021 - 2.1K bytes - Viewed (0) -
test/typeparam/absdiffimp2.dir/a.go
func OrderedAbsDifference[T orderedNumeric](a, b T) T { return absDifference(orderedAbs[T]{a}, orderedAbs[T]{b}) } // ComplexAbsDifference returns the absolute value of the difference // between a and b, where a and b are of a complex type. func ComplexAbsDifference[T Complex](a, b T) T { return absDifference(complexAbs[T]{a}, complexAbs[T]{b})
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 09 21:26:42 UTC 2022 - 2.8K bytes - Viewed (0) -
src/internal/types/testdata/check/linalg.go
// return ComplexAbs[T](complex(d, 0)) // } // // func OrderedAbsDifference[T OrderedNumeric](a, b T) T { // return T(AbsDifference(OrderedAbs[T](a), OrderedAbs[T](b))) // } // // func ComplexAbsDifference[T Complex](a, b T) T { // return T(AbsDifference(ComplexAbs[T](a), ComplexAbs[T](b)))
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/cmd/compile/internal/syntax/testdata/linalg.go
d := math.Sqrt(r * r + i * i) return ComplexAbs[T](complex(d, 0)) } func OrderedAbsDifference[T OrderedNumeric](a, b T) T { return T(AbsDifference(OrderedAbs[T](a), OrderedAbs[T](b))) } func ComplexAbsDifference[T Complex](a, b T) T { return T(AbsDifference(ComplexAbs[T](a), ComplexAbs[T](b)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 30 18:02:18 UTC 2022 - 2.1K bytes - Viewed (0) -
src/go/parser/testdata/linalg.go2
d := math.Sqrt(r * r + i * i) return ComplexAbs[T](complex(d, 0)) } func OrderedAbsDifference[T OrderedNumeric](a, b T) T { return T(AbsDifference(OrderedAbs[T](a), OrderedAbs[T](b))) } func ComplexAbsDifference[T Complex](a, b T) T { return T(AbsDifference(ComplexAbs[T](a), ComplexAbs[T](b)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 15:34:22 UTC 2021 - 2K bytes - Viewed (0)