- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 28 for Ln2 (0.02 sec)
-
src/runtime/mkfastlog2table.go
func log2(x float64) float64 { frac, exp := math.Frexp(x) // Make sure exact powers of two give an exact answer. // Don't depend on Log(0.5)*(1/Ln2)+exp being exactly exp-1. if frac == 0.5 { return float64(exp - 1) } return float64(nlog(frac)*(1/math.Ln2)) + float64(exp) } // nlog is a local copy of math.Log with explicit float64 conversions // to disable FMA. This lets us generate the same output on all platforms.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Jun 26 22:12:19 UTC 2022 - 3.1K bytes - Viewed (0) -
src/math/exp.go
// // // exp(x) // Returns the exponential of x. // // Method // 1. Argument reduction: // Reduce x to an r so that |r| <= 0.5*ln2 ~ 0.34658. // Given x, find r and integer k such that // // x = k*ln2 + r, |r| <= 0.5*ln2. // // Here r will be represented as r = hi-lo for better // accuracy. // // 2. Approximation of exp(r) by a special rational function on
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 5.4K bytes - Viewed (0) -
src/net/net_fake_test.go
} else { t.Errorf("unexpected error from Dial: %v\nwant: %v", err, syscall.EADDRINUSE) } // Opening a Listener should fail at this point too. ln2, err := Listen("tcp", "localhost:0") if err == nil { ln2.Close() } if errors.Is(err, syscall.EADDRINUSE) { t.Logf("Listen returned expected error: %v", err) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 2.8K bytes - Viewed (0) -
src/net/listen_test.go
if err != nil { t.Fatal(err) } if err := checkFirstListener(tt.network, ln1); err != nil { ln1.Close() t.Fatal(err) } ln2, err := Listen(tt.network, JoinHostPort(tt.address, ln1.(*TCPListener).port())) if err == nil { ln2.Close() } if err := checkSecondListener(tt.network, tt.address, err); err != nil { ln1.Close() t.Fatal(err) } ln1.Close() } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 20.5K bytes - Viewed (0) -
src/math/log.go
// log(1+f) = f - s*(f - R) (if f is not too large) // log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy) // // 3. Finally, log(x) = k*Ln2 + log(1+f). // = k*Ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*Ln2_lo))) // Here Ln2 is split into two floating point number: // Ln2_hi + Ln2_lo, // where n*Ln2_hi is always exact for |n| < 2000. // // Special cases:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 3.9K bytes - Viewed (0) -
src/math/log1p.go
// In order to guarantee error in log below 1ulp, we compute log // by // log1p(f) = f - (hfsq - s*(hfsq+R)). // // 3. Finally, log1p(x) = k*ln2 + log1p(f). // = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo))) // Here ln2 is split into two floating point number: // ln2_hi + ln2_lo, // where n*ln2_hi is always exact for |n| < 2000. // // Special cases:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 6.3K bytes - Viewed (0) -
src/math/exp_arm64.s
MOVD $NearZero, R0 FMOVD R0, F2 FABSD F0, F3 FMOVD $1.0, F1 // F1 = 1.0 FCMPD F2, F3 BLT nearzero // fabs(x) < NearZero, return 1 + x // argument reduction, x = k*ln2 + r, |r| <= 0.5*ln2 // computed as r = hi - lo for extra precision. FMOVD $Log2e, F2 FMOVD $0.5, F3 FNMSUBD F0, F3, F2, F4 // Log2e*x - 0.5 FMADDD F0, F3, F2, F3 // Log2e*x + 0.5 FCMPD $0.0, F0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 15 15:48:19 UTC 2021 - 5.4K bytes - Viewed (0) -
src/math/erfinv.go
r := 0.180625 - 0.25*x*x z1 := ((((((a7*r+a6)*r+a5)*r+a4)*r+a3)*r+a2)*r+a1)*r + a0 z2 := ((((((b7*r+b6)*r+b5)*r+b4)*r+b3)*r+b2)*r+b1)*r + b0 ans = (x * z1) / z2 } else { var z1, z2 float64 r := Sqrt(Ln2 - Log(1.0-x)) if r <= 5.0 { r -= 1.6 z1 = ((((((c7*r+c6)*r+c5)*r+c4)*r+c3)*r+c2)*r+c1)*r + c0 z2 = ((((((d7*r+d6)*r+d5)*r+d4)*r+d3)*r+d2)*r+d1)*r + d0 } else { r -= 5.0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 3.4K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/BloomFilter.java
// m: total bits // n: expected insertions // b: m/n, bits per insertion // p: expected false positive probability // // 1) Optimal k = b * ln2 // 2) p = (1 - e ^ (-kn/m))^k // 3) For optimal k: p = 2 ^ (-k) ~= 0.6185^b // 4) For optimal k: m = -nlnp / ((ln2) ^ 2) /** * Computes the optimal k (number of hashes per element inserted in Bloom filter), given the
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 23.1K bytes - Viewed (0) -
guava/src/com/google/common/hash/BloomFilter.java
// m: total bits // n: expected insertions // b: m/n, bits per insertion // p: expected false positive probability // // 1) Optimal k = b * ln2 // 2) p = (1 - e ^ (-kn/m))^k // 3) For optimal k: p = 2 ^ (-k) ~= 0.6185^b // 4) For optimal k: m = -nlnp / ((ln2) ^ 2) /** * Computes the optimal k (number of hashes per element inserted in Bloom filter), given the
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 26.3K bytes - Viewed (0)