floor and cell with precision#1967
Conversation
|
Thanks @rnd-debug , looks good at first sight 👍 . I hope to review your PR coming weekend. |
|
One test case is failing on Firefox. Still haven't found the time to check what is happening. Hoping to do it this weekend. |
|
@josdejong failing tests fixed: ready to be merged. |
|
Your PR looks good @rnd-debug , thanks 👍 . Let's just ignore the codecov warnings, I'm not sure what's going on there but the new functionality is well tested. A few feedback points:
|
|
@josdejong fixing the 'fix' looks like a reasonable idea: will give it more time this weekend. Keeping in mind docs + trying to hack codecov by providing more tests. |
|
@josdejong I am confused about how to deal with rounding errors. According to the proposal for When the external library gives us : Similar issues can appear with |
If you calculate To work around these issues with |
|
@josdejong Ok, now I got the big picture. Then the branch is ready to be merged. |
| * math.round(-4.2) // returns number -4 | ||
| * math.round(-4.7) // returns number -5 | ||
| * math.round(3.22, 1) // returns number 3.2 | ||
| * math.round(3.88, 1) // returns number 3.8 |
There was a problem hiding this comment.
I think math.round(3.88, 1) returns 3.9 instead of 3.8, right?
|
Thanks for implementing this extension for |
|
Available now in |
Provides
ceil(x,n)andfloor(x,n). Replies to #1901.myBigNumber.toDecimalPlaces(n.toNumber(), Decimal.ROUND_CEIL)