ryu

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2021 License: MIT, Apache-2.0 Imports: 4 Imported by: 0

README

This is a copy of selected parts from https://github.com/cespare/ryu/.

Documentation

Overview

Package ryu implements the Ryu algorithm for quickly converting floating point numbers into strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFloat32

func AppendFloat32(b []byte, f float32) []byte

AppendFloat32 appends the string form of the 32-bit floating point number f, as generated by FormatFloat32, to b and returns the extended buffer.

func AppendFloat64

func AppendFloat64(b []byte, f float64) []byte

AppendFloat64 appends the string form of the 64-bit floating point number f, as generated by FormatFloat64, to b and returns the extended buffer. It behaves like strconv.AppendFloat(b, f, 'e', -1, 64).

func AppendFloat64f

func AppendFloat64f(b []byte, f float64) []byte

AppendFloat64 appends the string form of the 64-bit floating point number f, as generated by FormatFloat64, to b and returns the extended buffer. It behaves like strconv.AppendFloat(b, f, 'f', -1, 64).

func FormatFloat32

func FormatFloat32(f float32) string

FormatFloat32 converts a 32-bit floating point number f to a string. It behaves like strconv.FormatFloat(float64(f), 'e', -1, 32).

func FormatFloat64

func FormatFloat64(f float64) string

FormatFloat64 converts a 64-bit floating point number f to a string. It behaves like strconv.FormatFloat(f, 'e', -1, 64).

func FormatFloat64f

func FormatFloat64f(f float64) string

FormatFloat64 converts a 64-bit floating point number f to a string. It behaves like strconv.FormatFloat(f, 'f', -1, 64).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL