Version 2.0.3
This is a production, bug-fix release.
Two bugs were fixed in this release:
- A rare and subtle signal handling bug was fixed.
- A misbehavior on
0
to a negative power was fixed.
The last bug bears some mentioning.
When I originally wrote power, I did not thoroughly check its error cases; instead, I had it check if the first number was 0
and then if so, just return 0
. However, 0
to a negative power means that 1
will be divided by 0
, which is an error.
I caught this, but only after I stopped being cocky. You see, sometime later, I had noticed that GNU bc
returned an error, correctly, but I thought it was wrong simply because that's not what my bc
did. I saw it again later and had a double take. I checked for real, finally, and found out that my bc
was wrong all along.
That was bad on me. But the bug was easy to fix, so it is fixed now.
There are two other things in this release:
- Subtraction was optimized by Stefan Eßer.
- Division was also optimized, also by Stefan Eßer.
$ sha512sum bc-2.0.3.tar.xz
1eabc44a33c08e1cc20c7112843e18544860dc8621cf655c2453858d64b720cada4835ab6142110f296c4d6ad82e77725e603fd11b84b61b073efccc9f6a1c45 bc-2.0.3.tar.xz
$ sha256sum bc-2.0.3.tar.xz
320e2616f20ab5636b6256194ad10796864c177fbbfe8bf15057438b01adc5c1 bc-2.0.3.tar.xz
$ stat -c '%s %n' bc-2.0.3.tar.xz
162360 bc-2.0.3.tar.xz