- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for MulByLog2Log10 (0.16 sec)
-
src/strconv/ftoaryu_test.go
import ( "math" . "strconv" "testing" ) func TestMulByLog2Log10(t *testing.T) { for x := -1600; x <= +1600; x++ { iMath := MulByLog2Log10(x) fMath := int(math.Floor(float64(x) * math.Ln2 / math.Ln10)) if iMath != fMath { t.Errorf("mulByLog2Log10(%d) failed: %d vs %d\n", x, iMath, fMath) } } } func TestMulByLog10Log2(t *testing.T) { for x := -500; x <= +500; x++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 15 08:44:21 UTC 2021 - 759 bytes - Viewed (0) -
src/strconv/internal_test.go
old := optimize optimize = b return old } func ParseFloatPrefix(s string, bitSize int) (float64, int, error) { return parseFloatPrefix(s, bitSize) } func MulByLog2Log10(x int) int { return mulByLog2Log10(x) } func MulByLog10Log2(x int) int { return mulByLog10Log2(x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 15 08:44:21 UTC 2021 - 618 bytes - Viewed (0) -
src/strconv/ftoaryu.go
// Because mant >= 2^54, it is enough to choose: // 2^(e2+54) >= 10^(-q+prec-1) // or q = -mulByLog2Log10(e2+54) + prec - 1 // // The minimal required exponent is -mulByLog2Log10(1025)+18 = -291 // The maximal required exponent is mulByLog2Log10(1074)+18 = 342 q := -mulByLog2Log10(e2+54) + prec - 1 // Now compute mant*(2^e2)*(10^q). // Is it an exact computation?
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 09 00:28:56 UTC 2022 - 15.7K bytes - Viewed (0)