Skip to content

Version 1.0

Compare
Choose a tag to compare
@gavinhoward gavinhoward released this 26 Oct 17:37
· 4241 commits to master since this release

This is the first non-beta release. bc is ready for production use.

As such, a lot has changed since 0.5.

  1. dc has been added. It has been tested even more thoroughly than bc was for 0.5. It does not have the ! command, and for security reasons, it never will, so it is complete.
  2. bc has been more thoroughly tested. An entire section of the test suite (for both programs) has been added to test for errors.
  3. A prompt (>>> ) has been added for interactive mode, making it easier to see inputs and outputs.
  4. Interrupt handling has been improved, including elimination of race conditions (as much as possible).
  5. MinGW and Windows Subsystem for Linux support has been added (see xstatic for binaries).
  6. Memory leaks and errors have been eliminated (as far as ASan and Valgrind can tell).
  7. Crashes have been eliminated (as far as afl can tell).
  8. Karatsuba multiplication was added (and thoroughly) tested, speeding up multiplication and power by orders of magnitude.
  9. Performance was further enhanced by using a "divmod" function to reduce redundant divisions and by removing superfluous memset() calls.
  10. To switch between Karatsuba and O(n^2) multiplication, the config variable BC_NUM_KARATSUBA_LEN was added. It is set to a sane default, but the optimal number can be found with $ROOT/karatsuba.py (requires Python 3) and then configured through make.
  11. The random math test generator script was changed to Python 3 and improved. bc and dc have together been run through 30+ million random tests.
  12. All math bugs have been fixed, including out of control memory allocations in sine (that was actually a parse bug), certain cases of infinite loop on square root, and slight inaccuracies (as much as possible; see the README) in transcendental functions.
  13. Parsing has been fixed as much as possible.
  14. Test coverage was improved to 94.8%. The only paths not covered are ones that happen when malloc() or realloc() fails.
  15. An extension to get the length of an array was added.
  16. The boolean not (!) had its precedence change to match negation.
  17. Data input was hardened.
  18. bc was made fully compliant with POSIX when the -s flag is used or POSIXLY_CORRECT is defined.
  19. Error handling was improved.
  20. bc now checks that files it is given are not directories.

Checksums:

$ sha512sum bc-1.0.tar.xz
3741a3dd31ea1623788c2396a7b2a8293d19eb5b11b4e0a3eee6d04e10017babec78a1f1e830462b1f6210add4bd1528332eb63988dc6947a7a2e0e085d380c7 bc-1.0.tar.xz

$ sha256sum bc-1.0.tar.xz
39d0e924993e7e2ffef5fe3b5083640cc8466de3f3b1d0c5ba49663b97ff9c2d bc-1.0.tar.xz