Open thykka opened 5 years ago
Interesting. Thank you.
We should probably add a test for this and throw an error. Could you provide a PR?
Trying to make tests for it, but the test suite for NewtonRhapson is failing on latest master...:
PhantomJS 2.1.1 (Mac OS X 0.0.0) Given an instance of NewtonRaphson it calculates correct with example 0 FAILED
ReferenceError: Can't find variable: NewtonRaphson in test/spec/NewtonRaphson.spec.js (line 20)
test/spec/NewtonRaphson.spec.js:20:34
It also seems like es6 syntax isn't supported by the test runner.
Any pointers?
Test case:
Expected result: EffectiveInterestCalculator throws an error, due to the given values not converging within a reasonable number of iterations.
Actual result: EffectiveInterestCalculator enters an infinite loop and freezes.