Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Float64frombits (0.27 sec)

  1. src/runtime/float.go

    //
    //	abs(±Inf) = +Inf
    //	abs(NaN) = NaN
    func abs(x float64) float64 {
    	const sign = 1 << 63
    	return float64frombits(float64bits(x) &^ sign)
    }
    
    // copysign returns a value with the magnitude
    // of x and the sign of y.
    func copysign(x, y float64) float64 {
    	const sign = 1 << 63
    	return float64frombits(float64bits(x)&^sign | float64bits(y)&sign)
    }
    
    // float64bits returns the IEEE 754 binary representation of f.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 02:39:39 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  2. src/math/unsafe.go

    // and Float64bits(Float64frombits(x)) == x.
    func Float64bits(f float64) uint64 { return *(*uint64)(unsafe.Pointer(&f)) }
    
    // Float64frombits returns the floating-point number corresponding
    // to the IEEE 754 binary representation b, with the sign bit of b
    // and the result in the same bit position.
    // Float64frombits(Float64bits(x)) == x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. src/math/expm1.go

    		y := 1 - (e - x)
    		y = Float64frombits(Float64bits(y) + uint64(k)<<52) // add k to y's exponent
    		return y - 1
    	}
    	if k < 20 {
    		t := Float64frombits(0x3ff0000000000000 - (0x20000000000000 >> uint(k))) // t=1-2**-k
    		y := t - (e - x)
    		y = Float64frombits(Float64bits(y) + uint64(k)<<52) // add k to y's exponent
    		return y
    	}
    	t = Float64frombits(uint64(0x3ff-k) << 52) // 2**-k
    	y := x - (e + t)
    	y++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  4. src/internal/fuzz/encoding_test.go

    uint8(0b0000000)
    byte(0x0)
    byte('\000')
    byte('\u0000')
    byte('\'')
    math.Float64frombits(9221120237041090562)
    math.Float32frombits(2143289345)`,
    			want: `go test fuzz v1
    int(0)
    rune('A')
    int64(68719476735)
    uint32(3405705229)
    uint64(18446744073709551615)
    byte('\x00')
    byte('\x00')
    byte('\x00')
    byte('\x00')
    byte('\'')
    math.Float64frombits(0x7ff8000000000002)
    math.Float32frombits(0x7fc00001)`,
    		},
    		{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 00:20:34 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. src/encoding/gob/decgen.go

    	},
    	{
    		"complex128",
    		"Complex128",
    		`real := float64FromBits(state.decodeUint())
    		imag := float64FromBits(state.decodeUint())
    		slice[i] = complex(real, imag)`,
    	},
    	{
    		"float32",
    		"Float32",
    		`slice[i] = float32(float32FromBits(state.decodeUint(), ovfl))`,
    	},
    	{
    		"float64",
    		"Float64",
    		`slice[i] = float64FromBits(state.decodeUint())`,
    	},
    	{
    		"int",
    		"Int",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 14:15:38 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. src/math/ldexp.go

    		}
    		return Inf(1)
    	}
    	var m float64 = 1
    	if exp < -1022 { // denormal
    		exp += 53
    		m = 1.0 / (1 << 53) // 2**-53
    	}
    	x &^= mask << shift
    	x |= uint64(exp+bias) << shift
    	return m * Float64frombits(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  7. src/expvar/expvar.go

    type Float struct {
    	f atomic.Uint64
    }
    
    func (v *Float) Value() float64 {
    	return math.Float64frombits(v.f.Load())
    }
    
    func (v *Float) String() string {
    	return string(v.appendJSON(nil))
    }
    
    func (v *Float) appendJSON(b []byte) []byte {
    	return strconv.AppendFloat(b, math.Float64frombits(v.f.Load()), 'g', -1, 64)
    }
    
    // Add adds delta to v.
    func (v *Float) Add(delta float64) {
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 21:32:11 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  8. src/math/fma.go

    		// rounded value overflows exponent range
    		return Float64frombits(uint64(ps)<<63 | uvinf)
    	}
    	if pe < 0 {
    		n := uint(-pe)
    		m = m>>n | nonzero(m&(1<<n-1))
    		pe = 0
    	}
    	m = ((m + 1<<9) >> 10) & ^zero((m&(1<<10-1))^1<<9)
    	pe &= -int32(nonzero(m))
    	return Float64frombits(uint64(ps)<<63 + uint64(pe)<<52 + m)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 05 22:05:30 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  9. src/math/log1p.go

    			iu = Float64bits(u)
    			k = int((iu >> 52) - 1023)
    			c = 0
    		}
    		iu &= 0x000fffffffffffff
    		if iu < 0x0006a09e667f3bcd { // mantissa of Sqrt(2)
    			u = Float64frombits(iu | 0x3ff0000000000000) // normalize u
    		} else {
    			k++
    			u = Float64frombits(iu | 0x3fe0000000000000) // normalize u/2
    			iu = (0x0010000000000000 - iu) >> 2
    		}
    		f = u - 1.0 // Sqrt(2)/2 < u < Sqrt(2)
    	}
    	hfsq := 0.5 * f * f
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  10. src/runtime/metrics/value.go

    //
    // If v.Kind() != KindFloat64, this method panics.
    func (v Value) Float64() float64 {
    	if v.kind != KindFloat64 {
    		panic("called Float64 on non-float64 metric value")
    	}
    	return math.Float64frombits(v.scalar)
    }
    
    // Float64Histogram returns the internal *Float64Histogram value for the metric.
    //
    // If v.Kind() != KindFloat64Histogram, this method panics.
    func (v Value) Float64Histogram() *Float64Histogram {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 16:59:11 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top