Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 925 for sum (0.06 sec)

  1. test/typeparam/sum.go

    package main
    
    import (
    	"fmt"
    )
    
    func Sum[T interface{ int | float64 }](vec []T) T {
    	var sum T
    	for _, elt := range vec {
    		sum = sum + elt
    	}
    	return sum
    }
    
    func Abs(f float64) float64 {
    	if f < 0.0 {
    		return -f
    	}
    	return f
    }
    
    func main() {
    	vec1 := []int{3, 4}
    	vec2 := []float64{5.8, 9.6}
    	got := Sum[int](vec1)
    	want := vec1[0] + vec1[1]
    	if got != want {
    Registered: 2024-06-12 16:32
    - Last Modified: 2022-03-01 19:45
    - 923 bytes
    - Viewed (0)
  2. platforms/documentation/docs/src/snippets/native-binaries/assembler/groovy/src/main/headers/sum.h

    // Ensure that function name is consistently mapped to assembler
    #ifdef _MSC_VER
    int sum(int a, int b);
    #else
    extern int sum(int a, int b) asm("_sum");
    Registered: 2024-06-12 18:38
    - Last Modified: 2023-11-27 17:53
    - 159 bytes
    - Viewed (0)
  3. hack/tools/go.sum

    Stephen Kitt <******@****.***> 1696262516 +0200
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-03-07 08:12
    - 93.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/go.sum

    Kubernetes Prow Robot <******@****.***> 1718228831 -0700
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-06-12 21:47
    - 49.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/cli-runtime/go.sum

    Ben Luddy <******@****.***> 1715279458 -0400
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-06-10 14:02
    - 25.3K bytes
    - Viewed (0)
  6. go.sum

    Istio Automation <******@****.***> 1718206348 -0400
    Registered: 2024-06-14 15:00
    - Last Modified: 2024-06-12 15:32
    - 101.6K bytes
    - Viewed (0)
  7. docs/debugging/inspect/go.sum

    Harshavardhana <******@****.***> 1716888464 -0700
    Registered: 2024-06-16 00:44
    - Last Modified: 2024-05-28 09:27
    - 3.3K bytes
    - Viewed (0)
  8. src/crypto/internal/edwards25519/field/_asm/go.sum

    Filippo Valsorda <******@****.***> 1659352315 +0200
    Registered: 2024-06-12 16:32
    - Last Modified: 2022-11-10 18:45
    - 3.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/api/go.sum

    Ben Luddy <******@****.***> 1715279458 -0400
    Registered: 2024-06-15 01:39
    - Last Modified: 2024-06-10 14:02
    - 11.2K bytes
    - Viewed (0)
  10. docs/debugging/s3-verify/go.sum

    dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1715577034 -0700
    Registered: 2024-06-16 00:44
    - Last Modified: 2024-05-13 17:59
    - 3.2K bytes
    - Viewed (0)
Back to top