[go: up one dir, main page]

Menu

calc: C-style arbitrary precision system / News: Recent posts

calc 2.16.1.2 release

The following are the changes in this release:

Fixed a bug where the calc command history was not being properly
saved in the history file.  Thanks go to the GitHub user @Vekhir
for both reporting this problem and helping come up with a solution.

Per request, we expanded number of entries to save from 1024 to 4096.
Posted by (chongo) Landon Curt Noll 2026-01-08

calc 2.16.1.1 release

The following are the changes in this release:

Fix compiler warning for `custom/u_pfe.c`.

Update the `ARCH_CFLAGS` make symbol comments in `Makefile.config`.

Add `ARCH_CFLAGS` to `COMMON_CFLAGS` in `Makefile.config`.

Add "RHEL (Linux) Address Sanitizer (ASAN) for i686" commented out
section to `Makefile.local`.

Improve comments in `Makefile.local` related to "Address Sanitizer (ASAN)".... [read more](/p/calc/news/2026/01/calc-21611-release/)
Posted by (chongo) Landon Curt Noll 2026-01-04

calc 2.16.1.0 release

The following are the changes in this release:

Added a new `.clang-format` file as the basis for using the
`clang-format(1)` tool to format calc source in a consistent way.
This code re-formatting will make it easier to work in calc v3 code
changes in the future by making the calc source much more consistent.

Removed `.clang-format` exclusion from `.gitignore`.

Modified `func.c` to prevent the `clang-format(1)` tool from formatting
the `builtins[]` table that builtin make rule in `help/Makefile` uses to
format the `help/builtin` file.  We can live with the `builtins[]`
table as it is today, for now.... [read more](/p/calc/news/2025/12/calc-21610-release/)
Posted by (chongo) Landon Curt Noll 2025-12-31

calc 2.16.0.3 release

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.... [read more](/p/calc/news/2025/12/calc-21603-release/)
Posted by (chongo) Landon Curt Noll 2025-12-25

calc 2.16.0.2 release

The following are the changes in this release:

Fixed bug, when custom functions were enabled, where returning a
value from the sysinfo custom function such as:

    custom("sysinfo","DEFAULTSHELL")

would cause a segmentation violation due to an improper `free(3)`.

Fixed a memory leak that was related to the sysinfo custom function.

Added paranoia checks on shell value when processing commands
read from the tty that start with the "!" character.... [read more](/p/calc/news/2025/12/calc-21602-release/)
Posted by (chongo) Landon Curt Noll 2025-12-22

calc 2.15.1.1 release

The following are the changes in this release:

Change Makefile.config to, if not using not HomeBrew, then try to
detect macports and/or using /opt/local/{lib,include}.

Put full date range (1989-2025) of calc source into version.h.
Posted by (chongo) Landon Curt Noll 2025-04-24

calc 2.15.1.0 release

The following are the changes in this release:

Converted all ASCII tabs to ASCII spaces using a 8 character
tab stop, for all files, except for all Makefiles (plus rpm.mk).
The command `git diff -w` reports no changes.  There is no
functionality change in calc: only ASCII tabs to ASCII spaces.

Fixed trailblank.  It was pruning . in its find search.
Added check for ASCII tabs is non-Makefiles.... [read more](/p/calc/news/2024/07/calc-21510-release/)
Posted by (chongo) Landon Curt Noll 2024-07-12

calc 2.15.0.7 release

The following are the changes in this release:

