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

Method f

__test__/theorem.js:596–613  ·  view source on GitHub ↗
(v, func)

Source from the content-addressed store, hash-verified

594 return this.polynomial(...out)
595 }
596 f(v, func) {
597 if (typeof v == 'function') {
598 return {
599 type: "function",
600 core: v
601 }
602 }
603 return {
604 type: "function",
605 v: v,
606 f: func,
607 core: x => {
608 let regex = new RegExp(v)
609 let newStr = func.replace(regex, `(${x})`)
610 return eval(newStr).toFixed(14)
611 }
612 }
613 }
614 findRoots(f) {
615 let exp = [];
616 if (f.type == "polynomial") {

Callers 1

test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected