Closed ryanrossiter closed 1 year ago
Ah, it seems From<IBig> for FBig
sets the precision to the number of digits in the IBig
, which is applied to the addition, and since 10 only has 1 non-zero digit the precision is 1?
Yes, that's related to the precision. But even in decimal, 10
should have a precision of 2 (two digits). This should be a bug, thanks for reporting this, I will check it later.
I have pushed the fix for this problem. I will try to publish a new version for this in a few days.
A new version of dashu-float
(v0.3.2) is published. Feel free to reopen if the problem still exists.
This is such a basic case that I assume I've just missed something obvious, but I can't seem to get
FBig
addition to work.Here is my test case:
Which produces:
Even more confusingly, when I change the base to 2 the result becomes 14 (
1110
):Output:
What am I missing here? Thanks in advance