- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for fracu (0.04 sec)
-
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/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) -
src/math/modf_ppc64x.s
// license that can be found in the LICENSE file. //go:build ppc64 || ppc64le #include "textflag.h" // func archModf(f float64) (int float64, frac float64) TEXT ·archModf(SB),NOSPLIT,$0 FMOVD f+0(FP), F0 FRIZ F0, F1 FMOVD F1, int+8(FP) FSUB F1, F0, F2 FCPSGN F2, F0, F2 FMOVD F2, frac+16(FP)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:27 UTC 2023 - 416 bytes - Viewed (0) -
src/runtime/mkfastlog2table.go
// to disable FMA. This lets us generate the same output on all platforms. 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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Jun 26 22:12:19 UTC 2022 - 3.1K bytes - Viewed (0)