Closed munrocket closed 1 year ago
The problem is that 0.1 cannot be represented in the used binary structure. And the spec proposal has no details how to do this. Perhaps, BigFloat.round should accept decimal string and rounding should be applied. I have decided to skip it so.
I should switch to BigDecimal because BigFloat constructors is not flexible enough.
May be, BigFloat should be separated into another small libraries where no transendent math is needed and no string conversion methods, as today my implementations arenot perfect. For BigDecimal they can be simplified a lot as base convertion is not needed
Yea, can be a good idea, but string conversions always needed in any application. I like the implementation but API can be easier like in wasm/big.js. Right now I am using it with wrapper because of that.
I think you can add it in https://github.com/josdejong/mathjs after that.
It looks like some of the methods not implemented for Base10/Base2 this lead to problem that it is impossible to print and read back BigFloat/BigDecimal.
string in expoinential form
) - gives an error.Maybe I miss something? Should I use .toFixed() and remove trailing zeros?