Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 206 for sqrt1 (0.93 sec)

  1. 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)
  2. guava/src/com/google/common/math/BigIntegerMath.java

           */
          sqrt0 = sqrtApproxWithDoubles(x.shiftRight(shift)).shiftLeft(shift >> 1);
        }
        BigInteger sqrt1 = sqrt0.add(x.divide(sqrt0)).shiftRight(1);
        if (sqrt0.equals(sqrt1)) {
          return sqrt0;
        }
        do {
          sqrt0 = sqrt1;
          sqrt1 = sqrt0.add(x.divide(sqrt0)).shiftRight(1);
        } while (sqrt1.compareTo(sqrt0) < 0);
        return sqrt0;
      }
    
      @GwtIncompatible // TODO
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/BigIntegerMath.java

           */
          sqrt0 = sqrtApproxWithDoubles(x.shiftRight(shift)).shiftLeft(shift >> 1);
        }
        BigInteger sqrt1 = sqrt0.add(x.divide(sqrt0)).shiftRight(1);
        if (sqrt0.equals(sqrt1)) {
          return sqrt0;
        }
        do {
          sqrt0 = sqrt1;
          sqrt1 = sqrt0.add(x.divide(sqrt0)).shiftRight(1);
        } while (sqrt1.compareTo(sqrt0) < 0);
        return sqrt0;
      }
    
      @GwtIncompatible // TODO
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  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/cmd/internal/obj/arm/anames.go

    	"NMULAF",
    	"NMULAD",
    	"MULSF",
    	"MULSD",
    	"NMULSF",
    	"NMULSD",
    	"FMULAF",
    	"FMULAD",
    	"FNMULAF",
    	"FNMULAD",
    	"FMULSF",
    	"FMULSD",
    	"FNMULSF",
    	"FNMULSD",
    	"DIVF",
    	"DIVD",
    	"SQRTF",
    	"SQRTD",
    	"ABSF",
    	"ABSD",
    	"NEGF",
    	"NEGD",
    	"SRL",
    	"SRA",
    	"SLL",
    	"MULU",
    	"DIVU",
    	"MUL",
    	"MMUL",
    	"DIV",
    	"MOD",
    	"MODU",
    	"DIVHW",
    	"DIVUHW",
    	"MOVB",
    	"MOVBS",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 16 15:58:33 UTC 2019
    - 1.4K bytes
    - Viewed (0)
  9. src/cmd/internal/obj/mips/anames.go

    	"NEGD",
    	"NEGF",
    	"NEGW",
    	"NEGV",
    	"NOOP",
    	"NOR",
    	"OR",
    	"REM",
    	"REMU",
    	"RFE",
    	"ROTR",
    	"ROTRV",
    	"SC",
    	"SCV",
    	"SEB",
    	"SEH",
    	"SGT",
    	"SGTU",
    	"SLL",
    	"SQRTD",
    	"SQRTF",
    	"SRA",
    	"SRL",
    	"SUB",
    	"SUBD",
    	"SUBF",
    	"SUBU",
    	"SUBW",
    	"SYNC",
    	"SYSCALL",
    	"TEQ",
    	"TLBP",
    	"TLBR",
    	"TLBWI",
    	"TLBWR",
    	"TNE",
    	"WORD",
    	"WSBH",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 08 12:17:12 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  10. src/cmd/internal/obj/loong64/anames.go

    	"MULU",
    	"MULH",
    	"MULHU",
    	"MULW",
    	"NEGD",
    	"NEGF",
    	"NEGW",
    	"NEGV",
    	"NOOP",
    	"NOR",
    	"OR",
    	"REM",
    	"REMU",
    	"RFE",
    	"SC",
    	"SCV",
    	"SGT",
    	"SGTU",
    	"SLL",
    	"SQRTD",
    	"SQRTF",
    	"SRA",
    	"SRL",
    	"ROTR",
    	"SUB",
    	"SUBD",
    	"SUBF",
    	"SUBU",
    	"SUBW",
    	"DBAR",
    	"SYSCALL",
    	"TEQ",
    	"TNE",
    	"WORD",
    	"XOR",
    	"MASKEQZ",
    	"MASKNEZ",
    	"MOVV",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 02:04:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
Back to top