Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 252 for Complex128 (0.17 sec)

  1. src/math/cmplx/abs.go

    // Annex G IEC 60559-compatible complex arithmetic.
    package cmplx
    
    import "math"
    
    // Abs returns the absolute value (also called the modulus) of x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 523 bytes
    - Viewed (0)
  2. test/ken/cplx0.go

    // Test trivial, bootstrap-level complex numbers, including printing.
    
    package main
    
    const (
    	R = 5
    	I = 6i
    
    	C1 = R + I // ADD(5,6)
    )
    
    func doprint(c complex128) { println(c) }
    
    func main() {
    
    	// constants
    	println(C1)
    	doprint(C1)
    
    	// variables
    	c1 := C1
    	println(c1)
    	doprint(c1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 31 17:36:45 UTC 2018
    - 455 bytes
    - Viewed (0)
  3. src/go/types/exprstring_test.go

    	dup("42"),
    	dup("3.1415"),
    	dup("2.71828i"),
    	dup(`'a'`),
    	dup(`"foo"`),
    	dup("`bar`"),
    	dup("any"),
    
    	// func and composite literals
    	{"func(){}", "(func() literal)"},
    	{"func(x int) complex128 {}", "(func(x int) complex128 literal)"},
    	{"[]int{1, 2, 3}", "[]int{…}"},
    
    	// type expressions
    	dup("[1 << 10]byte"),
    	dup("[]int"),
    	dup("*int"),
    	dup("struct{x int}"),
    	dup("func()"),
    	dup("func(int, float32) string"),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 17:08:18 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/testdata/linalg.go

    type Numeric interface {
    	~int | ~int8 | ~int16 | ~int32 | ~int64 |
    		uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
    		float32 | ~float64 |
    		complex64 | ~complex128
    }
    
    func DotProduct[T Numeric](s1, s2 []T) T {
    	if len(s1) != len(s2) {
    		panic("DotProduct: slices of unequal length")
    	}
    	var r T
    	for i := range s1 {
    		r += s1[i] * s2[i]
    	}
    	return r
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 30 18:02:18 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  5. src/math/cmplx/exp.go

    //    DEC       -10,+10      8700       3.7e-17     1.1e-17
    //    IEEE      -10,+10     30000       3.0e-16     8.7e-17
    
    // Exp returns e**x, the base-e exponential of x.
    func Exp(x complex128) complex128 {
    	switch re, im := real(x), imag(x); {
    	case math.IsInf(re, 0):
    		switch {
    		case re > 0 && im == 0:
    			return x
    		case math.IsInf(im, 0) || math.IsNaN(im):
    			if re < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  6. test/ken/cplx2.go

    		panic("fail")
    	}
    	
    	r32 := real(complex64(ce))
    	if r32 != float32(real(Ce)) {
    		println("real(complex64(ce))", r32, real(Ce))
    		panic("fail")
    	}
    	
    	r64 := real(complex128(ce))
    	if r64 != real(Ce) {
    		println("real(complex128(ce))", r64, real(Ce))
    		panic("fail")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 1.9K bytes
    - Viewed (0)
  7. src/internal/types/testdata/fixedbugs/issue49296.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    func _[
            T0 any,
            T1 []int,
            T2 ~float64 | ~complex128 | chan int,
    ]() {
            _ = T0(nil /* ERROR "cannot convert nil to type T0" */ )
            _ = T1(1 /* ERRORx `cannot convert 1 .* to type T1` */ )
            _ = T2(2 /* ERRORx `cannot convert 2 .* to type T2` */ )
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 560 bytes
    - Viewed (0)
  8. test/abi/fuzz_trailing_zero_field.go

    package main
    
    var p0exp = S1{
    	F1: complex(float64(2.3640607624715027), float64(-0.2717825524109192)),
    	F2: S2{F1: 9},
    	F3: 103050709,
    }
    
    type S1 struct {
    	F1 complex128
    	F2 S2
    	F3 uint64
    }
    
    type S2 struct {
    	F1 uint64
    	F2 empty
    }
    
    type empty struct {
    }
    
    //go:noinline
    //go:registerparams
    func callee(p0 S1) {
    	if p0 != p0exp {
    		panic("bad p0")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 01 15:50:43 UTC 2021
    - 551 bytes
    - Viewed (0)
  9. tensorflow/c/kernels/ops/bitcast.cc

          "uint32, uint64, int8, int16, complex64, complex128, qint8, quint8, "
          "qint16, quint16, qint32}");
      TF_OpDefinitionBuilderAddAttr(
          op_builder,
          "type: {bfloat16, half, float, double, int64, int32, uint8, uint16, "
          "uint32, uint64, int8, int16, complex64, complex128, qint8, quint8, "
          "qint16, quint16, qint32}");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 07:51:50 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  10. test/fixedbugs/bug334.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Issue 1716
    
    package main
    
    type (
    	cplx64  complex64
    	cplx128 complex128
    )
    
    func (c cplx64) Foo()  {}
    func (c cplx128) Foo() {}
    
    func main() {
    	var c64 cplx128
    	var c128 cplx64
    	c64.Foo()
    	c128.Foo()
    }
    
    /*
    bug334.go:16: invalid receiver type cplx64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 618 bytes
    - Viewed (0)
Back to top