Standard library / math/big

big.Float.String()

Render using general format with ten significant digits; use Text for explicit output precision. Expected stdout: '1.25\n'.

Formal Syntax & Structure

go syntaxgo
func (x *Float) String() string

Return Value

string

Returns the result described above; see the example for the observed behavior.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math/big")
func main() {  fmt.Println(big.NewFloat(1.25).String())}
Go Reference