Standard library / math/big
big.Float.SetUint64()
Set from an unsigned 64-bit integer; zero precision defaults to 64 bits. This method writes to the receiver (use a separate destination to preserve inputs when needed). Expected stdout: '18446744073709551615\n'.
Formal Syntax & Structure
go syntaxgo
func (z *Float) SetUint64(x uint64) *FloatParameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | uint64 | Numeric operand supplied to this method. |
Return Value
*Float
Returns the result described above; see the example for the observed behavior.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/big")
func main() { z := new(big.Float).SetUint64(18446744073709551615) fmt.Println(z.Text('f', 0))}