- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for fastlog2Table (0.35 sec)
-
src/runtime/fastlog2table.go
// Code generated by mkfastlog2table.go; DO NOT EDIT. // Run go generate from src/runtime to update. // See mkfastlog2table.go for comments. package runtime const fastlogNumBits = 5 var fastlog2Table = [1<<fastlogNumBits + 1]float64{ 0, 0.0443941193584535, 0.08746284125033943, 0.12928301694496647, 0.16992500144231248, 0.2094533656289499, 0.24792751344358555, 0.28540221886224837, 0.3219280948873623,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 09 07:21:16 UTC 2019 - 904 bytes - Viewed (0) -
src/runtime/mkfastlog2table.go
fmt.Fprintln(&buf, "var fastlog2Table = [1<<fastlogNumBits + 1]float64{") table := computeTable() for _, t := range table { fmt.Fprintf(&buf, "\t%v,\n", t) } fmt.Fprintln(&buf, "}") if err := os.WriteFile("fastlog2table.go", buf.Bytes(), 0644); err != nil { log.Fatalln(err) } } const fastlogNumBits = 5 func computeTable() []float64 { fastlog2Table := make([]float64, 1<<fastlogNumBits+1)
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/runtime/fastlog2.go
xManIndex := (xBits >> (52 - fastlogNumBits)) % (1 << fastlogNumBits) xManScale := (xBits >> (52 - fastlogNumBits - fastlogScaleBits)) % (1 << fastlogScaleBits) low, high := fastlog2Table[xManIndex], fastlog2Table[xManIndex+1] return float64(xExp) + low + (high-low)*float64(xManScale)*fastlogScaleRatio
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 15 22:45:17 UTC 2017 - 1.2K bytes - Viewed (0)