MCPcopy
hub / github.com/shopspring/decimal / ExampleNewFromFloat32

Function ExampleNewFromFloat32

decimal_test.go:3631–3639  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3629}
3630
3631func ExampleNewFromFloat32() {
3632 fmt.Println(NewFromFloat32(123.123123123123).String())
3633 fmt.Println(NewFromFloat32(.123123123123123).String())
3634 fmt.Println(NewFromFloat32(-1e13).String())
3635 // OUTPUT:
3636 //123.12312
3637 //0.123123124
3638 //-10000000000000
3639}
3640
3641func ExampleNewFromFloat() {
3642 fmt.Println(NewFromFloat(123.123123123123).String())

Callers

nothing calls this directly

Calls 2

NewFromFloat32Function · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…