MCPcopy Create free account
hub / github.com/cockroachdb/apd / Float64

Method Float64

decimal.go:288–290  ·  view source on GitHub ↗

Float64 returns the float64 representation of x. This conversion may lose data (see strconv.ParseFloat for caveats).

()

Source from the content-addressed store, hash-verified

286// Float64 returns the float64 representation of x. This conversion may lose
287// data (see strconv.ParseFloat for caveats).
288func (d *Decimal) Float64() (float64, error) {
289 return strconv.ParseFloat(d.String(), 64)
290}
291
292const (
293 errExponentOutOfRangeStr = "exponent out of range"

Callers 4

LnMethod · 0.95
ExpMethod · 0.95
BenchmarkDecimalStringFunction · 0.80
TestFloat64Function · 0.80

Calls 1

StringMethod · 0.95

Tested by 2

BenchmarkDecimalStringFunction · 0.64
TestFloat64Function · 0.64