MikeMcl / decimal.js

An arbitrary-precision Decimal type for JavaScript
http://mikemcl.github.io/decimal.js
MIT License
6.36k stars 480 forks source link

Half Odd Rounding mod #175

Open Saka7 opened 3 years ago

Saka7 commented 3 years ago

Any plans to support Half-odd Rounding mode?

MikeMcl commented 3 years ago

No, but I'm not against it. I think I should probably have included it from the beginning, but I think I just used the rounding modes from Java's BigDecimal.

jormaechea commented 1 year ago

Hi @MikeMcl! I was just trying to implement rounding standard from Brazil, ABNT NBR 5891 and realized that it is actually ROUND_HALF_ODD. Sadly, it's missing.

I'll try to make some time to implement it and make a PR. But I have a question:

How do you handle new features between this and decimal.js-light? I think this should be implemented in both libs, right? Implementations are independent between packages?