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)
| 162 | // printFloat outputs a floating point value using the specified precision, |
| 163 | // which is expected to be 32 or 64bit, to Writer w. |
| 164 | func 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. |