UNPKG
big-rat
Version:
latest (1.0.4)
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.0.0
A big integer rational number
github.com/rat-nest/big-rat
rat-nest/big-rat
big-rat
/
div.js
10 lines
(6 loc)
•
160 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
'use strict'
var
rationalize =
require
(
'./lib/rationalize'
)
module
.
exports
= div
function
div
(
a, b
) {
return
rationalize
(a[
0
].
mul
(b[
1
]), a[
1
].
mul
(b[
0
])) }