Standard library / math

math.Float64bits()

Returns the IEEE 754 binary64 bit representation, preserving the sign bit. Expected stdout: '4607182418800017408\n'.

Formal Syntax & Structure

go syntaxgo
func Float64bits(f float64) uint64

Parameters & Attributes

NameTypeDescription
ffloat64Input floating-point value.

Return Value

uint64

Returns the IEEE 754 binary64 bit representation, preserving the sign bit.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  fmt.Println(math.Float64bits(1))}
Go Reference