Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 252 for Complex128 (0.14 sec)

  1. src/math/cmplx/polar.go

    // license that can be found in the LICENSE file.
    
    package cmplx
    
    // Polar returns the absolute value r and phase θ of x,
    // such that x = r * e**θi.
    // The phase is in the range [-Pi, Pi].
    func Polar(x complex128) (r, θ float64) {
    	return Abs(x), Phase(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 371 bytes
    - Viewed (0)
  2. test/fixedbugs/issue58671.go

    package main
    
    func g[P any](...P) P { var zero P; return zero }
    
    var (
    	_ int        = g(1, 2)
    	_ rune       = g(1, 'a')
    	_ float64    = g(1, 'a', 2.3)
    	_ float64    = g('a', 2.3)
    	_ complex128 = g(2.3, 'a', 1i)
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 00:35:53 UTC 2023
    - 398 bytes
    - Viewed (0)
  3. src/cmd/vet/testdata/asm/asm.go

    // license that can be found in the LICENSE file.
    
    // This file contains declarations to test the assembly in asm1.s.
    
    package testdata
    
    func arg1(x int8, y uint8)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 05 01:01:31 UTC 2019
    - 310 bytes
    - Viewed (0)
  4. test/typeparam/absdiff2.go

    import (
    	"fmt"
    	"math"
    )
    
    type Numeric interface {
    	~int | ~int8 | ~int16 | ~int32 | ~int64 |
    		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
    		~float32 | ~float64 |
    		~complex64 | ~complex128
    }
    
    // numericAbs matches a struct containing a numeric type that has an Abs method.
    type numericAbs[T Numeric] interface {
    	~struct{ Value_ T }
    	Abs() T
    	Value() T
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 09 21:26:42 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  5. test/fixedbugs/issue13485.go

    package p
    
    var (
    	_ [10]int
    	_ [10.0]int
    	_ [float64(10)]int                // ERROR "invalid array bound|must be integer"
    	_ [10 + 0i]int
    	_ [complex(10, 0)]int
    	_ [complex128(complex(10, 0))]int // ERROR "invalid array bound|must be integer"
    	_ ['a']int
    	_ [rune(65)]int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 09 23:56:19 UTC 2020
    - 450 bytes
    - Viewed (0)
  6. src/encoding/gob/enc_helpers.go

    		return false
    	}
    	return encComplex128Slice(state, v.Slice(0, v.Len()))
    }
    
    func encComplex128Slice(state *encoderState, v reflect.Value) bool {
    	slice, ok := v.Interface().([]complex128)
    	if !ok {
    		// It is kind complex128 but not type complex128. TODO: We can handle this unsafely.
    		return false
    	}
    	for _, x := range slice {
    		if x != 0+0i || state.sendZero {
    			rpart := floatBits(real(x))
    			ipart := floatBits(imag(x))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 10 17:50:11 UTC 2018
    - 9.9K bytes
    - Viewed (0)
  7. src/math/cmplx/phase.go

    // license that can be found in the LICENSE file.
    
    package cmplx
    
    import "math"
    
    // Phase returns the phase (also called the argument) of x.
    // The returned value is in the range [-Pi, Pi].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 372 bytes
    - Viewed (0)
  8. test/typeparam/absdiff.go

    package main
    
    type Numeric interface {
    	~int | ~int8 | ~int16 | ~int32 | ~int64 |
    		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
    		~float32 | ~float64 |
    		~complex64 | ~complex128
    }
    
    // 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
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  9. test/fixedbugs/issue4264.go

    // license that can be found in the LICENSE file.
    
    // issue 4264: reject int division by const 0
    
    package main
    
    func main() {
    	var x int
    	var y float64
    	var z complex128
    
    	println(x/0) // ERROR "division by zero"
    	println(y/0)
    	println(z/0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 30 19:21:08 UTC 2013
    - 366 bytes
    - Viewed (0)
  10. 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)
Back to top