Releases

  • Release 3.3.0

    gavin 1 week ago | 0 commits to master since this release

    This is a production release that changes one behavior and fixes documentation bugs.

    The changed behavior is the treatment of -e and -f when given through BC_ENV_ARGS or DC_ENV_ARGS. Now bc and dc do not exit when those options (or their equivalents) are given through those environment variables. However, bc and dc still exit when they or their equivalents are given on the command-line.

    $ sha512sum bc-3.3.0.tar.xz
    b8d0b6d6d9c5d4fc62df62d1b9b7e7006a8b430e063fe0d5f646cfaeb4c6fc9c7037b644e853b7ae7d5c5f42f079221e9cdc32564d70c9ddd6bb867ddc7056de  bc-3.3.0.tar.xz
    
    $ sha256sum bc-3.3.0.tar.xz
    d4c0da5a6be9652f55bf237dd44d68602f75c617b486356cb70fc4514f2fd360  bc-3.3.0.tar.xz
    
    $ stat -c '%s  %n'
    229580  bc-3.3.0.tar.xz
    
    $ sha512sum bc-3.3.0.tar.xz.sig
    935b381ce5a84a895fabcdfe87fbcb9c5c2f2af2a6ea12948a704447406932366261a105ce08b95dd9e4257b0f46ab98b6df4de61186c82b602dd81b334a0d4b  bc-3.3.0.tar.xz.sig
    
    $ sha256sum bc-3.3.0.tar.xz.sig
    14be11a9d60b06aed93f2a4cece039d78e49eb3aa4a7b92f9058b9e6e53afb8d  bc-3.3.0.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.3.0.tar.xz.sig
    
     
  • Release 3.2.7

    gavin 1 week ago | 6 commits to master since this release

    This is a production release that removes a small non-portable shell operation in configure.sh. This problem was only noticed on OpenBSD, not FreeBSD or Linux.

    Non-OpenBSD users do NOT need to upgrade, although NetBSD users may also need to upgrade.

    $ sha512sum bc-3.2.7.tar.xz
    b516c400625b54b68ed5c1d484d48d80a094495c1d96437129a835dcc5caf2c29d5524d4b67144d11215569bd6ec1ac90113b3fda0d621c8672313119da4f9fa  bc-3.2.7.tar.xz
    
    $ sha256sum bc-3.2.7.tar.xz
    ab3d925d14687e38d971b3f2ea9dff1f3338d0d151644f7fa503dbefe3d8f573  bc-3.2.7.tar.xz
    
    $ stat -c '%s  %n'
    228540  bc-3.2.7.tar.xz
    
    $ sha512sum bc-3.2.7.tar.xz.sig
    8ab7a3595e130e036acac8554a5107a11b5212d93d298e8a0370a402049026c702c6f6f06fcf6f46a7e36eb6b5a7d1b6b42f5987ea39995039e512226b6c6c26  bc-3.2.7.tar.xz.sig
    
    $ sha256sum bc-3.2.7.tar.xz.sig
    55851847a6ec3c20d1cae884f67c7adff712b45a2c1575420645b1228076d9a9  bc-3.2.7.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.2.7.tar.xz.sig
    
     
  • Release 3.2.6

    gavin 3 weeks ago | 14 commits to master since this release

    This is a production release that fixes the build on FreeBSD.

    There was a syntax error in configure.sh that the Linux shell did not catch, and FreeBSD depends on the existence of tests/all.sh.

    All users that already upgraded to 3.2.5 should update to this release, with my apologies for the poor release of 3.2.5. Other users should skip 3.2.5 in favor of this version.

    $ sha512sum bc-3.2.6.tar.xz
    4b1f43bb0bcd720d2140d41e089aa78fe8d07903fb745ed1a641ffe25fe46f439e480a1e11b687b7555881bd1ee4044c071c50e4bacd579b8909c704db7a6ede  bc-3.2.6.tar.xz
    
    $ sha256sum bc-3.2.6.tar.xz
    4e664b3f4441fe79e5b0474ca019d23dfd5562e8c6a5efcc3ca08762fb7a1821  bc-3.2.6.tar.xz
    
    $ stat -c '%s  %n'
    234964  bc-3.2.6.tar.xz
    
    $ sha512sum bc-3.2.6.tar.xz.sig
    031ceb082537bea132f7a6544987f94a815eb1f63d1dbf1732f987cb8caee8763c2d1137298c5b4ca4d822c3220d147db2e92a1e5406fa33f3d13943a6827948  bc-3.2.6.tar.xz.sig
    
    $ sha256sum bc-3.2.6.tar.xz.sig
    38d87ce3fcaf0867f0507f74a1e79ec7978ff18c521984a71581e4b8b68cafc3  bc-3.2.6.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.2.6.tar.xz.sig
    
     
  • Pre-Release 3.2.5 8cc14cfdb1

    Release 3.2.5

    gavin 3 weeks ago | 19 commits to master since this release

    This is a (non)production release that fixes several bugs and adds a couple small things.

    The two most important bugs were bugs that causes dc to access memory out-of-bounds (crash in debug builds). This was found by upgrading to afl++ from afl. Both were caused by a failure to distinguish between the same two cases.

    Another bug was the failure to put all of the licenses in the LICENSE.md file.

    Third, some warnings by scan-build were found and eliminated. This needed one big change: bc and dc now bail out as fast as possible on fatal errors instead of unwinding the stack.

    Fourth, the pseudo-random number now attempts to seed itself with /dev/random if /dev/urandom fails.

    Finally, this release has a few quality-of-life changes to the build system. The usage should not change at all; the only thing that changed was making sure the Makefile.in was written to rebuild properly when headers changed and to not rebuild when not necessary.

    $ sha512sum bc-3.2.5.tar.xz
    6e03d6549376b4350fe1d079d7f1cc3cf430a893af8bae004c752fabb7acdb7802f9039a9227f3439e1d73925bfc8f9b973339cebc8fa851ae8a45658eb65c74  bc-3.2.5.tar.xz
    
    $ sha256sum bc-3.2.5.tar.xz
    9b6b8be28bf617312f49309163477272822e9f8537436d81741340b083d11ca7  bc-3.2.5.tar.xz
    
    $ stat -c '%s  %n'
    234252  bc-3.2.5.tar.xz
    
    $ sha512sum bc-3.2.5.tar.xz.sig
    8fd65f6d8fb83563bcfde3d56d6a48201205c33f746e623a298185b433be1b6af7d7d90cf7dbce397c011d7046fe293907ff8305e7ac8609dccf96e4195ec690  bc-3.2.5.tar.xz.sig
    
    $ sha256sum bc-3.2.5.tar.xz.sig
    cb88aa2b9b29dc963cbe1e0c61f7c029bd88090e453c2920b8116a885cf3c48c  bc-3.2.5.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.2.5.tar.xz.sig
    
     
  • Release 3.2.4

    gavin 2 months ago | 61 commits to master since this release

    This is a production release that fixes a warning on gcc 6 or older, which does not have an attribute that is used.

    Users do NOT need to upgrade if they don't use gcc 6 or older.

    $ sha512sum bc-3.2.4.tar.xz
    9a22d829b7346d08ad0066dd65dfeb832b5eb7c77b52798d05da9450d77590d264ecfe9318955f7335ddcfb11bb48f44854c760c0b4c173e128378ccf297d443  bc-3.2.4.tar.xz
    
    $ sha256sum bc-3.2.4.tar.xz
    b4aba186094999a78ee9d76419f71c9b02c73bc4ace4069802199cccc0a0e41a  bc-3.2.4.tar.xz
    
    $ stat -c '%s  %n'
    225344  bc-3.2.4.tar.xz
    
    $ sha512sum bc-3.2.4.tar.xz.sig
    307419689c906f09af79d7479a38de410f8b77f1d8e36cff42685877b4f5cf6e5723e95f062a574a40613149ccf1a6adcc50feb02ac8abe074b3b8f3282effde  bc-3.2.4.tar.xz.sig
    
    $ sha256sum bc-3.2.4.tar.xz.sig
    adc0739334632b6461194d2564b5680d7a8e6351627fab36564df08a076c8b88  bc-3.2.4.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.2.4.tar.xz.sig
    
     
  • Release 3.2.3

    gavin 2 months ago | 64 commits to master since this release

    This is a production release that fixes a bug in gen/strgen.sh. I recently changed gen/strgen.c, but I did not change gen/strgen.sh.

    Users that do not use gen/strgen.sh do not need to upgrade.

    $ sha512sum bc-3.2.3.tar.xz
    efd040d46f2ed1eff5a2eb336e55fd465176c23c728935ee488a474b2f0c8dddd275805ee3be79f20afc523a183adb3d88a0e7bee095047912cf70741e2c0b32  bc-3.2.3.tar.xz
    
    $ sha256sum bc-3.2.3.tar.xz
    e9610eca329e3346c0d5b76f675f90be36d5c019378ea98f10931daba1c98314  bc-3.2.3.tar.xz
    
    $ stat -c '%s  %n'
    225420  bc-3.2.3.tar.xz
    
    $ sha512sum bc-3.2.3.tar.xz.sig
    4c62f9183fb0ec8f6273108e5f4dd143615db5b1ab428463f0cb859d5f5f4f32cee3ba7c4f6d7278953e8a25466e68de7aab24eca7f607f998129a61ecce2ff5  bc-3.2.3.tar.xz.sig
    
    $ sha256sum bc-3.2.3.tar.xz.sig
    dbbe92c8c1eef8bfab5792d03d325c4de5fa7bf46faf55eeb1134ba755847a12  bc-3.2.3.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.2.3.tar.xz.sig
    
     
  • Release 3.2.2

    gavin 2 months ago | 66 commits to master since this release

    This is a production release that fixes a portability bug in configure.sh. The bug was using the GNU find extension -wholename.

    $ sha512sum bc-3.2.2.tar.xz
    2e8f121c751e987569a0acdfbf648c3ef120d4c808de1a1a0c9f2421f4ef3e45e5031ccd7c3e144a4502cc36ed433ca8e56c943b87f26193dcf4c745adf12ddc  bc-3.2.2.tar.xz
    
    $ sha256sum bc-3.2.2.tar.xz
    d38fb0e846576d010afb86abc19d810ad9ac29904a47a50b4f7e5459f0f924d2  bc-3.2.2.tar.xz
    
    $ stat -c '%s  %n'
    225228  bc-3.2.2.tar.xz
    
    $ sha512sum bc-3.2.2.tar.xz.sig
    bbfa6926e2f58e2c8e77dc35ba48b2383872d73e59f81f8bc2f6279cbe8948a9e8b41c7f4ac1698d8c40c3a5335a6ea1648d536a18281aec9e861e2c7a1a39a8  bc-3.2.2.tar.xz.sig
    
    $ sha256sum bc-3.2.2.tar.xz.sig
    3f00d425bdeba03f938e910bedbbd689fd2d7920549eb890f4613faf6809343c  bc-3.2.2.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.2.2.tar.xz.sig
    
     
  • Release 3.2.1

    gavin 3 months ago | 68 commits to master since this release

    This is a production release that has one fix for bcl(3). It is technically not a bug fix since the behavior is undefined, but the BclNumbers that bcl_divmod() returns will be set to BCL_ERROR_INVALID_NUM if there is an error. Previously, they were not set.

    $ sha512sum bc-3.2.1.tar.xz
    1f861d9571523a5f1bb75d69aa21b470ae833fd748edb2dc78e02dee9925aea1ccff5b8a52ca74ea1945cfdca64eb8bc58919c90c39040749cb550a6372077c9  bc-3.2.1.tar.xz
    
    $ sha256sum bc-3.2.1.tar.xz
    b7bb88c8207338aa65246e7065823f6f415822b196b9a49126fe89d4b357e546  bc-3.2.1.tar.xz
    
    $ stat -c '%s  %n'
    225116  bc-3.2.1.tar.xz
    
    $ sha512sum bc-3.2.1.tar.xz.sig
    d1ece61e43ad1c05dc82b9dff4886846ed63f0f46e77cd098f237d97ca53dbd0c60b1d32d7c4e04bac74593315b217b64503bc7b264f78061c18cdb696b6a9c5  bc-3.2.1.tar.xz.sig
    
    $ sha256sum bc-3.2.1.tar.xz.sig
    61061fbbe6a3660621bfc04b600297c1cb167934cec4dc2d14aa5ef4115e9271  bc-3.2.1.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.2.1.tar.xz.sig
    
     
  • Release 3.2.0

    gavin 3 months ago | 70 commits to master since this release

    This is a production release that has one bug fix and a major addition.

    The bug fix was a missing auto variable in the bessel j() function in the math library.

    The major addition is a way to build a version of bc's math code as a library. This is done with the -a option to configure.sh. The API for the library can be read in ./manuals/bcl.3.md or man bcl once the library is installed with make install.

    This library was requested by developers before I even finished version 1.0, but I could not figure out how to do it until now.

    If the library has API breaking changes, the major version of bc will be incremented.

    $ sha512sum bc-3.2.0.tar.xz
    b6e3ab2d4599f8e0c9ba0bcbe8d45e8b62453720063a9cb893bcf55995005f9d09ab803df19cc73920a1f4e4868ba069b110e2ac22f21bb8c8dfcee01a419d6a  bc-3.2.0.tar.xz
    
    $ sha256sum bc-3.2.0.tar.xz
    0f536d65dbdcd3d6a419b071aa66ba6c80172c1c705106054b859cc8e6df1c96  bc-3.2.0.tar.xz
    
    $ stat -c '%s  %n'
    225012  bc-3.2.0.tar.xz
    
    $ sha512sum bc-3.2.0.tar.xz.sig
    f49d0d8587afe80c904a5389819515c58b6177a2d09c3f5754dc4ec1ed50e698ad4c1268f32467848ece89045ba3b6ce7113e3130d47a009d7d36677c74dcfd7  bc-3.2.0.tar.xz.sig
    
    $ sha256sum bc-3.2.0.tar.xz.sig
    7c4f0dcb5b57be000681a72ae7b97f52612dd86f6e3ec04370286ba6bc64933b  bc-3.2.0.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.2.0.tar.xz.sig
    
     
  • Release 3.1.6

    gavin 4 months ago | 149 commits to master since this release

    This is a production release that fixes a new warning from Clang 12 for FreeBSD and also removes some possible undefined behavior found by UBSan that compilers did not seem to take advantage of.

    Users do NOT need to upgrade, if they do not want to.

    $ sha512sum bc-3.1.6.tar.xz
    1219a074845b8c66a431ddb78bab643793f5275c26404e92e360e655418d70d1aafa02be2fc4dec25d99a85ae2da1aab7d615de893f85913ca8834448dcade53  bc-3.1.6.tar.xz
    
    $ sha256sum bc-3.1.6.tar.xz
    e523296e59f6ca82210d10baa12bd97de02cab0fd62be554bc6f0772869ad445  bc-3.1.6.tar.xz
    
    $ stat -c '%s  %n'
    210976  bc-3.1.6.tar.xz
    
    $ sha512sum bc-3.1.6.tar.xz.sig
    117aef03b8ffbf95c5f480130b5553f72ce8872a2677d2712f10de80b29a4643be60f9cd463b1df026e99e97fc38fc486ff0a2ac4725761dd47fcf04d05c128d  bc-3.1.6.tar.xz.sig
    
    $ sha256sum bc-3.1.6.tar.xz.sig
    dcbb5291f594718fbc8109aa451847770361d7ff7457954c1c34d4aeef6e5880  bc-3.1.6.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.1.6.tar.xz.sig
    
     
  • Release 3.1.5

    gavin 6 months ago | 157 commits to master since this release

    This is a production release that fixes the Chinese locales (which caused bc to crash) and a crash caused by bc executing code when it should not have been able to.

    ALL USERS SHOULD UPGRADE.

    $ sha512sum bc-3.1.5.tar.xz
    34be1c186df5906ab7a966739220a20afd7e3b227a5c7ba32a77256a36e097bbcc39b99ce6d6855de3e6e2296612f8fbe63dc0983ad91d4eb4c1e630dbb587a0  bc-3.1.5.tar.xz
    
    $ sha256sum bc-3.1.5.tar.xz
    0493c1eb76e94ace7a00532824121ab901ac1bd3580a340ea5de92a7d9c1a19e  bc-3.1.5.tar.xz
    
    $ stat -c '%s  %n'
    211632  bc-3.1.5.tar.xz
    
    $ sha512sum bc-3.1.5.tar.xz.sig
    92d05d9d55729c3a62bb452bc389edc9a23f1bf3c2f59ef43b2a86e429777a68121bfb195ed7f59171c17fb944bda16a1848ad224b316114cf707b2dd45a71fe  bc-3.1.5.tar.xz.sig
    
    $ sha256sum bc-3.1.5.tar.xz.sig
    18450efb04ffb9111290ae65f8e899e2966cf3dd1f74292203c6f0d96a441c3c  bc-3.1.5.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.1.5.tar.xz.sig
    
     
  • Release 3.1.4

    gavin 6 months ago | 166 commits to master since this release

    This is a production release that fixes one bug, changes two behaviors, and removes one environment variable.

    The bug is like the one in the last release except it applies if files are being executed. I also made the fix more general.

    The behavior that was changed is that bc now exits when given -e, -f, --expression or --file. However, if the last one of those is -f- (using stdin as the file), bc does not exit. If -f- exists and is not the last of the -e and -f options (and equivalents), bc gives a fatal error and exits.

    Next, I removed the BC_EXPR_EXIT and DC_EXPR_EXIT environment variables since their use is not needed with the behavior change.

    Finally, I made it so bc does not print the header, though the -q and --quiet options were kept for compatibility with GNU bc.

    $ sha512sum bc-3.1.4.tar.xz
    3f8cf5f0d130b75370a1b077f437a4f8c6b38b65378027be6035e8a9417cce83d1618b09ff4e1d8bb6132af35bafc673a8372d854e8cbbed847040aadc234a3a  bc-3.1.4.tar.xz
    
    $ sha256sum bc-3.1.4.tar.xz
    0dda6686e76907157f4b4844268b302a319a2756dc974caf2a3e246a7b02c523  bc-3.1.4.tar.xz
    
    $ stat -c '%s  %n'
    210976  bc-3.1.4.tar.xz
    
    $ sha512sum bc-3.1.4.tar.xz.sig
    1c89676a064c59ae4207a9d7806741e9dce4d59c324751064aac1087ac51693c4c3bb3c34bc9aaa2520c7c2a302876e81943b697a496703e1f31ec037a3dfdb8  bc-3.1.4.tar.xz.sig
    
    $ sha256sum bc-3.1.4.tar.xz.sig
    c2ca215539d3fcc7980ac7ab8386ad4faade8208d5e600c1172e943b8bf47333  bc-3.1.4.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.1.4.tar.xz.sig
    
     
  • Release 3.1.3

    gavin 7 months ago | 180 commits to master since this release

    This is a production release that fixes one minor bug: if bc was invoked like the following, it would error:

    echo "if (1 < 3) 1" | bc
    

    Unless users run into this bug, they do not need to upgrade, but it is suggested that they do.

    $ sha512sum bc-3.1.3.tar.xz
    fb702e45fb994d4f1be55c2b05c4c4b4c67ae838f4f46864ba944890c1810b871fbafaa323d432f0f600f8182b4370757b75de756ae2795b595776e3fe03ba7b  bc-3.1.3.tar.xz
    
    $ sha256sum bc-3.1.3.tar.xz
    5e4a2fac5ac9a49bdec7dc3fa06547fdb83629dc7b854fb0ce63d484521f9684  bc-3.1.3.tar.xz
    
    $ stat -c '%s  %n'
    210924  bc-3.1.3.tar.xz
    
    $ sha512sum bc-3.1.3.tar.xz.sig
    cb6c2d0784c85483c174392ff9bfd148f2a837074d4cd44c25b17e8d0c3d78612bc00c58aea0e7b2b61239cadf68cf0ac68c698e79befc05a1a8614c71753124  bc-3.1.3.tar.xz.sig
    
    $ sha256sum bc-3.1.3.tar.xz.sig
    fb63237b8aa0e7f63ce96540531ea2fda7b30250625a6d08cda597d753a3b1e7  bc-3.1.3.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.1.3.tar.xz.sig
    
     
  • Release 3.1.2

    gavin 7 months ago | 189 commits to master since this release

    This is a production release that adds a way to install all locales. Users do NOT need to upgrade.

    For package maintainers wishing to make use of the change, just pass -l to configure.sh.

    $ sha512sum bc-3.1.2.tar.xz
    c123a322578e7b2213317db8fd95c5596b45f59f8890ce05d0d25bac983d3038c1bda65c8998b760e15efc0ee3a10241f3ca712442b4f444f691dd6c5065e53d  bc-3.1.2.tar.xz
    
    $ sha256sum bc-3.1.2.tar.xz
    61d4833ffddd33b87b528e35a438c1fec4c1ecbb2fe339924fb0947b13663e65  bc-3.1.2.tar.xz
    
    $ stat -c '%s  %n'
    209820  bc-3.1.2.tar.xz
    
    $ sha512sum bc-3.1.2.tar.xz.sig
    f82933bbfc5cbe595d8e752e7bf92b5d841b2c90aee596b06346eb6fb7279cf6f21489744ea8493c1f76b225a7f295245978802a6c6175d67164b16181c42722  bc-3.1.2.tar.xz.sig
    
    $ sha256sum bc-3.1.2.tar.xz.sig
    010af7ba46d133d6d94547f6c885bec549ed39abc8c9c0168154b5182838ebfc  bc-3.1.2.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.1.2.tar.xz.sig
    
     
  • Release 3.1.1

    gavin 7 months ago | 195 commits to master since this release

    This is a production release that adds two Spanish locales. Users do NOT need to upgrade, unless they want those locales.

    $ sha512sum bc-3.1.1.tar.xz
    1f770edf619ade8780d0a494934071bfa82d1298043459cab6e3db6a5617e6aad0d7193635c868ef0d0312b808027ad3734cb92b0c8eff826cd5a860eb3fe6d2  bc-3.1.1.tar.xz
    
    $ sha256sum bc-3.1.1.tar.xz
    7401c68baef31622251eac47cabe0e35c973baec6b938b20741f777cf58d2dce  bc-3.1.1.tar.xz
    
    $ stat -c '%s  %n'
    209328  bc-3.1.1.tar.xz
    
    $ sha512sum bc-3.1.1.tar.xz.sig
    ee6f0d7e3b2120b59373b2d35316da43350c397e7005efa90da181805307d475057ea846f76a2751e57803918381dee08e5e3e1c12df66daedc83ba72b90bcf5  bc-3.1.1.tar.xz.sig
    
    $ sha256sum bc-3.1.1.tar.xz.sig
    0067d965d94ff87f8f9cbf8a95ae76f72b72f60607231b4437313e4ae435d13a  bc-3.1.1.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.1.1.tar.xz.sig
    
     
  • Release 3.1.0

    gavin 7 months ago | 198 commits to master since this release

    This is a production release that adjusts one behavior, fixes eight bugs, and improves manpages for FreeBSD. Because this release fixes bugs, users and package maintainers should update to this version as soon as possible.

    The behavior that was adjusted was how code from the -e and -f arguments (and equivalents) were executed. They used to be executed as one big chunk, but in this release, they are now executed line-by-line.

    The first bug fix in how output to stdout was handled in SIGINT. If a SIGINT came in, the stdout buffer was not correctly flushed. In fact, a clean-up function was not getting called. This release fixes that bug.

    The second bug is in how dc handled input from stdin. This affected bc as well since it was a mishandling of the stdin buffer.

    The third fixed bug was that bc and dc could abort() (in debug mode) when receiving a SIGTERM. This one was a race condition with pushing and popping items onto and out of vectors.

    The fourth bug fixed was that bc could leave extra items on the stack and thus, not properly clean up some memory. (The memory would still get free()'ed, but it would not be free()'ed when it could have been.)

    The next two bugs were bugs in bc's parser that caused crashes when executing the resulting code.

    The last two bugs were crashes in dc that resulted from mishandling of strings.

    The manpage improvement was done by switching from ronn to Pandoc to generate manpages. Pandoc generates much cleaner manpages and doesn't leave blank lines where they shouldn't be.

    $ sha512sum bc-3.1.0.tar.xz
    1858afe0c15bd518637cc7a34d0905042ea424f8398c85d97024ee0a397b15f549c8dfc1b8fe46c6ee9cdd38949de18e927951463cbbde007188809d8acd33cb  bc-3.1.0.tar.xz
    
    $ sha256sum bc-3.1.0.tar.xz
    73966d9e8627584f3d3498e12c42a7d3bfa01bfc0b14395a0822205d5611fd27  bc-3.1.0.tar.xz
    
    $ stat -c '%s  %n'
    209392  bc-3.1.0.tar.xz
    
    $ sha512sum bc-3.1.0.tar.xz.sig
    d0114e0ce0d6fd5379bf9d76d73001ccdc148554351dcc7512c8cbbab504580e5c0316fd7a7110d1a656a9ed98758c48085f61c97830c6e4a251302830670f68  bc-3.1.0.tar.xz.sig
    
    $ sha256sum bc-3.1.0.tar.xz.sig
    1a881b897f8039a0f0edfc2732bcd34f3f90ae7c35cf9e28a2edb8280aa343c0  bc-3.1.0.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.1.0.tar.xz.sig
    
     
  • Release 3.0.3

    gavin 8 months ago | 272 commits to master since this release

    This is a production release that adds one new feature: specific manpages.

    Before this release, bc and dc only used one manpage each that referred to various build options. This release changes it so there is one manpage set per relevant build type. Each manual only has information about its particular build, and configure.sh selects the correct set for install.

    $ sha512sum bc-3.0.3.tar.xz
    a29ed390f33b9d19d4e5a06037a0c43c9289d7b46e52c5e01ccebbf0c7daf2a022acd35669c25e33492d0c83270bf0611f4959111fd4e5871ae064ae27416d88  bc-3.0.3.tar.xz
    
    $ sha256sum bc-3.0.3.tar.xz
    8cf87e994f9f74c19dacdb623c870cbfe7486a64119842add65222c12b48e006  bc-3.0.3.tar.xz
    
    $ stat -c '%s  %n'
    202448  bc-3.0.3.tar.xz
    
    $ sha512sum bc-3.0.3.tar.xz.sig
    b37d608bf3d8e5bbc594a3b8bf120a265f61d75f009b3806a6155107d4350efa1dfbc7a9e0143442ea7725efde6d07ec3a4687edcfd110448cb1f3c977d7e4ae  bc-3.0.3.tar.xz.sig
    
    $ sha256sum bc-3.0.3.tar.xz.sig
    985d208ecac1e7b680c64cfd4def891c747e51e80f4a0aef011d1fd897d6f69b  bc-3.0.3.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.0.3.tar.xz.sig
    
     
  • Release 3.0.2

    gavin 8 months ago | 281 commits to master since this release

    This is a production release that adds utf8 locale symlinks and removes an unused auto variable from the ceil() function in the extended math library.

    Users do NOT need to update unless they want the locales.

    $ sha512sum bc-3.0.2.tar.xz
    2b9eb7cd9f3c589c35b4d271c97afd32bac3d8c7e845a3639571dfb26a48d0eb1649035ef0f7c63de5a7d65d31c61b2ac3cf584225237c53aeb9ce3828b8093d  bc-3.0.2.tar.xz
    
    $ sha256sum bc-3.0.2.tar.xz
    44975f59d979aefdf3f4735ac1072ef6920342b69003d8942752eb249a9a0e33  bc-3.0.2.tar.xz
    
    $ stat -c '%s  %n'
    199484  bc-3.0.2.tar.xz
    
    $ sha512sum bc-3.0.2.tar.xz.sig
    d78828e6cedf1a93b4a18d6e816732b8cf0bd41078baa5923406a908fb7a3f44a21539499c05630e42f0f2b2ae76d5c036b9ba0dfdf4efea515e7099d8a7dc2a  bc-3.0.2.tar.xz.sig
    
    $ sha256sum bc-3.0.2.tar.xz.sig
    0c504782fcb14b6b6e8705cafd8b375f66dd89aca01f5cd8d17f76872db138b9  bc-3.0.2.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.0.2.tar.xz.sig
    
     
  • Release 3.0.1

    gavin 8 months ago | 286 commits to master since this release

    This is a production release with two small changes. Users do NOT need to upgrade to this release; however, if they haven't upgraded to 3.0.0 yet, it may be worthwhile to upgrade to this release instead.

    The first change is fixing a compiler warning on FreeBSD with strict warnings on.

    The second change is to make the new implementation of ceil() in lib2.bc much more efficient.

    $ sha512sum bc-3.0.1.tar.xz
    553d14b3439e6f7d5ec370db3a7104808e263692fdae795d5f97fca3bb40d371e75bbab615d81975c87da9c84fbbb39bc148cf12a122b0e0e3c9036abb9b7cd8  bc-3.0.1.tar.xz
    
    $ sha256sum bc-3.0.1.tar.xz
    a06a7791030e98b69004ba0f02d7dc625c444ccf0882c04c454e397aeb481283  bc-3.0.1.tar.xz
    
    $ stat -c '%s  %n'
    199732  bc-3.0.1.tar.xz
    
    $ sha512sum bc-3.0.1.tar.xz.sig
    9f840c5c756a09e24ed8aac3e17639dabf965badc8784fe6495d9a6f2b4b2a03d51ced1b98ae266285fba54124619ea734f9c5d6c52bc33dccef27cb7ffb2f7d  bc-3.0.1.tar.xz.sig
    
    $ sha256sum bc-3.0.1.tar.xz.sig
    6851e863f1fe70fa1b41fe29c03aad019b6b454073c6b9e75e99cbb4f8244ba6  bc-3.0.1.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.0.1.tar.xz.sig
    
     
  • Release 3.0.0

    gavin 8 months ago | 290 commits to master since this release

    Notes for package maintainers:

    First, the 2.7.0 release series saw a change in the option parsing. This made me change one error message and add a few others. The error message that was changed removed one format specifier. This means that printf() will seqfault on old locale files. Unfortunately, bc cannot use any locale files except the global ones that are already installed, so it will use the previous ones while running tests during install. If bc segfaults while running arg tests when updating, it is because the global locale files have not been replaced. Make sure to either prevent the test suite from running on update or remove the old locale files before updating. Once this is done, bc should install without problems.

    Second, the option to build without signal support has been removed. See below for the reasons why.

    This is a production release with some small bug fixes, a few improvements, three major bug fixes, and a complete redesign of bc's error and signal handling. Users and package maintainers should update to this version as soon as possible.

    The first major bug fix was in how bc executed files. Previously, a whole file was parsed before it was executed, but if a function is defined after code, especially if the function definition was actually a redefinition, and the code before the definition referred to the previous function, this bc would replace the function before executing any code. The fix was to make sure that all code that existed before a function definition was executed.

    The second major bug fix was in bc's lib2.bc. The ceil() function had a bug where a 0 in the decimal place after the truncation position, caused it to output the wrong numbers if there was any non-zero digit after.

    The third major bug is that when passing parameters to functions, if an expression included an array (not an array element) as a parameter, it was accepted, when it should have been rejected. It is now correctly rejected.

    Beyond that, this bc got several improvements that both sped it up, improved the handling of signals, and improved the error handling.

    First, the requirements for bc were pushed back to POSIX 2008. bc uses one function, strdup(), which is not in POSIX 2001, and it is in the X/Open System Interfaces group 2001. It is, however, in POSIX 2008, and since POSIX 2008 is old enough to be supported anywhere that I care, that should be the requirement.

    Second, the BcVm global variable was put into bss. This actually slightly reduces the size of the executable from a massive code shrink, and it will stop bc from allocating a large set of memory when bc starts.

    Third, the default Karatsuba length was updated from 64 to 32 after making the optimization changes below, since 32 is going to be better than 64 after the changes.

    Fourth, Spanish translations were added.

    Fifth, the interpreter received a speedup to make performance on non-math-heavy scripts more competitive with GNU bc. While improvements did, in fact, get it much closer (see the [benchmarks][19]), it isn't quite there.

    There were several things done to speed up the interpreter:

    First, several small inefficiencies were removed. These inefficiencies included calling the function bc_vec_pop(v) twice instead of calling bc_vec_npop(v, 2). They also included an extra function call for checking the size of the stack and checking the size of the stack more than once on several operations.

    Second, since the current bc function is the one that stores constants and strings, the program caches pointers to the current function's vectors of constants and strings to prevent needing to grab the current function in order to grab a constant or a string.

    Third, bc tries to reuse BcNum's (the internal representation of arbitary-precision numbers). If a BcNum has the default capacity of BC_NUM_DEF_SIZE (32 on 64-bit and 16 on 32-bit) when it is freed, it is added to a list of available BcNum's. And then, when a BcNum is allocated with a capacity of BC_NUM_DEF_SIZE and any BcNum's exist on the list of reusable ones, one of those ones is grabbed instead.

    In order to support these changes, the BC_NUM_DEF_SIZE was changed. It used to be 16 bytes on all systems, but it was changed to more closely align with the minimum allocation size on Linux, which is either 32 bytes (64-bit musl), 24 bytes (64-bit glibc), 16 bytes (32-bit musl), or 12 bytes (32-bit glibc). Since these are the minimum allocation sizes, these are the sizes that would be allocated anyway, making it worth it to just use the whole space, so the value of BC_NUM_DEF_SIZE on 64-bit systems was changed to 32 bytes.

    On top of that, at least on 64-bit, BC_NUM_DEF_SIZE supports numbers with either 72 integer digits or 45 integer digits and 27 fractional digits. This should be more than enough for most cases since bc's default scale values are 0 or 20, meaning that, by default, it has at most 20 fractional digits. And 45 integer digits are a lot; it's enough to calculate the amount of mass in the Milky Way galaxy in kilograms. Also, 72 digits is enough to calculate the diameter of the universe in Planck lengths.

    (For 32-bit, these numbers are either 32 integer digits or 12 integer digits and 20 fractional digits. These are also quite big, and going much bigger on a 32-bit system seems a little pointless since 12 digits in just under a trillion and 20 fractional digits is still enough for about any use since 10^-20 light years is just under a millimeter.)

    All of this together means that for ordinary uses, and even uses in scientific work, the default number size will be all that is needed, which means that nearly all, if not all, numbers will be reused, relieving pressure on the system allocator.

    I did several experiments to find the changes that had the most impact, especially with regard to reusing BcNum's. One was putting BcNum's into buckets according to their capacity in powers of 2 up to 512. That performed worse than bc did in 2.7.2. Another was putting any BcNum on the reuse list that had a capacity of BC_NUM_DEF_SIZE * 2 and reusing them for BcNum's that requested BC_NUM_DEF_SIZE. This did reduce the amount of time spent, but it also spent a lot of time in the system allocator for an unknown reason. (When using strace, a bunch more brk calls showed up.) Just reusing BcNum's that had exactly BC_NUM_DEF_SIZE capacity spent the smallest amount of time in both user and system time. This makes sense, especially with the changes to make BC_NUM_DEF_SIZE bigger on 64-bit systems, since the vast majority of numbers will only ever use numbers with a size less than or equal to BC_NUM_DEF_SIZE.

    Last of all, bc's signal handling underwent a complete redesign. (This is the reason that this version is 3.0.0 and not 2.8.0.) The change was to move from a polling approach to signal handling to an interrupt-based approach.

    Previously, every single loop condition had a check for signals. I suspect that this could be expensive when in tight loops.

    Now, the signal handler just uses longjmp() (actually siglongjmp()) to start an unwinding of the stack until it is stopped or the stack is unwound to main(), which just returns. If bc is currently executing code that cannot be safely interrupted (according to POSIX), then signals are "locked." The signal handler checks if the lock is taken, and if it is, it just sets the status to indicate that a signal arrived. Later, when the signal lock is released, the status is checked to see if a signal came in. If so, the stack unwinding starts.

    This design eliminates polling in favor of maintaining a stack of jmp_buf's. This has its own performance implications, but it gives better interaction. And the cost of pushing and popping a jmp_buf in a function is paid at most twice. Most functions do not pay that price, and most of the rest only pay it once. (There are only some 3 functions in bc that push and pop a jmp_buf twice.)

    As a side effect of this change, I had to eliminate the use of stdio.h in bc because stdio does not play nice with signals and longjmp(). I implemented custom I/O buffer code that takes a fraction of the size. This means that static builds will be smaller, but non-static builds will be bigger, though they will have less linking time.

    This change is also good because my history implementation was already bypassing stdio for good reasons, and unifying the architecture was a win.

    Another reason for this change is that my bc should always behave correctly in the presence of signals like SIGINT, SIGTERM, and SIGQUIT. With the addition of my own I/O buffering, I needed to also make sure that the buffers were correctly flushed even when such signals happened.

    For this reason, I removed the option to build without signal support.

    As a nice side effect of this change, the error handling code could be changed to take advantage of the stack unwinding that signals used. This means that signals and error handling use the same code paths, which means that the stack unwinding is well-tested. (Errors are tested heavily in the test suite.)

    It also means that functions do not need to return a status code that every caller needs to check. This eliminated over 100 branches that simply checked return codes and then passed that return code up the stack if necessary. The code bloat savings from this is at least 1700 bytes on x86_64, before taking into account the extra code from removing stdio.h.

    $ sha512sum bc-3.0.0.tar.xz
    4961e030274e763aa02541457aa5aab6cd0d61758861b98d2cdac6acc42c3fb55b6adba72749edd3b663225ab844d7ef60809972478992165b071645fe6af65f  bc-3.0.0.tar.xz
    
    $ sha256sum bc-3.0.0.tar.xz
    4a7c5cbd5c7c2d3fea4a898c6ce87ff705756dd362cb2e3b241ae55e514e8280  bc-3.0.0.tar.xz
    
    $ stat -c '%s  %n'
    199304  bc-3.0.0.tar.xz
    
    $ sha512sum bc-3.0.0.tar.xz.sig
    db495a449b528a6bee555bafdeb965c1a780d0f9d15d069749e50d96ac9e1fff14a2487bf7dc7f2268011bc0c53093f880fadc4172c50a9ac59d29b280d7f6bf  bc-3.0.0.tar.xz.sig
    
    $ sha256sum bc-3.0.0.tar.xz.sig
    980fadbac5e7b5f722cb43df6fd8546e2eb3cc0cbdc2940606a63be523c3023e  bc-3.0.0.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-3.0.0.tar.xz.sig
    
     
  • Version 2.7.2

    gavin 9 months ago | 615 commits to master since this release

    This is a production release with one major bug fix.

    The length() built-in function can take either a number or an array. If it takes an array, it returns the length of the array. Arrays can be passed by reference. The bug is that the length() function would not properly dereference arrays that were references. This is a bug that affects all users.

    ALL USERS SHOULD UPDATE bc.

    $ sha512sum bc-2.7.2.tar.xz
    c2014b16165bf5f8bdadf42bb60ea967a060753c17e13a7c3569d16d218bb3fb644e6a46950e9e7b3aa5a9f6bee4da9b158694909a0ab1fe390b7bb4dc20b303  bc-2.7.2.tar.xz
    
    $ sha256sum bc-2.7.2.tar.xz
    c017a6c0482cf7c4a2b31dae1f406028017a5e939d98dd6c78aa94ce3ecc8d38  bc-2.7.2.tar.xz
    
    $ stat -c '%s  %n'
    189020  bc-2.7.2.tar.xz
    
    $ sha512sum bc-2.7.2.tar.xz.sig
    076fc464dd6c3825707bf75b413357bfe3ebe340c4ff8350da36ef6b33fdbcba00ffbcb16991d853bd9179a72befc94105241e0384a7d463c5807f2fada5b975  bc-2.7.2.tar.xz.sig
    
    $ sha256sum bc-2.7.2.tar.xz.sig
    487152d9585a9d39b7bc845c7b7b50c93ad23e1ffd0169c2a58590c2d1f91105  bc-2.7.2.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.7.2.tar.xz.sig
    
     
  • Version 2.7.1

    gavin 9 months ago | 619 commits to master since this release

    This is a production release with fixes for new locales and fixes for compiler warnings on FreeBSD.

    $ sha512sum bc-2.7.1.tar.xz
    f4900ccb7ca09b33e663136df12e6b02c1ca69e46f049107f359968921289e85bf3435be835f47b2ad6e4b0d33faefa8920d389e9648734f9daf7d1641389904  bc-2.7.1.tar.xz
    
    $ sha256sum bc-2.7.1.tar.xz
    6f1fd8900f0f5d98356730c11214a9adcf99a1d15b94b1991f33a4346533c624  bc-2.7.1.tar.xz
    
    $ stat -c '%s  %n'
    188584  bc-2.7.1.tar.xz
    
    $ sha512sum bc-2.7.1.tar.xz.sig
    925f308e9316392db01447ca4dceb6fbaaebe60374334a6721dbffa7b58521ecac4ebb8bed47a017627e36c786eaa59b24c894439c717e7155172d2e174d2a08  bc-2.7.1.tar.xz.sig
    
    $ sha256sum bc-2.7.1.tar.xz.sig
    fa8b23ab6d895a61a32c15c3feeb1364433c088fd9abcff3f69206ecac7952ef  bc-2.7.1.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.7.1.tar.xz.sig
    
     
  • Version 2.7.0

    gavin 10 months ago | 623 commits to master since this release

    This is a production release with a bug fix for Linux, new translations, and new features.

    Bug fixes:

    • Option parsing in BC_ENV_ARGS was broken on Linux in 2.6.1 because glibc's getopt_long() is broken. To get around that, and to support long options on every platform, an adapted version of optparse was added. Now, bc does not even use getopt().
    • Parsing BC_ENV_ARGS with quotes now works. It isn't the smartest, but it does the job if there are spaces in file names.

    The following new languages are supported:

    • Dutch
    • Polish
    • Russian
    • Japanes
    • Simplified Chinese

    All of these translations were generated using DeepL, so improvements are welcome.

    There is only one new feature: bc now has a built-in pseudo-random number generator (PRNG).

    The PRNG is seeded, making it useful for applications where /dev/urandom does not work because output needs to be reproducible. However, it also uses /dev/urandom to seed itself by default, so it will start with a good seed by default.

    It also outputs 32 bits on 32-bit platforms and 64 bits on 64-bit platforms, far better than the 15 bits of C's rand() and bash's $RANDOM.

    In addition, the PRNG can take a bound, and when it gets a bound, it automatically adjusts to remove bias. It can also generate numbers of arbitrary size. (As of the time of release, the largest pseudo-random number generated by this bc was generated with a bound of 2^(2^20).)

    IMPORTANT: read the bc manual and the dc manual to find out exactly what guarantees the PRNG provides. The underlying implementation is not guaranteed to stay the same, but the guarantees that it provides are guaranteed to stay the same regardless of the implementation.

    On top of that, four functions were added to bc's extended math library to make using the PRNG easier:

    • frand(p): Generates a number between [0,1) to p decimal places.
    • ifrand(i, p): Generates an integer with bound i and adds it to frand(p).
    • srand(x): Randomizes the sign of x. In other words, it flips the sign of x with probability 0.5.
    • brand(): Returns a random boolean value (either 0 or 1).
    $ sha512sum bc-2.7.0.tar.xz
    f482e0799e41d173539b3fcf41facdb399d3eebb993aed03ac134ef8ae68d508507862ee2869ca33f6749f7137528a5f7d9f1413b3c5d4ac345fb7bd44c68b62  bc-2.7.0.tar.xz
    
    $ sha256sum bc-2.7.0.tar.xz
    70e17a55c9fb115bd4028561d515ce72c609288b6479deeab47669770951c196  bc-2.7.0.tar.xz
    
    $ stat -c '%s  %n'
    188380  bc-2.7.0.tar.xz
    
    $ sha512sum bc-2.7.0.tar.xz.sig
    bb6481f7105c0201f6b3569d0d671f44aae312bd14b95f938f41bf5d3fa281c0f6671ca020b70f21db8f5cc36f607329ea199c853db6ef807af80eced772a10a  bc-2.7.0.tar.xz.sig
    
    $ sha256sum bc-2.7.0.tar.xz.sig
    f91e763054111413c86f4165ec099ecdcf380ea0402a147c3aeb53cf618a2637  bc-2.7.0.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.7.0.tar.xz.sig
    
     
  • Version 2.6.1

    gavin 10 months ago | 720 commits to master since this release

    This is a production release with a bug fix for FreeBSD.

    The bug was that when bc was built without long options, it would give a fatal error on every run. This was caused by a mishandling of optind.

    $ sha512sum bc-2.6.1.tar.xz
    f9dbc384272a2f570fa3e8d1c3c9d7063349979e8245846a086ade4bfc3b22216e7115e95aeb13b9473939fd174aa50ea9237f7417477fd9f24477fb1f1933da  bc-2.6.1.tar.xz
    
    $ sha256sum bc-2.6.1.tar.xz
    a153c849dfddd17750be609973a8f6a134e0400b1dc704adb792d67fae090ccc  bc-2.6.1.tar.xz
    
    $ stat -c '%s  %n'
    165812  bc-2.6.1.tar.xz
    
    $ sha512sum bc-2.6.1.tar.xz.sig
    907f2e0a6925e0edc73e638c8b5266cb131a6cdd3d0f8bcf06f6eb9c39d511de00d43d6bc702d462aa6e30e1918db8adafb9b801af9255c0f845367c70416a8c  bc-2.6.1.tar.xz.sig
    
    $ sha256sum bc-2.6.1.tar.xz.sig
    4f26bd5a2e59fe2233a5a1e97b61b075a68a6eedcf086b9477de5b89e9a34094  bc-2.6.1.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.6.1.tar.xz.sig
    
     
  • Version 2.6.0

    gavin 10 months ago | 725 commits to master since this release

    This release is a production release with no bugfixes. If you do not want to upgrade, you don't have to.

    No source code changed; the only thing that changed was lib2.bc.

    This release adds one function to the extended math library: p(x, y), which calculates x to the power of y, whether or not y is an integer. (The ^ operator can only accept integer powers.)

    This release also includes a couple of small tweaks to the extended math library, mostly to fix returning numbers with too high of scale.

    $ sha512sum bc-2.6.0.tar.xz
    809ca124d110bb96ded253fe8799786b48dc5ff8ab540aa97dc8ed43f5a835841d44a71ed082ded17c1df39b6fe5dc2ce7247be0c771b22d7d354aec40434411  bc-2.6.0.tar.xz
    
    $ sha256sum bc-2.6.0.tar.xz
    2b9f08ee9db9ca8b1d3c159a5af5fed981fcd98899630add72d327083673eb80  bc-2.6.0.tar.xz
    
    $ stat -c '%s  %n'
    163300  bc-2.6.0.tar.xz
    
    $ sha512sum bc-2.6.0.tar.xz.sig
    36e6c204480bc154079ea1744f78f9bb8e90a914b73c2fa524bf0b2e9e1f7d584c08fc6cc42dd9c9f3b92c4931aa91f55b8b1197a50b2fcf13e07f4f6f4846e4  bc-2.6.0.tar.xz.sig
    
    $ sha256sum bc-2.6.0.tar.xz.sig
    c44d3ccb471dfea0347a46dcddf37fefe212bd9221731bcd04acdbc7671a85cd  bc-2.6.0.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.6.0.tar.xz.sig
    
     
  • Version 2.5.3

    gavin 10 months ago | 725 commits to master since this release

    This release is a production release which addresses inconsistencies in the Portuguese locales. No bc code was changed.

    The issues were that the ISO files used different naming, and also that the files that should have been symlinks were not. I did not catch that because GitHub rendered them the exact same way.

    $ sha512sum bc-2.5.3.tar.xz
    97c0722969c4f2fd907786e0a89f9b403662b1bcdd1aab59418ab3fe140c50584b45eb346008ad94916335418f08433d2634b52b94ae1d7463b665a746f1a608  bc-2.5.3.tar.xz
    
    $ sha256sum bc-2.5.3.tar.xz
    f7cec2a1bf6be2e805dfda6955b4631ec64d3397e96ce33f5a69909ba7aaf5c5  bc-2.5.3.tar.xz
    
    $ stat -c '%s  %n'
    162784  bc-2.5.3.tar.xz
    
    $ sha512sum bc-2.5.3.tar.xz.sig
    dbd8383eefdc8692cded29d296debd1eddc1e57cf33b2cbcff583a8ea756eaed5c6c9623a6dd85f9207a4142614f9f08b665c5cf374254ad20ba8e774053ae90  bc-2.5.3.tar.xz.sig
    
    $ sha256sum bc-2.5.3.tar.xz.sig
    112040a82ae5ba005aa1b15ffcba726e17ef540be5c1529a4345e374dbdf7ba5  bc-2.5.3.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.5.3.tar.xz.sig
    
     
  • Version 2.5.2

    gavin 10 months ago | 725 commits to master since this release

    This release is a production release.

    No code was changed, but the build system was changed to allow CFLAGS to be given to CC, like this:

    CC="gcc -O3 -march=native" ./configure.sh
    

    If this happens, the flags are automatically put into CFLAGS, and the compiler is set appropriately. In the example above this means that CC will be "gcc" and CFLAGS will be "-O3 -march=native".

    This behavior was added to conform to GNU autotools practices.

     
  • Version 2.5.1

    gavin 10 months ago | 725 commits to master since this release

    This is a production release which addresses portability concerns discovered in the bc build system. No bc code was changed.

    • Support for Solaris SPARC and AIX were added.
    • Minor documentations edits were performed.
    • An option for configure.sh was added to disable long options if getopt_long() is missing.
    $ sha512sum bc-2.5.1.tar.xz
    a2dec8f520a2c64df582a41bacb2f3ea275fbf01400668a7bcea1d3a90c0490516c20fd79932157ec0e313e845a34d100cf05985e8cdea456308c2aa8843bab4  bc-2.5.1.tar.xz
    
    $ sha256sum bc-2.5.1.tar.xz
    ebd85523b8aa08f694f6415c672477ba7ef878d25a37ae1b779c27c64d62dd0e  bc-2.5.1.tar.xz
    
    $ stat -c '%s  %n'
    162408  bc-2.5.1.tar.xz
    
    $ sha512sum bc-2.5.1.tar.xz.sig
    907937b67ad1a279f1713e613a65a4606a620f39600a087c9cf05a64beaa90e06e905c0f9e1b1199ae44df797823de215bd877f54a031fad045aa760e3909627  bc-2.5.1.tar.xz.sig
    
    $ sha256sum bc-2.5.1.tar.xz.sig
    0232a416adb7c4550b20621551d303743ed25eebb628157de7157f454c1de94b  bc-2.5.1.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.5.1.tar.xz.sig
    
     
  • Version 2.5.0

    gavin 10 months ago | 725 commits to master since this release

    This is a production release with new translations. No code changed.

    The translations were contributed by bugcrazy, and they are for Portuguese, both Portugal and Brazil locales.

    $ sha512sum bc-2.5.0.tar.xz
    6e129111e6619530c2f5e05d958004ba1ac1385e6aaf12917b09e3b1352d518ae3105a8868c7bb9d9984c93dd1a8a6f5fcb14d40889fa5c5f363e4fbd00ff625  bc-2.5.0.tar.xz
    
    $ sha256sum bc-2.5.0.tar.xz
    087383e3dc0e065d5461795ad93f9168dc239c033c415a7fbdf1de80929c1498  bc-2.5.0.tar.xz
    
    $ stat -c '%s  %n'
    161720  bc-2.5.0.tar.xz
    
    $ sha512sum bc-2.5.0.tar.xz.sig
    80b835969d919bd3326d14b38ad7b4f7186893a4d6430a8534611fd0a8415ea7d4feb9805e7773903aa27fd768d8400e3567d1b13164ab093fdfebaaef1c11a0  bc-2.5.0.tar.xz.sig
    
    $ sha256sum bc-2.5.0.tar.xz.sig
    d33b175c104738a23027e1ff2eadfbef5b23a0d71e225ccd0be1d906e74e792b  bc-2.5.0.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.5.0.tar.xz.sig
    
     
  • Version 2.4.0

    gavin 10 months ago | 725 commits to master since this release

    This is a production release primarily aimed at improving dc.

    • A couple of copy and paste errors in the dc manual were fixed.
    • dc startup was optimized by making sure it didn't have to set up bc-only things.
    • The bc && and || were made available to dc through the M and m commands, respectively.
    • dc macros were changed to be tail call-optimized.

    The last item, tail call optimization, means that if the last thing in a macro is a call to another macro, then the old macro is popped before executing the new macro. This change was made to stop dc from consuming more and more memory as macros are executed in a loop.

    The q and Q commands still respect the "hidden" macros by way of recording how many macros were removed by tail call optimization.

    $ sha512sum bc-2.4.0.tar.xz
    43006a9f0b3acbc27fb3726536eb8723155521c3b29e187d54b350320f179454c526f5e5e66c0b3a1fca62003d1e830220d4753fd374efa3a0fa1f8a1d02e739  bc-2.4.0.tar.xz
    
    $ sha256sum bc-2.4.0.tar.xz
    95bf33fe35a80612b800bf6db5b2164f28b6147809a2f600a504e59263ba9c84  bc-2.4.0.tar.xz
    
    $ stat -c '%s  %n'
    168000  bc-2.4.0.tar.xz
    
    $ sha512sum bc-2.4.0.tar.xz.sig
    e62656fe4e7b37f93bd5144fe54180d8e7b71e6445bee94604cfbd58730972c14388aaf26f9bf77cc4d0bd8ecd48f3d92642c6d827602c3e11c095f3308575c5  bc-2.4.0.tar.xz.sig
    
    $ sha256sum bc-2.4.0.tar.xz.sig
    54bd3d4e2c0f84609abfbfa0be7eab7d006ea1942bf195ba4fc6da310fb9afb3  bc-2.4.0.tar.xz.sig
    
    $ stat -c '%s  %n'
    662  bc-2.4.0.tar.xz.sig