Download Latest Version calc-2.17.0.0.tar.bz2 (1.0 MB)
Email in envelope

Get an email when there's a new version of calc: C-style arbitrary precision system

Home / old-calc / 2.16.0.3
Name Modified Size InfoDownloads / Week
Parent folder
README.txt 2025-12-25 2.4 kB
calc-2.16.0.3.tar.bz2 2025-12-25 1.0 MB
calc-debuginfo-2.16.0.3-14.x86_64.rpm 2025-12-25 773.4 kB
calc-devel-2.16.0.3-14.x86_64.rpm 2025-12-25 614.4 kB
calc-2.16.0.3-14.src.rpm 2025-12-25 1.1 MB
calc-2.16.0.3-14.x86_64.rpm 2025-12-25 1.9 MB
Totals: 6 Items   5.4 MB 0
The following are the changes in this release:

    The segmentation fault as reported in issue #174 has been fixed.
    When the `powervalue()` function was expanded to (in `value.c`), to
    process complex powers, the author forgot that the function `c_power()`
    returns NULL when the result is too large to represent in memory.  Now,
    when `c_power()` returns NULL within the `powervalue()` function, the
    `E_POWER_4` math error ("Too-large value for power") will be raised.
    Thanks go to the GitHub user @mengrj for reporting this problem
    in issue #174 in a clear and concise way such that we were able
    to fix this problem.

    Reduced `MAXCMD` (maximum length of command invocation) in `calv.h`
    from 16384 to 5120.  On most systems, commands longer than 5.6k would
    hit the soft stack size limit and trigger a stack overflow condition
    causing calc to crash with a SIGSEGV (segmentation violation).

    If you need a super-long calc commands, consider increasing
    the `MAXCMD` value in `calc.h`, and increase the stack size
    limits for your calc run.  For example under Linux to increase
    the maximum stack size to 2^28 bytes:

        prlimit --stack=268435456 calc

    or:

        ulimit -s 49152
        calc

    Resolved, as much we can, issue #175.

    Recommend `-fstack-protector-all` in `Makefile.local` comments.

    Fixed signed integer overflow in `c_power()`.

    The `c_power(COMPLEX *c1, COMPLEX *c2, NUMBER *epsilon)` function in
    `comfunc.c` no longer triggers a signed integer overflow.

    Added `qqbitvalue(NUMBER pos)` to `qmarth.c`: like `qbitvalue(long n)`
    but with a NUMBER arg, and will return NULL if the shifted bit is too
    large to hold in memory.

    Added `zzbitvalue(ZVALUE pos, ZVALUE *res)`: similar to the
    `zbitvalue(long n, ZVALUE *res)` function but with a `ZVALUE` arg,
    and returns a boolean, and does not call math_error().

    Added `ZVALUE _baseb_` to hold the `BASEB` as a `ZVALUE`.
    Added `MAXDATA_LOG2` to hold the log base 2 value of `MAXDATA`.
    Added `MAXLEN_LOG2` to hold the log base 2 value of `MAXLEN`.
    Added `HALF_BITS` as an alias for `BASEB`.

    Added to `cal/regress.cal`, regression test 9758 to test for
    the condition that issue #174 was about.

    Improved the Common Address Sanitizer (ASAN) comments in
    `Makefile.config` and `Makefile.local`.

    Resolved issue #176.
Source: README.txt, updated 2025-12-25