The constants:
9, 9/10, 10/9, 24, 360, 400
are used by func.c only, so there were moved
from {q,z}math.{c,h} to func.c.
The constants:
3, 4
are used by zrandom.c only, so there were moved
from {q,z}math.{c,h} to zrandom.c.
Improved the way that internal pre-defined constants are managed.
Removed unused internal pre-defined constants. Added code to
prevent an internal pre-defined constant (that was never
allocated) from being freed.
The following are the changes in this release:
Due to issues with clang and Apple Silicon, ARCH_CFLAGS is now,
by default, empty:
ARCH_CFLAGS=
If you want to use, say, -march=native, then either change
the Makefile or make with:
make all ARCH_CFLAGS='-march=native'
Added arch and hardware as GNU Makefile computed values.
As with ${target}, ${arch} and ${hardware} is computed by uname:
target: uname -a
arch: uname -p
hardware: uname -m
Fixed compiling calc on Apple Silicon with homebrew. On Apple
Silicon, HomeBrew installs on into a different location. The
Makefile checks if ${hardware} is arm64 and adjusts the location
of libraries such as readline and history accordingly.
The following are the changes in this release:
Fizzbin is a better word. :-)
The help and man builtin commands now return an error when a
help file cannot be opened, such as when there is no help file.
Added palindrome.cal resource file. For example, to find the
largest (highly probable) prime palindrome under 280 decimal
digits (text tweet limit):
prevprimepal(1e280)
In cal/palindrome.cal:
Improved the performace of nextpal() and nextprimepal()
by adding and using palnextpal().
Improved the performace of prevpal() and prevprimepal()
by adding and using palprevpal().
Test showed that runs that took 0.0530 cpu seconds can
now be done in as little as 0.0327 cpu seconds.
The help and man commands now issue an error message when
the help file cannot be opened: say because there is a
help command typo and there is no such help file.
The following are the changes in this release:
Fixed typo in cal/statistics.cal thanks to a report by <GitHub user
dennisaldea>.
Fixed an old Windoz pun in README.WINDOWS as requested by <GitHub
user marcodegio>.
Fixed a really obscure bug in the internal initconstants()
function of const.c that has been sitting for over 31 years!
We are amazed that nobody has encountered this bug before
now. Nevertheless, our very extensive regression and
multi-architecture testing found the bug. Now, after all
those years, it is fixed.
Fixed issues identied by the default CodeUL GitHub security code scan:
Wrong type of arguments to printf in have_fpos_pos.c
Multiplication result converted to larger type in zfunc.c
Fixed a really obscure bug in the internal initconstants()
function of const.c that has been sitting for over 31 years!
We are amazed that nobody has encountered this bug before
now. Nevertheless, our very extensive regression and
multi-architecture testing found the bug. Now, after all
those years, it is fixed.
Fixed issues identied by the default CodeUL GitHub security code
scan:
Wrong type of arguments to printf in have_fpos_pos.c
Multiplication result converted to larger type in zfunc.c
Fixed a really obscure bug in the internal initconstants()
function of const.c that has been sitting for over 31 years!
We are amazed that nobody has encountered this bug before
now. Nevertheless, our very extensive regression and
multi-architecture testing found the bug. Now, after all
those years, it is fixed.
Fixed issues identied by the default CodeUL GitHub security code scan:
Wrong type of arguments to printf in have_fpos_pos.c
Multiplication result converted to larger type in zfunc.c