Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 71 for sqrt1 (0.09 sec)

  1. src/math/log.go

    //
    // __ieee754_log(x)
    // Return the logarithm of x
    //
    // Method :
    //   1. Argument Reduction: find k and f such that
    //			x = 2**k * (1+f),
    //	   where  sqrt(2)/2 < 1+f < sqrt(2) .
    //
    //   2. Approximation of log(1+f).
    //	Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
    //		 = 2s + 2/3 s**3 + 2/5 s**5 + .....,
    //	     	 = 2s + s*R
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/asm/testdata/armv6.s

    	DIVF.NE	F0, F2        // 002a821e
    	DIVD	F3, F5        // 035b85ee
    	NEGF	F0, F1        // 401ab1ee
    	NEGD	F4, F5        // 445bb1ee
    	ABSF	F0, F1        // c01ab0ee
    	ABSD	F4, F5        // c45bb0ee
    	SQRTF	F0, F1        // c01ab1ee
    	SQRTD	F4, F5        // c45bb1ee
    	MOVFD	F0, F1        // c01ab7ee
    	MOVDF	F4, F5        // c45bb7ee
    
    	LDREX	(R8), R9      // 9f9f98e1
    	LDREXD	(R11), R12    // 9fcfbbe1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 21 16:30:51 UTC 2017
    - 4.6K 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
    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. 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)
  5. src/math/big/sqrt_test.go

    )
    
    // TestFloatSqrt64 tests that Float.Sqrt of numbers with 53bit mantissa
    // behaves like float math.Sqrt.
    func TestFloatSqrt64(t *testing.T) {
    	for i := 0; i < 1e5; i++ {
    		if i == 1e2 && testing.Short() {
    			break
    		}
    		r := rand.Float64()
    
    		got := new(Float).SetPrec(53)
    		got.Sqrt(NewFloat(r))
    		want := NewFloat(math.Sqrt(r))
    		if got.Cmp(want) != 0 {
    			t.Fatalf("Sqrt(%g) =\n got %g;\nwant %g", r, got, want)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 12:54:00 UTC 2019
    - 4.8K bytes
    - Viewed (0)
  6. src/math/acosh.go

    //
    //
    // __ieee754_acosh(x)
    // Method :
    //	Based on
    //	        acosh(x) = log [ x + sqrt(x*x-1) ]
    //	we have
    //	        acosh(x) := log(x)+ln2,	if x is large; else
    //	        acosh(x) := log(2x-1/(sqrt(x*x-1)+x)) if x>2; else
    //	        acosh(x) := log1p(t+sqrt(2.0*t+t*t)); where t=x-1.
    //
    // Special cases:
    //	acosh(x) is NaN with signal if x<1.
    //	acosh(NaN) is NaN without signal.
    //
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  7. src/math/log1p.go

    	}
    
    	absx := Abs(x)
    
    	var f float64
    	var iu uint64
    	k := 1
    	if absx < Sqrt2M1 { //  |x| < Sqrt(2)-1
    		if absx < Small { // |x| < 2**-29
    			if absx < Tiny { // |x| < 2**-54
    				return x
    			}
    			return x - x*x*0.5
    		}
    		if x > Sqrt2HalfM1 { // Sqrt(2)/2-1 < x
    			// (Sqrt(2)/2-1) < x < (Sqrt(2)-1)
    			k = 0
    			f = x
    			iu = 1
    		}
    	}
    	var c float64
    	if k != 0 {
    		var u float64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  8. test/fixedbugs/issue16804.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Issue 16804: internal error for math.Sqrt as statement
    //              rather than expression
    
    package main
    
    import "math"
    
    func sqrt() {
    	math.Sqrt(2.0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Aug 21 16:49:48 UTC 2016
    - 331 bytes
    - Viewed (0)
  9. src/math/asinh.go

    //
    //
    // asinh(x)
    // Method :
    //	Based on
    //	        asinh(x) = sign(x) * log [ |x| + sqrt(x*x+1) ]
    //	we have
    //	asinh(x) := x  if  1+x*x=1,
    //	         := sign(x)*(log(x)+ln2) for large |x|, else
    //	         := sign(x)*log(2|x|+1/(|x|+sqrt(x*x+1))) if|x|>2, else
    //	         := sign(x)*log1p(|x| + x**2/(1 + sqrt(1+x**2)))
    //
    
    // Asinh returns the inverse hyperbolic sine of x.
    //
    // Special cases are:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 13 20:02:49 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  10. src/math/hypot.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package math
    
    /*
    	Hypot -- sqrt(p*p + q*q), but overflows only if the result does.
    */
    
    // Hypot returns [Sqrt](p*p + q*q), taking care to avoid
    // unnecessary overflow and underflow.
    //
    // Special cases are:
    //
    //	Hypot(±Inf, q) = +Inf
    //	Hypot(p, ±Inf) = +Inf
    //	Hypot(NaN, q) = NaN
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 850 bytes
    - Viewed (0)
Back to top