MCPcopy Index your code
hub / github.com/expr-lang/expr / printFloat

Function printFloat

internal/spew/common.go:164–166  ·  view source on GitHub ↗

printFloat outputs a floating point value using the specified precision, which is expected to be 32 or 64bit, to Writer w.

(w io.Writer, val float64, precision int)

Source from the content-addressed store, hash-verified

162// printFloat outputs a floating point value using the specified precision,
163// which is expected to be 32 or 64bit, to Writer w.
164func printFloat(w io.Writer, val float64, precision int) {
165 w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision)))
166}
167
168// printComplex outputs a complex value using the specified float precision
169// for the real and imaginary parts to Writer w.

Callers 2

formatMethod · 0.85
dumpMethod · 0.85

Calls 1

WriteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…