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
The following are the changes in this release:
Added builtin functions to convert between degrees and
degrees, minutes and seconds under the config("mod")
round rules:
d2dms(degs, d, m, s [,rnd]) - given degs, compute d, m, s
d2dm(degs, d, m [,rnd]) - given degs, compute d, m
See help/d2dms and help/d2dm.
Example:
; print d2dms(360.321,deg=,min=,sec=), deg, min, sec;
0.321 0 19 15.6
; print d2dm(360.321,deg=,min=), deg, min;
0.321 0 19.26
Added builtin functions to convert between gradians and
gradians, minutes and seconds under the config("mod")
round rules:
g2gms(grads, g, m, s [,rnd]) - given grads, compute g, m, s
g2gm(grads, g, m [,rnd]) - given grads, compute g, m
See help/g2gms and help/g2gm.
Example:
; print g2gms(400.321,grad=,min=,sec=), grad, min, sec;
0.321 0 19 15.6
; print g2gm(400.321,grad=,min=), grad, min;
0.321 0 19.26
Added builtin functions to convert between hours and
hours, minutes and seconds under the config("mod")
round rules:
h2hms(hours, h, m, s [,rnd]) - given hours, compute h, m, s
h2hm(hours, h, m [,rnd]) - given hours, compute h, m
See help/h2hms and help/h2hm.
Example:
; print h2hms(24.321,hour=,min=,sec=), hour, min, sec;
0.321 0 19 15.6
; print h2hm(24.321,hour=,min=), hour, min;
0.321 0 19.26
Renumbered regression tests 3408 thru 3437, to 9102 thru 9131.
Updated Added hms.cal resource file to use h2hms() builtin.
Updated Added dms.cal resource file to use d2dms() builtin.
Fix minor typo in help/mod SYNOPSIS.
Fix minor typo in help/quo SYNOPSIS.
Added a few more examples to help/strcmp.
Added builtin functions to convert between degrees, minutes and
seconds and degrees under the config("mod") round rules:
dms2d(d, m, s [,rnd]) - convert deg, min, and secs to deg
dm2d(d, m [,rnd]) - convert deg, min to deg
See help/dms2d and help/dm2d.
Example:
; print dms2d(12, 20, 44.16);
12.3456
; print dm2d(3601, -25.5594);
0.57401
Added builtin functions to convert between gradians, minutes and
seconds and gradians under the config("mod") round rules:
gms2g(g, m, s [,rnd]) - convert grad, min, and secs to grad
gm2g(g, m [,rnd]) - convert grad and min to grad
See help/g2gms and help/g2gm.
Example:
; print gms2g(12, 20, 44.16);
12.3456
; print gm2g(4001, -25.5594);
0.57401
Added builtin functions to convert between hours, minutes and
seconds and hours under the config("mod") round rules:
hms2h(h, m, s [,rnd]) - convert hours, min, and secs to hours
hm2h(h, m [,rnd]) - convert hours, min to hours
See help/hms2h and help/hm2h.
Example:
; print hms2h(12, 20, 44.16);
12.3456
; print hm2h(241, -25.5594);
0.57401
Added builtin functions to convert between degrees, minutes and
seconds and degrees under the config("mod") round rules:
dms2d(d, m, s [,rnd]) - convert deg, min, and secs to deg
dm2d(d, m [,rnd]) - convert deg, min to deg
See help/dms2d and help/dm2d.
Example:
; print dms2d(12, 20, 44.16);
12.3456
; print dm2d(3601, -25.5594);
0.57401
Added builtin functions to convert between gradians, minutes and
seconds and gradians under the config("mod") round rules:
gms2g(g, m, s [,rnd]) - convert grad, min, and secs to grad
gm2g(g, m [,rnd]) - convert grad and min to grad
See help/g2gms and help/g2gm.
Example:
; print gms2g(12, 20, 44.16);
12.3456
; print gm2g(4001, -25.5594);
0.57401
Added builtin functions to convert between hours, minutes and
seconds and hours under the config("mod") round rules:
hms2h(h, m, s [,rnd]) - convert hours, min, and secs to hours
hm2h(h, m [,rnd]) - convert hours, min to hours
See help/hms2h and help/hm2h.
Example:
; print hms2h(12, 20, 44.16);
12.3456
; print hm2h(241, -25.5594);
0.57401
Added several conversion functions:
Added builtin functions to convert between degrees and
degrees, minutes and seconds under the config("mod")
round rules:
d2dms(degs, d, m, s [,rnd]) - given degs, compute d, m, s
d2dm(degs, d, m [,rnd]) - given degs, compute d, m
See help/d2dms and help/d2dm.
Example:
; print d2dms(360.321,deg=,min=,sec=), deg, min, sec;
0.321 0 19 15.6
; print d2dm(360.321,deg=,min=), deg, min;
0.321 0 19.26
Added builtin functions to convert between gradians and
gradians, minutes and seconds under the config("mod")
round rules:
g2gms(grads, g, m, s [,rnd]) - given grads, compute g, m, s
g2gm(grads, g, m [,rnd]) - given grads, compute g, m
See help/g2gms and help/g2gm.
Example:
; print g2gms(400.321,grad=,min=,sec=), grad, min, sec;
0.321 0 19 15.6
; print g2gm(400.321,grad=,min=), grad, min;
0.321 0 19.26
Added builtin functions to convert between hours and
hours, minutes and seconds under the config("mod")
round rules:
h2hms(hours, h, m, s [,rnd]) - given hours, compute h, m, s
h2hm(hours, h, m [,rnd]) - given hours, compute h, m
See help/h2hms and help/h2hm.
Example:
; print h2hms(24.321,hour=,min=,sec=), hour, min, sec;
0.321 0 19 15.6
; print h2hm(24.321,hour=,min=), hour, min;
0.321 0 19.26
In addtion:
Renumbered regression tests 3408 thru 3437, to 9102 thru 9131.
Updated Added hms.cal resource file to use h2hms() builtin.
Updated Added dms.cal resource file to use d2dms() builtin.
Fix minor typo in help/mod SYNOPSIS.
Fix minor typo in help/quo SYNOPSIS.
Added a few more examples to help/strcmp.
The clean and clobber makefile rules no longer list custom/Makefile
as a dependency.
Unfortunately due to the complex dependency issues between
Makefile, Makefile.ship and custom/Makefile, parallel GNU make
is NOT recommended. Sorry (tm Canada) :)
Fixed a few typos in CHANGES.
As a side note: We stayed v2.13.x was kept for only a short time.
The move to 2.14.x was motivated by non-compatible changes due to
the default order of CALCRC, plus some new builtin functions.
More changes are likely, so we might see another v2.14.0.x release
before things are declared "recommended stable".
Not that we wan to discourage people from trying v2.14.0, you should
try it. We just want things to become stable and well field tested
before we reach the "recommended stable" release state.
Unfortunately due to the complex dependency issues between
Makefile, Makefile.ship and custom/Makefile, parallel GNU make
is NOT recommended. Sorry (tm Canada) :)
A .bak file was accicently put into the DETAIL_HELP list.
That bogus help file was removed.
Modified the help/Makefile detail_help_list rule to remove .bak files
when forming DETAIL_HELP.
Updated CHANGES.
Updated help/unexpected.
Added help files for d2g(), d2r(), g2d(), g2r(), r2d(), r2g().
Added regression test code for the same functions.
Fixed a few minor typos.
We still need to add:
help files for g2d & d2g
regression tests for g2d & d2g
notes in related trig help files
note in unexpected help file
note in CHANGES
We still need to add:
help files for g2r & r2g
regression tests for g2r & r2g
notes in related trig help files
note in unexpected help file
note in CHANGES