0.1.3 • Published 3 years ago
cnum v0.1.3
cnum
Comfortably Numbers (cnum) represents rational numbers and related mathematical expressions in a biginteresting way.
Demo
Install
yarn add cnumUsage
Build System
import {Rat} from 'cnum'
// a = 71/7
const a = new Rat(71, 7)
// b = 35/113
const b = new Rat(35, 113)
// c = a⋅b
const c = a.mul(b)
c.toString() // 355/113
c.valueOf() // 3.1415929203539825Node
const {Rat} = require('cnum')
const r = new Rat(7, 11)
r.profileScript Tags
<script src="https://unpkg.com/cnum"></script>
<script>
const r = new Rat(4, 13)
console.log(r.profile)
</script>Command Line Interface
$ cnum "(5/7) + (2/3) ^ (5/9)"
42352677594770199369/28000000000000000000
$ cnum
cnum> 2/7
2/7 (≈0.28571428571428571429)CLI in Browser
Read the Docs
CLI Commands
- yarn install: Install dependencies
- yarn dev: Run tests when source files are changed
- yarn lint --fix: Lint with ESLint
- yarn test: Run Jest tests
- yarn doc: Build documentation
- yarn build: Production build
- yarn prepublish: Prepare for publishing
- yarn publish: Publish to npm
Feedback
- Report bug and feature requests as GitHub Issues
Sponsorship
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago
0.0.33333333
4 years ago
0.0.30
4 years ago
0.0.28
4 years ago
0.0.20
4 years ago
0.0.21
4 years ago
0.0.22
4 years ago
0.0.23
4 years ago
0.0.24
4 years ago
0.0.25
4 years ago
0.0.26
4 years ago
0.0.27
4 years ago
0.0.18
4 years ago
0.0.19
4 years ago
0.0.14
4 years ago
0.0.15
4 years ago
0.0.16
4 years ago
0.0.17
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.6
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago

