https://github.com/xyproto/num
Fractions and conversion to/from string, float64 and big numbers
https://github.com/xyproto/num
conversions denominator fractions mathematics numerator
Last synced: about 2 months ago
JSON representation
Fractions and conversion to/from string, float64 and big numbers
- Host: GitHub
- URL: https://github.com/xyproto/num
- Owner: xyproto
- License: bsd-3-clause
- Created: 2011-04-02T14:56:08.000Z (over 14 years ago)
- Default Branch: main
- Last Pushed: 2022-09-27T18:21:19.000Z (almost 3 years ago)
- Last Synced: 2025-01-11T01:10:39.380Z (6 months ago)
- Topics: conversions, denominator, fractions, mathematics, numerator
- Language: Go
- Homepage:
- Size: 72.3 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# num
[](http://godoc.org/github.com/xyproto/num)
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
123Use 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