numbers / numbers.js

Advanced Mathematics Library for Node.js and JavaScript
Apache License 2.0
1.76k stars 167 forks source link

Exponential Regression Test Failing #145

Open mjhasbach opened 9 years ago

mjhasbach commented 9 years ago
x 1 of 134 tests failed:

  1) numbers should return a function to calculate the exponential regression of an array of numbers:
     AssertionError: 0.8491729985314138 == 0.8491729985314136
      at Context.<anonymous> (D:\Projects\Programming\Github\numbers.js\test\statistic.test.js:108:12)
      at Test.Runnable.run (D:\Projects\Programming\Github\numbers.js\node_modules\mocha\lib\runnable.js:196:15)
      at Runner.runTest (D:\Projects\Programming\Github\numbers.js\node_modules\mocha\lib\runner.js:344:10)
      at D:\Projects\Programming\Github\numbers.js\node_modules\mocha\lib\runner.js:390:12
      at next (D:\Projects\Programming\Github\numbers.js\node_modules\mocha\lib\runner.js:270:14)
      at D:\Projects\Programming\Github\numbers.js\node_modules\mocha\lib\runner.js:279:7
      at next (D:\Projects\Programming\Github\numbers.js\node_modules\mocha\lib\runner.js:227:23)
      at Immediate._onImmediate (D:\Projects\Programming\Github\numbers.js\node_modules\mocha\lib\runner.js:247:5)
      at processImmediate [as _immediateCallback] (timers.js:358:17)
sjkaliski commented 9 years ago

Hey @mjhasbach I received this error as well on my local (a few tests w/in stats failed actually) but Travis is still reporting all green: https://travis-ci.org/numbers/numbers.js

There's an acceptable "error bound" for operations in numbers, numbers.EPSILON = 0.001. Given that this mismatch is within that range, it's ok. Need to update the tests to accommodate for that.