MCPcopy Create free account
hub / github.com/arguiot/TheoremJS / toFraction

Method toFraction

__test__/theorem.js:819–822  ·  view source on GitHub ↗
(x, p=15)

Source from the content-addressed store, hash-verified

817 return new BigNumber(args[0]).div(args[1])
818 }
819 toFraction(x, p=15) {
820 const BN = BigNumber.clone({ DECIMAL_PLACES: 20 })
821 return new BN(x.toFixed(15)).toFraction(p)
822 }
823 * collatz(n) {
824 while (n != 1) {
825 if(n % 2 == 0) {

Callers 2

toFraction.jsFile · 0.80
test.jsFile · 0.80

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected