...

Package fast

import "github.com/dop251/goja/ftoa/internal/fast"
Overview
Index

Overview ▾

Package fast contains code ported from V8 (https://github.com/v8/v8/blob/master/src/numbers/fast-dtoa.cc)

See LICENSE_V8 for the original copyright message and disclaimer.

func Dtoa

func Dtoa(v float64, mode Mode, requested_digits int, buffer []byte) (digits []byte, decimal_point int, result bool)

v must be > 0 and must not be Inf or NaN

type Mode

type Mode int
const (
    ModeShortest Mode = iota
    ModePrecision
)