- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 68 for Rsqrt (0.06 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
src/image/jpeg/idct.go
*/ const blockSize = 64 // A DCT block is 8x8. type block [blockSize]int32 const ( w1 = 2841 // 2048*sqrt(2)*cos(1*pi/16) w2 = 2676 // 2048*sqrt(2)*cos(2*pi/16) w3 = 2408 // 2048*sqrt(2)*cos(3*pi/16) w5 = 1609 // 2048*sqrt(2)*cos(5*pi/16) w6 = 1108 // 2048*sqrt(2)*cos(6*pi/16) w7 = 565 // 2048*sqrt(2)*cos(7*pi/16) w1pw7 = w1 + w7 w1mw7 = w1 - w7 w2pw6 = w2 + w6 w2mw6 = w2 - w6 w3pw5 = w3 + w5
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 23:18:37 UTC 2019 - 5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/integrator.go
// standard deviation is sqrt( average( (x - xbar)^2 ) ) // = sqrt( Integral( x^2 + xbar^2 -2*x*xbar dt ) / Duration ) // = sqrt( ( Integral( x^2 dt ) + Duration * xbar^2 - 2*xbar*Integral(x dt) ) / Duration) // = sqrt( Integral(x^2 dt)/Duration - xbar^2 ) variance := igr.IntegralXX/igr.ElapsedSeconds - avg*avg if variance >= 0 { return avg, math.Sqrt(variance) } return avg, math.NaN()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 03 17:37:20 UTC 2022 - 5K bytes - Viewed (0) -
src/math/jn.go
// Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) if x >= Two302 { // x > 2**302 // (x >> n**2) // Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi) // Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi) // Let s=sin(x), c=cos(x), // xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then // // n sin(xn)*sqt2 cos(xn)*sqt2 // ----------------------------------
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 7.2K bytes - Viewed (0) -
test/codegen/README
with an architecture tag, followed by a colon and a quoted Go-style regexp to be matched. For example, the following test: func Sqrt(x float64) float64 { // amd64:"SQRTSD" // arm64:"FSQRTD" return math.Sqrt(x) } verifies that math.Sqrt calls are intrinsified to a SQRTSD instruction on amd64, and to a FSQRTD instruction on arm64.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 18 19:55:29 UTC 2023 - 5.2K bytes - Viewed (0)