Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 20 days 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 13 years ago)
- Default Branch: main
- Last Pushed: 2022-09-27T18:21:19.000Z (about 2 years ago)
- Last Synced: 2024-10-05T15:25:10.612Z (about 1 month 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
[![GoDoc](https://godoc.org/github.com/xyproto/num?status.svg)](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