package ftoa
Import Path
github.com/dop251/goja/ftoa (on go.dev)
Dependency Relation
imports 6 packages, and imported by one package
Involved Source Files
Package ftoa provides ECMAScript-compliant floating point number conversion to string.
It contains code ported from Rhino (https://github.com/mozilla/rhino/blob/master/src/org/mozilla/javascript/DToA.java)
as well as from the original code by David M. Gay.
See LICENSE_LUCENE for the original copyright message and disclaimer.
ftoa.go
ftobasestr.go
ftostr.go
Package-Level Type Names (only one)
func FToStr(d float64, mode FToStrMode, precision int, buffer []byte) []byte
const ModeExponential
const ModeFixed
const ModePrecision
const ModeStandard
const ModeStandardExponential
Package-Level Functions (total 2)
func FToBaseStr(num float64, radix int) string
Package-Level Constants (total 5)
Always exponential format; <precision> significant digits
Round to <precision> digits after the decimal point; exponential if number is large
Either fixed or exponential format; <precision> significant digits
Either fixed or exponential format; round-trip
Always exponential format; round-trip
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |