Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for smallFloat64 (0.38 sec)

  1. src/go/constant/value.go

    // if converted to a *big.Rat.
    func smallInt(x *big.Int) bool {
    	return x.BitLen() < maxExp
    }
    
    // smallFloat64 reports whether x would lead to "reasonably"-sized fraction
    // if converted to a *big.Rat.
    func smallFloat64(x float64) bool {
    	if math.IsInf(x, 0) {
    		return false
    	}
    	_, e := math.Frexp(x)
    	return -maxExp < e && e < maxExp
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
Back to top