You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this math library will be complete if it includes the following math functionality, which is heavily used in financial use cases (e.g., banker's rounding): https://github.com/sindresorhus/round-to
The text was updated successfully, but these errors were encountered:
Thanks for your suggestion. Maybe we can extend the existing function floor(x) and ceil(x) to pass a number of digits like round(x, n). Or we could extend round to allow passing rounding options like UP, DOWN, etc.
You can configure to use BigNumber (better anyway to use that for finanical data than regular numbers because regular numbers suffer a lot from round-off errors). The BigNumber library integrated in mathjs is powered by https://github.com/MikeMcl/decimal.js, which allows to configure different rounding options. So you could write a wrapper function to use that I think.
this math library will be complete if it includes the following math functionality, which is heavily used in financial use cases (e.g., banker's rounding): https://github.com/sindresorhus/round-to
The text was updated successfully, but these errors were encountered: