Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for sqrt32 (0.95 sec)

  1. test/codegen/math.go

    	sink64[4] = math.RoundToEven(x)
    }
    
    func sqrt(x float64) float64 {
    	// amd64:"SQRTSD"
    	// 386/sse2:"SQRTSD" 386/softfloat:-"SQRTD"
    	// arm64:"FSQRTD"
    	// arm/7:"SQRTD"
    	// mips/hardfloat:"SQRTD" mips/softfloat:-"SQRTD"
    	// mips64/hardfloat:"SQRTD" mips64/softfloat:-"SQRTD"
    	// wasm:"F64Sqrt"
    	// ppc64x:"FSQRT"
    	// riscv64: "FSQRTD"
    	return math.Sqrt(x)
    }
    
    func sqrt32(x float32) float32 {
    	// amd64:"SQRTSS"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 15:24:29 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. src/math/const.go

    	Phi = 1.61803398874989484820458683436563811772030917980576286213544862 // https://oeis.org/A001622
    
    	Sqrt2   = 1.41421356237309504880168872420969807856967187537694807317667974 // https://oeis.org/A002193
    	SqrtE   = 1.64872127070012814684865078781416357165377610071014801157507931 // https://oeis.org/A019774
    	SqrtPi  = 1.77245385090551602729816748334114518279754945612238712821380779 // https://oeis.org/A002161
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 21 14:07:39 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  3. src/math/log_amd64.s

    	ORPD    X0, X2 // X2= f1
    	SHRQ    $52, BX
    	ANDL    $0x7FF, BX
    	SUBL    $0x3FE, BX
    	XORPS   X1, X1 // break dependency for CVTSL2SD
    	CVTSL2SD BX, X1 // x1= k, x2= f1
    	// if f1 < math.Sqrt2/2 { k -= 1; f1 *= 2 }
    	MOVSD   $HSqrt2, X0 // x0= 0.7071, x1= k, x2= f1
    	CMPSD   X2, X0, 5 // cmpnlt; x0= 0 or ^0, x1= k, x2 = f1
    	MOVSD   $1.0, X3 // x0= 0 or ^0, x1= k, x2 = f1, x3= 1
    	ANDPD   X0, X3 // x0= 0 or ^0, x1= k, x2 = f1, x3= 0 or 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 23 20:52:57 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/testdata/sqrtConst_test.go

    	name string
    	in   float64 // used for error messages, not an input
    	got  float64
    	want float64
    }{
    	{"sqrt0", 0, math.Sqrt(0), 0},
    	{"sqrt1", 1, math.Sqrt(1), 1},
    	{"sqrt2", 2, math.Sqrt(2), math.Sqrt2},
    	{"sqrt4", 4, math.Sqrt(4), 2},
    	{"sqrt100", 100, math.Sqrt(100), 10},
    	{"sqrt101", 101, math.Sqrt(101), 10.04987562112089},
    }
    
    var nanTests = [...]struct {
    	name string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 1.3K bytes
    - Viewed (0)
  5. test/typeparam/issue50193.go

    func zero[T Complex]() T {
    	return T(0)
    }
    func pi[T Complex]() T {
    	return T(3.14)
    }
    func sqrtN1[T Complex]() T {
    	return T(-1i)
    }
    
    func main() {
    	fmt.Println(zero[complex128]())
    	fmt.Println(pi[complex128]())
    	fmt.Println(sqrtN1[complex128]())
    	fmt.Println(zero[complex64]())
    	fmt.Println(pi[complex64]())
    	fmt.Println(sqrtN1[complex64]())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 599 bytes
    - Viewed (0)
  6. src/math/sqrt.go

    // and "bias" are found in src/math/bits.go
    
    // Sqrt returns the square root of x.
    //
    // Special cases are:
    //
    //	Sqrt(+Inf) = +Inf
    //	Sqrt(±0) = ±0
    //	Sqrt(x < 0) = NaN
    //	Sqrt(NaN) = NaN
    func Sqrt(x float64) float64 {
    	return sqrt(x)
    }
    
    // Note: On systems where Sqrt is a single instruction, the compiler
    // may turn a direct call into a direct use of that instruction instead.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 15 17:07:57 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  7. src/math/big/sqrt.go

    import (
    	"math"
    	"sync"
    )
    
    var threeOnce struct {
    	sync.Once
    	v *Float
    }
    
    func three() *Float {
    	threeOnce.Do(func() {
    		threeOnce.v = NewFloat(3.0)
    	})
    	return threeOnce.v
    }
    
    // Sqrt sets z to the rounded square root of x, and returns it.
    //
    // If z's precision is 0, it is changed to x's precision before the
    // operation. Rounding is performed according to z's precision and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  8. src/math/cmplx/sqrt.go

    		}
    		if real(x) < 0 {
    			return complex(0, math.Copysign(math.Sqrt(-real(x)), imag(x)))
    		}
    		return complex(math.Sqrt(real(x)), imag(x))
    	} else if math.IsInf(imag(x), 0) {
    		return complex(math.Inf(1.0), imag(x))
    	}
    	if real(x) == 0 {
    		if imag(x) < 0 {
    			r := math.Sqrt(-0.5 * imag(x))
    			return complex(r, -r)
    		}
    		r := math.Sqrt(0.5 * imag(x))
    		return complex(r, r)
    	}
    	a := real(x)
    	b := imag(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/syntax/pos.go

    type Pos struct {
    	base      *PosBase
    	line, col uint32
    }
    
    // MakePos returns a new Pos for the given PosBase, line and column.
    func MakePos(base *PosBase, line, col uint) Pos { return Pos{base, sat32(line), sat32(col)} }
    
    // TODO(gri) IsKnown makes an assumption about linebase < 1.
    // Maybe we should check for Base() != nil instead.
    
    func (pos Pos) Pos() Pos       { return pos }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 20:44:57 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  10. src/math/export_test.go

    // license that can be found in the LICENSE file.
    
    package math
    
    // Export internal functions for testing.
    var ExpGo = exp
    var Exp2Go = exp2
    var HypotGo = hypot
    var SqrtGo = sqrt
    var TrigReduce = trigReduce
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 13 06:33:18 UTC 2018
    - 357 bytes
    - Viewed (0)
Back to top