javascriptdata / danfojs

Danfo.js is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
https://danfo.jsdata.org/
MIT License
4.81k stars 209 forks source link

Fix failing CI tests #329

Closed risenW closed 2 years ago

risenW commented 2 years ago

Test passes locally, but fails in CI, see https://github.com/javascriptdata/danfojs/runs/4640341484?check_suite_focus=true

risenW commented 2 years ago

This failing test is caused by the pow operations. After investigation, I found out that the precision of the result is not guaranteed. I get integer results when I make some pow ops in Nodejs, but get floats when doing the same in browser env.

Also, see: https://stackoverflow.com/questions/28330489/why-does-javascripts-math-pow-seem-to-return-a-rounded-value-compared-to-the