- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for dfrac (0.04 sec)
-
src/strconv/ftoaryu.go
extra := uint(-dexp2) extraMask := uint32(1<<extra - 1) di, dfrac := di>>extra, di&extraMask roundUp := false if exact { // If we computed an exact product, d + 1/2 // should round to d+1 if 'd' is odd. roundUp = dfrac > 1<<(extra-1) || (dfrac == 1<<(extra-1) && !d0) || (dfrac == 1<<(extra-1) && d0 && di&1 == 1) } else { // otherwise, d+1/2 always rounds up because
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 09 00:28:56 UTC 2022 - 15.7K bytes - Viewed (0) -
src/math/ldexp.go
return frac } frac, e := normalize(frac) exp += e x := Float64bits(frac) exp += int(x>>shift)&mask - bias if exp < -1075 { return Copysign(0, frac) // underflow } if exp > 1023 { // overflow if frac < 0 { return Inf(-1) } return Inf(1) } var m float64 = 1 if exp < -1022 { // denormal exp += 53 m = 1.0 / (1 << 53) // 2**-53 } x &^= mask << shift
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 1.1K bytes - Viewed (0) -
src/math/frexp.go
// and an integral power of two. // It returns frac and exp satisfying f == frac × 2**exp, // with the absolute value of frac in the interval [½, 1). // // Special cases are: // // Frexp(±0) = ±0, 0 // Frexp(±Inf) = ±Inf, 0 // Frexp(NaN) = NaN, 0 func Frexp(f float64) (frac float64, exp int) { if haveArchFrexp { return archFrexp(f) } return frexp(f) } func frexp(f float64) (frac float64, exp int) { // special cases
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 929 bytes - Viewed (0) -
src/runtime/vdso_freebsd.go
var timekeepSharedPage *vdsoTimekeep //go:nosplit func (bt *bintime) Add(bt2 *bintime) { u := bt.frac bt.frac += bt2.frac if u > bt.frac { bt.sec++ } bt.sec += bt2.sec } //go:nosplit func (bt *bintime) AddX(x uint64) { u := bt.frac bt.frac += x if u > bt.frac { bt.sec++ } } var ( // binuptimeDummy is used in binuptime as the address of an atomic.Load, to simulate
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 2.4K bytes - Viewed (0) -
src/math/modf.go
// // Modf(±Inf) = ±Inf, NaN // Modf(NaN) = NaN, NaN func Modf(f float64) (int float64, frac float64) { if haveArchModf { return archModf(f) } return modf(f) } func modf(f float64) (int float64, frac float64) { if f < 1 { switch { case f < 0: int, frac = Modf(-f) return -int, -frac case f == 0: return f, f // Return -0, -0 when f == -0 } return 0, f }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 913 bytes - Viewed (0) -
src/math/modf_arm64.s
// license that can be found in the LICENSE file. #include "textflag.h" // func archModf(f float64) (int float64, frac float64) TEXT ·archModf(SB),NOSPLIT,$0 MOVD f+0(FP), R0 FMOVD R0, F0 FRINTZD F0, F1 FMOVD F1, int+8(FP) FSUBD F1, F0 FMOVD F0, R1 AND $(1<<63), R0 ORR R0, R1 // must have same sign MOVD R1, frac+16(FP)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 15 15:48:19 UTC 2021 - 447 bytes - Viewed (0) -
src/math/example_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 07 18:09:53 UTC 2021 - 3.7K bytes - Viewed (0) -
src/internal/trace/mud.go
mudDegree = 1024 ) type edge struct { // At x, the function increases by y. x, delta float64 // Additionally at x is a Dirac delta function with area dirac. dirac float64 } // add adds a uniform function over [l, r] scaled so the total weight // of the uniform is area. If l==r, this adds a Dirac delta function. func (d *mud) add(l, r, area float64) { if area == 0 { return } if r < l { l, r = r, l }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5.7K bytes - Viewed (0) -
src/math/log10.go
if haveArchLog2 { return archLog2(x) } return log2(x) } func log2(x float64) float64 { frac, exp := 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 Log(frac)*(1/Ln2) + float64(exp)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 873 bytes - Viewed (0) -
src/math/big/example_rat_test.go
if n%3 != 1 { term.SetInt64(1) } else { term.SetInt64((n - 1) / 3 * 2) } if n > lim { return term } // Directly initialize frac as the fractional // inverse of the result of recur. frac := new(big.Rat).Inv(recur(n+1, lim)) return term.Add(term, frac) } // This example demonstrates how to use big.Rat to compute the // first 15 terms in the sequence of rational convergents for
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 1.7K bytes - Viewed (0)