Skip to content
/ num Public

Fractions and conversion to/from string, float64 and big numbers

License

Notifications You must be signed in to change notification settings

xyproto/num

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

num

GoDoc

Go module for dealing with fractions, and a utility for dividing two numbers and returning the simplified fraction.

Example use

> frac 2/5
⅖
> frac 0.8
⅘
> frac 123
123

Use only 100 iterations when creating a fraction that represents the given float:

> frac -m 100 0.777777777
10/13

Installation

go install github.com/xyproto/num/cmd/frac@latest

General info

  • License: BSD-3