Thanks to GitHub user @bambooleafz a critical bug (GitHub issue
#148 - https://github.com/lcn2/calc/issues/148) they identified
was fixed.
Posted by (chongo) Landon Curt Noll 2024-05-28

calc 2.15.0.7 release

The following are the changes in this release:

Thanks to GitHub user @bambooleafz a critical bug (GitHub issue
#148 - https://github.com/lcn2/calc/issues/148) they identified
was fixed.
Posted by (chongo) Landon Curt Noll 2024-05-28

calc 2.15.0.6 release

The following are the changes in this release:

 Thanks to GitHub user @ashamedbit, a long standing memory leak in
 zrandom.c has been fixed.
Posted by (chongo) Landon Curt Noll 2024-02-09

calc 2.15.0.5 release

The following are the changes in this release:

 make clobber now removes the legacy files: have_fpos.h, help/man,
 and help/usage.  The latter 2 are now managed as help aliases
 in help.c.

 make install now removes the legacy files: ${HELPDIR}/man
 and ${HELPDIR}/usage.

 Fixed a problem where, when calc was linked with and uses GNU
 readline then for any multi-line copy-and-paste, only the first
 line is executed.  Thanks to GitHub user @malfisya for reporting
 this problem, and thanks to GitHub user @gromit1811 for doing
 the research needed to overcome deficiencies in the GNU readline
 documentation, and for supplying the work-a-round to allow
 multi-line copy-and-paste to work as expected!
Posted by (chongo) Landon Curt Noll 2024-02-02

calc 2.15.0.4 release

The following are the changes in this release:

Fixed bug that caused calc to fail to compile filepos2z() in file.c
on little endian machines for the Debian apcalc package.  Thanks to
Martin Buck (m at rtin-buck dor de) for for fix.

Removed unused macros from zmath.h:

SWAP_B32_IN_HASH(dest, src)
SWAP_B16_IN_HASH(dest, src)
SWAP_B8_IN_HASH(dest, src)
SWAP_B32_IN_FLAG(dest, src)
SWAP_B16_IN_FLAG(dest, src)
SWAP_B8_IN_FLAG(dest, src)... [read more](/p/calc/news/2023/12/calc-21504-release/)
Posted by (chongo) Landon Curt Noll 2023-12-21

calc 2.15.0.2 release

The following are the changes in this release:

Updated BUGS about MSYS2 on Windows compiling of calc.

Added more git related checks and sanity checks to chk_tree.

Added ${FSANITIZE} make variable to Makefile.config to hold
common Address Sanitizer (ASAN) optins to modern Linux and macOS.
The Address Sanitizer is NOT enabled not compiled in by default.
Improved comments in Makefile.local for RHEL9.2 (Linux) and for
macOS 14.0 that, when uncommented and calc is recompiled (i.e.,
make clobber all) will enable the Address Sanitizer (ASAN) for calc.... [read more](/p/calc/news/2023/12/calc-21502-release/)
Posted by (chongo) Landon Curt Noll 2023-12-08

calc 2.15.0.1 release

The following are the changes in this release:

The tarball for calc version 2.15.0.0 was missing version.h.
The version.h is now listed as part of the calc distribution.

Added the following new trigonometric functions:

versin(x [,eps])    versed trigonometric sine
coversin(x [,eps])  coversed trigonometric sine
vercos(x [,eps])    versed trigonometric cosine
covercos(x [,eps])  coversed trigonometric cosine
aversin(x [,eps])   inverse versed trigonometric sine
acoversin(x [,eps]) inverse coversed trigonometric sine
avercos(x [,eps])   inverse versed trigonometric cosine
acovercos(x [,eps]) inverse coversed trigonometric cosine
haversin(x [,eps])  half versed trigonometric sine
hacoversin(x [,eps])    half coversed trigonometric sine
havercos(x [,eps])  half versed trigonometric cosine
hacovercos(x [,eps])    half coversed trigonometric cosine
ahaversin(x [,eps]) inverse half versed trigonometric sine
ahacoversin(x [,eps])   inverse half coversed trigonometric sine
ahavercos(x [,eps]) inverse half versed trigonometric cosine
ahacovercos(x [,eps])   inverse half coversed trigonometric cosine
exsec(x [,eps])     exterior trigonometric secant
aexsec(x [,eps])    inverse exterior trigonometric secant
excsc(x [,eps])     exterior trigonometric cosecant
aexcsc(x [,eps])    inverse exterior trigonometric cosecant
crd(x [,eps])       trigonometric chord of a unit circle
acrd(x [,eps])      inverse trigonometric chord of a unit circle
cas(x [,eps])       trigonometric cosine plus sine
cis(x [,eps])       Eulers formula... [read more](/p/calc/news/2023/10/calc-21501-release-802/)
Posted by (chongo) Landon Curt Noll 2023-10-05

calc 2.15.0.1 release

The following are the changes in this release:

The tarball for calc version 2.15.0.0 was missing version.h.
The version.h is now listed as part of the calc distribution.

Added the following new trigonometric functions:

versin(x [,eps])    versed trigonometric sine
coversin(x [,eps])  coversed trigonometric sine
vercos(x [,eps])    versed trigonometric cosine
covercos(x [,eps])  coversed trigonometric cosine
aversin(x [,eps])   inverse versed trigonometric sine
acoversin(x [,eps]) inverse coversed trigonometric sine
avercos(x [,eps])   inverse versed trigonometric cosine
acovercos(x [,eps]) inverse coversed trigonometric cosine
haversin(x [,eps])  half versed trigonometric sine
hacoversin(x [,eps])    half coversed trigonometric sine
havercos(x [,eps])  half versed trigonometric cosine
hacovercos(x [,eps])    half coversed trigonometric cosine
ahaversin(x [,eps]) inverse half versed trigonometric sine
ahacoversin(x [,eps])   inverse half coversed trigonometric sine
ahavercos(x [,eps]) inverse half versed trigonometric cosine
ahacovercos(x [,eps])   inverse half coversed trigonometric cosine
exsec(x [,eps])     exterior trigonometric secant
aexsec(x [,eps])    inverse exterior trigonometric secant
excsc(x [,eps])     exterior trigonometric cosecant
aexcsc(x [,eps])    inverse exterior trigonometric cosecant
crd(x [,eps])       trigonometric chord of a unit circle
acrd(x [,eps])      inverse trigonometric chord of a unit circle
cas(x [,eps])       trigonometric cosine plus sine
cis(x [,eps])       Eulers formula... [read more](/p/calc/news/2023/10/calc-21501-release/)
Posted by (chongo) Landon Curt Noll 2023-10-05

calc 2.15.0.0 release

Due to a missing verson.h file, this release was moved under old-calc.

We will release a version 2.15.0.1 soon.

Sorry (tm Canada 🇨🇦).

Posted by (chongo) Landon Curt Noll 2023-10-04

calc 2.14.3.5 release

The following are the changes in this release:

Under macOS, to reduce dependency chains, we remove functions
and data that are unreachable by the entry point or exported
symbols.  In particular, the macOS linker is used with both
"-dead_strip" and "-dead_strip_dylibs".

The libcalc shared library is now linked with libcustcalc.
Posted by (chongo) Landon Curt Noll 2023-08-17

calc 2.14.3.0 release

The following are the changes in this release:

Updated COPYING to include the actual text of "The Unlicense".
Made minor formatting changes to the file.

The Darwin specific ${DARWIN_ARCH}, thay by default was unset,
is now the ${ARCH_CFLAGS} Makefile variable.  Comments about
various "-arch name" have been moved to the ${ARCH_CFLAGS} area.

For old Apple Power PC systems, the following is added:... [read more](/p/calc/news/2023/08/calc-21430-release/)
Posted by (chongo) Landon Curt Noll 2023-08-02

calc 2.14.2.0 release

The following are the changes in this release:

Ported calc to the s390x IBM Mainframe running RHEL9.1.

Added cal/splitbits.cal:

splitbits(x, b)

Given an integer x, split the value into a list of integers,
each of which is at most b bits long.

The value b must be an integer > 0.

The number of elements in the returned list is:

    ceil((highbit(x) + 1) / b)

If x == 0, then a list of 1 element containing 0 is returned.... [read more](/p/calc/news/2023/07/calc-21420-release/)
Posted by (chongo) Landon Curt Noll 2023-07-22

calc 2.14.1.6 release

The following are the changes in this release:

Fixed version numbers in two cases in CHANGES that referred
to the 2.14.2.x instead of 2.14.1.x.

Rename MINGW Makefile variable (a holdover from MINGW32_NT-5.0)
to OSNAME.

Fixed FUNCPTR typedef in hist.c to fix deprecated compiler warnings.

Fixed when USE_READLINE, READLINE_LIB, READLINE_EXTRAS, and
READLINE_INCLUDE are set to empty (disable use of the GNU-readline
facility).... [read more](/p/calc/news/2023/06/calc-21416-release/)
Posted by (chongo) Landon Curt Noll 2023-06-01

calc 2.14.1.5 release

The following are the changes in this release:

Fixed version numbers in two cases in CHANGES that referred
to the 2.14.2.x instead of 2.14.1.x.

Rename MINGW Makefile variable (a holdover from MINGW32_NT-5.0)
to OSNAME.

Fixed FUNCPTR typedef in hist.c to fix deprecated compiler warnings.

Fixed when USE_READLINE, READLINE_LIB, READLINE_EXTRAS, and
READLINE_INCLUDE are set to empty (disable use of the GNU-readline
facility).... [read more](/p/calc/news/2023/03/calc-21415-release/)
Posted by (chongo) Landon Curt Noll 2023-03-13 Labels: v2.14.1.5

calc 2.14.1.3 release

The following are the changes in this release:

Fixed missing <string.h include in have_fpos_pos.c.

Change calc version from 2.14.1.2 to 2.14.2.3 as part of a test to
build calc RPMs on a reference RHEL8.7 platform (formerly a RHEL7.9
platform).
Posted by (chongo) Landon Curt Noll 2023-02-14

calc 2.14.1.2 release

The following are the changes in this release:

Restored use of the #define FPOS_POS_LEN symbol.  This refers to
the length of the __pos element (if the __pos element exists),
the fpos_t type (if that type exists).

Changed SWAP_HALF_IN_FILEPOS(dest, src) mato to use FILEPOS_LEN Little
Endian when FILEPOS is a simple scalar type (i.e., HAVE_FILEPOS_SCALAR
is defined).

Changed #define HAVE_FPOS to HAVE_FGETSETPOS.... [read more](/p/calc/news/2022/11/calc-21412-release/)
Posted by (chongo) Landon Curt Noll 2022-11-29

calc 2.14.1.0 release

The following are the changes in this release:

Fixed alignment of show item section of help command.

Bug fix: While 0^0 == 1, now for y > 0, 0^y == 0.
Adjusted cal/test8900.cal to reflect this bug fix.
Added tests to cal/regress.cal to help verify bug fix is fixed.
Posted by (chongo) Landon Curt Noll 2022-04-08

calc 2.14.0.14 release

The following are the changes in this release:

Fixed typo in Makefile.local comment.

Established a tagging procedure for a production release.
Production git tags will be of the form:

prod-2.x.y.z
Posted by (chongo) Landon Curt Noll 2021-12-28