Improve builtin function strings, as printed by help builtin,
that use an optional accuracy (epsilon) arg by adding a comma.
Added the following new trigonometric functions:
crd(x [,eps]) trigonometric chord of a unit circle
acrd(x [,eps]) inverse trigonometric chord of a unit circle
Added the following new trigonometric functions:
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
Added to test 95dd and test9500.trigeq.cal to the calc regression test
suite to perform extensive test of trigonometric functions.
Added to test 34dd, some if the missing inverse trigonometric tests.
Fixed SEE ALSO typo in help randperm.
Added the following new trigonometric functions:
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
Fixed calc regression test 42dd to set the display value back to 20.
Added test 95dd and test9500.trigeq.cal to the calc regression test
suite to perform extensive test of trigonometric functions.
Fix and improve recently comments and variable names added new
trigonometric functions in comfunc.c, func.c, qtrans.c.
The trigonometric file files have had several bug fixed.
The EXAMPLE sections of trigonometric file have
been made consistent.
Added these new help files in anticipation of
the code for these new (i.e., to be written) builtin functions:
hacovercos hacoversin havercos haversin
ahacovercos ahacoversin ahavercos ahaversin
Rename E_BROUND to E_BROUND_1 as per an earlier change
on the E_STRING formats.
E_BROUND ==> E_BROUND_1
Improve the ciarify of calc regression suite (regress.cal) to mostly
use E_STRING errsym instead of numeric errnum values for error()
and errno() related tests.
Added tests to the calc regression test suite (cal/regress.cal) to
verify that the errnum calc computation error codes and their
E_STRING values have not changed.
NOTE: errstr was renamed to errsym.
Added errsym builtin function. The errsym(errnum | "E_STRING")
builtin, , when given a valid integer errnum that corresponds to a
calc error condition, will return an E_STRING string, AND when given
a valid E_STRING string that is associated with a calc error
condition, will return errnum integer that corresponds to a calc
error condition.
Supplying a non-integer numeric errnum code to error(), errno(),
strerror(), or errsym() will result in an error.
When errtbl.c is being compiled for the errcode executable,
(when ERRCODE_SRC is defined), skip functions that make
called to math_error() and name_newerrorstr() from libcalc.
Now the "E_STRING" errsym strings in error_table[], with exception
to the 1st E__BASE entry, all other errsym strings must match the
following regular expression:
^E_[A-Z][A-Z0-9_]+$
Renamed "E_1OVER0" to "E_DIVBYZERO".
Renamed "E_0OVER0" to "E_ZERODIVZERO".
Removed from errsym.h (as built by errcode -d via the Makefile),
E__NONE, E__BASE, E__USERDEF, and E__USERMAX. These symbols were
also defined in errtbl.h, which is NOW the place of the #define.
Update .gitigore with another temporary file.
Rename the #define E__COUNT to ECOUNT to avoid confusion
with "E_STRING" error symbols.
Improve formatting of help/error, help/errno, and help/strerror.
Update .gitignore.
Changed calc_errno a global int variable so that is may be directly
accessed by libcalc users.
Further improve help files for help/errno, help/error, help/newerror,
help/stoponerror and help/strerror by adding to documentation
of the calc error code system as well as libcalc interface
where applicable.
Changed #define E_USERDEF to #define E__USERDEF.
Removed use of E_USERDEF, E__BASE, E__COUNT, and E__HIGHEST
from custom/c_sysinfo because the c_sysinfo is just a demo
and this will simplify the custom/Makefile.
The include file calcerr.h is now the errsym.h include file.
The calcerr.tbl has been replaced by errtbl.c and errtbl.h.
The calcerr_c.awk, calcerr_c.sed, calcerr_h.awk, and
calcerr_h.sed files are now obsolete and have been removed.
The calcerr.c and calcerr.h now obsolete and are no longer built.
The calc computation error codes, symbols and messages are now in
a error_table[] array of struct errtbl.
An E_STRING is a string corresponds to an error code #define.
For example, the E_STRING for the calc error E_STRCAT,
is the string "E_STRING". An E_STRING must now match
the regular expression: "^E_[A-Z0-9_]+$".
The old array error_table[] of error message strings has been
replaced by a new error_table[] array of struct errtbl. The struct
errtbl array holds calc errnum error codes, the related E_STRING
symbol as a string, and the original related error message.
To add new computation error codes, add them near the bottom of the
error_table[] array, just before the NULL entry.
The ./errcode utility, when run, will verify the consistency of
the error_table[] array.
The Makefile uses ./errcode -e to generate the contents of
help/errorcodes file. The help errorcodes now prints
information from the new cstruct errtbl error_table[] array.
The help/errorcodes.hdr and help/errorcodes.sed files are
now obsolete and have been removed.
The Makefile uses ./errcode -d to generate the contents of the
errsym.h include file.
Updated .gitignore and trailblank to support the above changes.
Changed calc_errno a global int variable so that is may be directly
accessed by libcalc users.
Further improve help files for help/errno, help/error, help/newerror,
help/stoponerror and help/strerror by adding to documentation
of the calc error code system as well as libcalc interface
where applicable.
Added help/errorcodes rule to the top level Makefile.
Added E_USERMAX symbol (== 32767) to indicate the maximum value
allowed for user error codes.
Improve help/error. Added text about error code ranges and
range symbols.
Added complex multiple approximation function to commath.c so
that users of libcalc may directly round complex number to
nearest multiple of a given real number:
E_FUNC COMPLEX *cmappr(COMPLEX *c, NUMBER *e, long rnd, bool cfree);
For example:
COMPLEX *c; /* complex number to round to nearest epsilon */
NUMBER *eps; /* epsilon rounding precision */
COMPLEX *res; /* c rounded to nearest epsilon */
long rnd = 24L; /* a common rounding mode */
bool ok_to_free; /* true ==> free c, false ==> do not free c */
...
res = cmappr(c, eps, ok_to_free);
The complex trigonometric functions tan, cot, sec, csc were implemented
in func.c as calls to complex sin and complex cos. We added the
direct calls to comfunc.c so that users of libcalc may
call them directly:
E_FUNC COMPLEX *c_tan(COMPLEX *c, NUMBER *eps);
E_FUNC COMPLEX *c_cot(COMPLEX *c, NUMBER *eps);
E_FUNC COMPLEX *c_sec(COMPLEX *c, NUMBER *eps);
E_FUNC COMPLEX *c_cot(COMPLEX *c, NUMBER *eps);
Improved help files for sin, cos, tan, cot, sec, csc. In case
of tan, cot, sec, csc corrected help file was corrected to
indicate that complex arguments are allowed. This was a help
file oversight from long ago when those trigonometric functions
Expanded the calc regression test suite test 34dd to test various
real and complex values for sin, cos, tan, cot, sec, csc.
Fixed more documentation and code comments that referred to the old
additive 55 (a55) shuffle pseudo-random number generator. We have
been using the subtractive 100 shuffle pseudo-random number generator
in place of the additive 55 generator for a while now.
Updated the cal/README to reflect the new names
of the calc regression test suite files.
Updated cal/Makefile to remove, when installing,
old names for calc regression test suite files.
Added missing getpgid_tmp to .gitignore.
To make the meaning a bit more clear in cal/regress.cal, we have
renamed the following test calc resource files that are related to
the calc regression test suite:
cal/test1700.cal -> cal/test8000.read.cal
cal/test2300.cal -> cal/test2300.obj_incdec.cal
cal/test2600.cal -> cal/test2600.numfunc.cal
cal/test2700.cal -> cal/test2700.isqrt.cal
cal/test3100.cal -> cal/test3100.matobj.cal
cal/test3400.cal -> cal/test3400.trig.cal
cal/test4000.cal -> cal/test4000.ptest.cal
cal/test4100.cal -> cal/test4100.redc.cal
cal/test4600.cal -> cal/test4600.fileop.cal
cal/test5100.cal -> cal/test5100.newdecl.cal
cal/test5200.cal -> cal/test5200.globstat.cal
cal/test8400.cal -> cal/test8400.quit.cal
cal/test8500.cal -> cal/test8500.divmod.cal
cal/test8600.cal -> cal/test8600.maxargs.cal
cal/set8700.cal -> cal/test8700.dotest.cal
cal/test8900.cal -> cal/test8900.special.cal
cal/test9300.cal -> cal/test9300.frem.cal
Added to test 94dd, read of a number of new calc resource files
that are not already read as a result of the calc regression test suite.
Improve comments about use of the ${CALC_ENV} Makefile variable.
Noted in Makefile.cal where and how the ${CALC_ENV} is used.
Use ${CALC_ENV} Makefile variable were needed.
Modified regression test cal/regress.cal: in some cases test numbers
were adjusted. Add comments indicate which test numbers apply to
which code. Indicated where there is room for new tests.
Expanded the end of test numbers from 9999 to 99999.
Fixed how the historical trigonometric functions call
the underlying trigonometric functions. This fixes a
number of issues where the function for values of 0.
Updated cal/regress.cal to test historical trigonometric functions
at the 0 value.
Improved trig help files.
Added new vercos(x, [,eps]) for versed cosine and covercos(x, [,eps])
for inverse versed cosine.
Added new avercos(x, [,eps]) for inverse versed cosine and acovercos(x, [,eps])
for inverse coversed cosine.
In cases where the real value to the inverse versed sine and the
inverse coversed sine function produces a complex value, the
conversion from real to complex was incorrect.
Added c_to_q(COMPLEX *c, bool cfree) to make is easier to convert
a COMPLEX value that is real (imag part is 0) into a NUMBER and
optionally free the COMPLEX value.
The func.c code now uses c_to_q().
NOTE: There is a XXX bug marked in the f_aversin() and f_acoversin()
that still needs to be fixed.
Added new aversin(x, [,eps]) for inverse versed sine and acoversin(x, [,eps])
for inverse coversed sine.
Improved trig function help files to reference use of complex arguments
that while supported were not documented.
Removed old Makefile testing rules for make dbx and make gdb.
Improved "make run" to execute calccalc using shared libraries
from the local directory, and with reading of the startup scripts
disabled.
Changed "make prep" to perform various tests that are used to
help verify that calc is ready for a release.
Added Makefile testing rule testfuncsort to check for the sort
of the builtin function list. Changed the order that builtin
functions are listed by "show builtin" and the help/builtin to
match the sorting of "LANG=C LC_ALL=C sort -d -u".
Moved versin() and coversin() to bottom of functions in func.c
(however the builtin function list remains sorted).
Created a historical trig functions section for cmath.h and qmath.h.
Moved cal/test3500.cal to cal/test9300.cal to make room
for future trip tests going from test 3427 thru 3599.
Add new logn(x, n [,eps]) builtin to compute logarithms to base n.
Verify that eps arguments (error tolerance arguments that override
the default epsilon value) to builtin functions have proper values.
Previously the eps argument had little to no value checks for
many builtin functions.
Document in help files for builtin functions that take eps arguments,
the LIMIT range for such eps values.