Closed munrocket closed 5 years ago
Also what about .js distribution? This project maintainable?
Here's the .js
file published on npm.
TypeScript attaches private methods to the prototype, the private keyword here only affects the .d.ts
file.
Speed would improve by supporting more destructive operations that modify a number instead of returning a new object.
The double float approach looks very interesting, I didn't know about it. Triple double should allow working with products of two JavaScript numbers without any rounding errors. It might speed up a robust implementation of Bentley-Ottmann line intersection algorithm, because arbitrary precision computations would be needed less.
It seems a better approach would be to have a static function for multiplying two JavaScript numbers, returning a BigFloat
wrapping a triple double. Those could then be compared and in some cases added / subtracted while remaining triple doubles. Further operations would switch to arbitrary precision.
Did not notice the .js version in npm package, also you not answered 20 days so it lead me to create my own version :) Also I am trying to find a fulltime job by creating open source libraries.
Yes i think static functions are posible solution.
The new BigFloat53
class is now based on a multicomponent float expansion.
Nice!
Hello @jjrv can you comment something on fma proposal in JS? https://es.discourse.group/t/math-float-optimisation/829/4
As you know private methods in javascript have worst performance (check here question3). And since your library designed to be incredibly fast do you think about static function for arithmetic? I checked same libraries with multicomponent float expansion in other languages and their performance are much better compeared to ordinary arbitrary precision.