Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for float64FromBits (0.28 sec)

  1. 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)
  2. 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)
  3. src/math/big/float_test.go

    		{"0x1.9p-1074", math.Float64frombits(0x00000000000000002), Above},
    
    		{"0x2.0p-1074", math.Float64frombits(0x00000000000000002), Exact},
    		{"0x2.8p-1074", math.Float64frombits(0x00000000000000002), Below}, // rounded down to even
    		{"0x2.9p-1074", math.Float64frombits(0x00000000000000003), Above},
    
    		{"0x3.0p-1074", math.Float64frombits(0x00000000000000003), Exact},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 51.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/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)
  9. 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)
  10. test/codegen/math.go

    	// Like math.Copysign(c, -1), but with integer operations. Useful
    	// for platforms that have a copysign opcode to see if it's detected.
    	// s390x:"LNDFR\t",-"MOVD\t"     (no integer load/store)
    	sink64[2] = math.Float64frombits(math.Float64bits(a) | 1<<63)
    
    	// amd64:"ANDQ","ORQ"
    	// s390x:"CPSDR\t",-"MOVD\t"     (no integer load/store)
    	// ppc64x:"FCPSGN"
    	// riscv64:"FSGNJD"
    	sink64[3] = math.Copysign(-1, c)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 15:24:29 UTC 2024
    - 6.2K bytes
    - Viewed (0)
Back to top