_float

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64ToString

func Float64ToString(from float64) string

float64 to string

func FormatFloat

func FormatFloat(f float64, fmt byte, prec, bitSize int) string

func MoneyAdd

func MoneyAdd(left, right float64, round int) float64

金额相加

func MoneyDivide

func MoneyDivide(left, right float64, round int) float64

金额相除

func MoneyFloor

func MoneyFloor(x float64, round int) float64

金额舍去 round 位之后的数字

func MoneyMultiply

func MoneyMultiply(left, right float64, round int) float64

金额相乘

func MoneySubtract

func MoneySubtract(left, right float64, round int) float64

金额相减

func ParseFloat

func ParseFloat(s string, bitSize int) (float64, error)

func Round

func Round(x float64, round int) float64

四舍五入 todo 增加 round mode

Types

This section is empty.

Jump to

Keyboard shortcuts

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