munrocket

Results 120 comments of munrocket

Crypto exchanges and banks will need `banker rounding` or in other words `halfEven`. Rationale behind this method is fairer and more accurate statistical representation. Rounding mode in `divide` operation also...

Thanks for this issue! I am thinking that we need to expose scalar FMA in the web according to IEEE-754 with slow but correctly rounded version if it not supported...

It can take a string like in Java > (1) BigDecimal(‘0.1’) = 0.1d Second variant is finite for Decimal128, but for BigDecimal it’s infinite expression, how it should be stored?...

Yea :) I am tried to find this issue when I understand that was wrong, but lost in this repo. So, I just waited when someone fixing this comment :D

Nice, after that polyfill will be easy to implement.

🤔 Maybe *fixed point arithmetic* with BigInt will be better for Ethereum with uint256 inside. Good support in browsers and you still will not use the exponential part in BigDecimal.

@gnidan I made a library with fixed point arithmetic for you, please give feedback https://github.com/munrocket/fixed-point Also sent a message on email.

Fun issue but true. Another possible notation: n - Natural r - Real

It should fit for any finance applications also with this proposal JS can be a language for scientific calculations in future. If all browsers agree to implement arbitrary precision numbers...