Skip to content

Releases: lcn2/calc

calc 2.12.7.5 release

03 Feb 11:57
Compare
Choose a tag to compare
calc 2.12.7.5 release Pre-release
Pre-release

The following are the changes in this release:

Requiring calc shell scripts to use -s -f at the end of the
initial #! line.

Fixed /tmp/mersenne example in calc(1) man page.

Added make variable ${ARCH_CFLAGS}.  The ${ARCH_CFLAGS} is
added after ${CCMISC} and before ${EXTRA_CFLAGS} when building
the ${CFLAGS} for compiling C code.  are ${CC} when compiling
C files.  The default value is:

ARCH_CFLAGS= -march=native

which directs C compiler to compile for the native machine.
To disable use of '-march=native', set ARCH_CFLAGS to the empty
string as in:

make all ARCH_CFLAGS=

To make calc RPMs more portable, they are compiled with an
empty ARCH_CFLAGS.

Fixed issues relating to compiling on macOS.  Fixed issues
where <unistd.h> is needed.

Fixed typos in help/intro and README.md. <<GitHub guilhermgonzaga>>

Copied missing description lines from help/intro to README.md
"What is calc?" section.  <<GitHub guilhermgonzaga>>

GCC 7 added a warning on fall throughs in case statements.  It's
enabled by -Wextra and treated as an error due to -Wall so it
breaks compilation.  See -Wimplicit-fallthrough in the GCC
manual.  The default value is 3, which means a comment matching
some specific regexes is enough to disable the warning.
Fixed spaces vs tabs and use FALLTHRU as it's used elsewhere.
Fixed one FALLTHRU comment that was inconsistent with others.
<<thanks jcul>>

Fixed minor typo on help/power. <<GitHub thegithubr>>

By default, the calc history file is located in ~/.calc_history.
Now, if the environment variable $CALCHISTFILE is defined
and is non-empty, then calc history file will be defined
by the $CALCHISTFILE environment variable.

Calc as defined 0^0 as 1.  However in the past, 0 raised to
an expression that evaluated to zero returned 1.  The result
was that 0^0 was different than 0^(6-6) or even 0^(0).
Now, calc will return 1 for 0^(0) and 0^zero when zero == 0.

calc 2.12.7.2 release

28 Nov 20:43
Compare
Choose a tag to compare

The following are the changes in this release:

 Fixed a segfault when getpwuid() returned NULL during initialization.
 Thanks goes to baratharon GitHub user for reporting this issue.

calc 2.12.7.1 release

05 Nov 16:12
Compare
Choose a tag to compare
calc 2.12.7.1 release Pre-release
Pre-release

The following are the changes in this release:

Corrected CHANGES notes that were mixed up for TAB, VT, CR &
NL.  The code in 2.12.7.0 is correct.  The CHANGE notes should
have read:

The following is a partial list of escape sequences recognized
in strings and in printf formats:

\a	audible bell	byte 0x07 in ASCII encoding
\b	backspace	byte 0x08 in ASCII encoding
\f	form feed	byte 0x0c in ASCII encoding
\n	newline		byte 0x0a in ASCII encoding
\r	return		byte 0x0d in ASCII encoding
\t	tab		byte 0x09 in ASCII encoding
\v	vertical tab	byte 0x0b in ASCII encoding

Sorry!

calc 2.12.7.0 release

05 Nov 02:02
Compare
Choose a tag to compare
calc 2.12.7.0 release Pre-release
Pre-release

The following are the changes in this release:

Added a patch to replaces the manual search for include files
in $(INCDIR) in the have_*.h targets with compiler invocations.
Thanks goes to Helmut Grohne (helmut at subdivi dot de) who
implemented the patch and posted it to the Debian bug tracker
and Martin Buck (m at rtin-buck dor de) for forwarding it to us.

The check_include make rule was fixed to not assume /usr/include.

The qprintnum() function now takes outdigits as a 3rd argument.
Most of the time, this 3rd argument is just conf->outdigits.
But when it comes to the experimental '%g', this value can
change.  This avoids having to modify conf->outdigits.

Fixed a problem where gcc complains about E_FUNC not being defined
for Linux systems as reported by Martin Buck (m at rtin-buck dor de).

Updated the help files help/config, help/display, help/epsilon,
help/fprint, help/printf, and help/strprintf to give more
examples of how display digits and epsilon precision interact
with displaying values.

Added more information about %g in the help file help/printf.

The '\a' is now recognized in a printf format string as the
single byte audible bell character (byte 0x07 in ASCII encoding).

The following is a partial list of escape sequences recognized
in strings and in printf formats:

\a	audible bell	byte 0x07 in ASCII encoding
\b	backspace	byte 0x08 in ASCII encoding
\f	form feed	byte 0x0c in ASCII encoding
\n	newline		byte 0x0b in ASCII encoding
\r	return		byte 0x0a in ASCII encoding
\t	tab		byte 0x0d in ASCII encoding
\v	vertical tab	byte 0x09 in ASCII encoding

calc 2.12.6.10 release

20 Oct 02:48
Compare
Choose a tag to compare
Pre-release

The following are the changes in this release:

Added a patch to replaces the manual search for include files
in $(INCDIR) in the have_*.h targets with compiler invocations.
Thanks goes to Helmut Grohne <helmut at subdivi dot de> who
implemented the patch and posted it to the Debian bug tracker
and Martin Buck (m at rtin-buck dor de) for forwarding it to us.

The check_include make rule was fixed to not assume /usr/include.

The qprintnum() function now takes outdigits as a 3rd argument.
Most of the time, this 3rd argument is just conf->outdigits.
But when it comes to the experimental '%g', this value can
change.  This avoids having to modify conf->outdigits.

calc 2.12.6.9 release

16 Oct 02:45
Compare
Choose a tag to compare
calc 2.12.6.9 release Pre-release
Pre-release

The following are the changes in this release:

Fixed a number of core dump bugs related to the calculation of
tan(), cot(), sec(), csc(), tanh(), coth(), sech(), and csch(),
asin(), acos(), asinh(), acosh(), where when a call to an
underlying function produced an invalid value.  Thanks goes to
github user wuxiuheng for reporting this problem.

A number of trigonometric and hyperbolic functions that incorrectly
returned E_LOGINF, now return a new error code that is more
specific to the trigonometric or hyperbolic function.  The
following is a list of these new error codes: E_TAN3 E_TAN4
E_COT3 E_COT4 E_SEC3 E_CSC3 E_TANH3 E_TANH4 E_COTH3 E_COTH4
E_SECH3 E_CSCH3 E_ASIN3 E_ACOS3 E_ASINH3 E_ACOSH3 E_ATAN3 E_ACOT3
E_ASEC3 E_ACSC3 E_ATANH3 E_ACOTH3 E_ASECH3 E_ACSCH3.

Added regression tests 3729 thru 3732 to test E_TAN3, E_COT3,
E_SEC3 and E_CSC3 respectively.

Added experimential %g printf (and strprintf) format implementation
based on pull request from github user 10110111.

Made exterimental changes to macOS builds to not require use of
/usr/include.  The INCDIR for macOS uses:

INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include

to determine the upper path of the /usr/include directory for macOS.
The Darwin target seems to not automatically detected.  For now,
under macOS, declare the target as darwin:

# for macOS users only, force the target to be darwin
#
make target=Darwin clobber
make target=Darwin all
make target=Darwin chk
make target=Darwin install

calc 2.12.6.8 release

30 Sep 17:33
Compare
Choose a tag to compare
calc 2.12.6.8 release Pre-release
Pre-release

The following are the changes in this release:

For historical purposes, in lucas.cal, gen_v1(1, n) always returns 4.

Fixed some compiler warnings, thanks to a report by Mike
<michael dot d dot ince at gmail dot com>.

Added work around for a gcc warning bug, thanks to a report by Mike
<michael dot d dot ince at gmail dot com>.

Fixed errors in various help files such as:

mat randbit seed srandom types

Removed the MAXSTRING symbol because it was no longer used by calc.

Increased HIST_SIZE (depth of the history stack) from 10k to 32k.

Increased TTYSIZE (reallocation size for terminal buffers) from 100 to 8191.

Increased MAXDEPTH (maximum depth of input stack) from 10 to 255.

Increased interactive input buffer size from 1024 to 256k.  This has the
effect of increasing the maximum length of an input line from a tty.
This helps with an interactive bug that was reported by Ruslan Kabatsayev
(b7 dot 10110111 at gmail dot com).

The calc man page indicates that -d also disables the printing of the
leading tilde.

Added information to "help command" about how to silence messages
while reading calc resource files.

Fixed an error message buffer overflow thanks to a report by
Frank Peters <nlp at northernlightsphoto dot biz>.

Replaced all use of the C funcion sprintf() with snprintf().
Replaced all use of the C funcion vsprintf() with vsnprintf().
Replaced all DONT_HAVE_VSPRINTF with DONT_HAVE_VSNPRINTF.
Replaced all Makefile var ${HAVE_VSPRINTF} with ${HAVE_VSNPRINTF}.

calc 2.12.6.7 release

04 Mar 19:26
Compare
Choose a tag to compare
calc 2.12.6.7 release Pre-release
Pre-release

The following are the changes in this release:

Fixed errors in various help files such as:

    mat randbit seed srandom types

Removed the MAXSTRING symbol because it was no longer used by calc.

Increased HIST_SIZE (depth of the history stack) from 10k to 32k.

Increased TTYSIZE (reallocation size for terminal buffers) from 100 to 8191.

Increased MAXDEPTH (maximum depth of input stack) from 10 to 255.

Increased interactive input buffer size from 1024 to 256k.  This has the
effect of increasing the maximum length of an input line from a tty.
This helps with an interactive bug that was reported by Ruslan Kabatsayev
(b7 dot 10110111 at gmail dot com).

calc 2.12.6.6 release

28 Feb 00:24
Compare
Choose a tag to compare
calc 2.12.6.6 release Pre-release
Pre-release

The following are the changes in this release:

For historical purposes, in lucas.cal, gen_v1(1, n) always returns 4.

Fixed some compiler warnings, thanks to a report by Mike
<michael dot d dot ince at gmail dot com>.

Added work around for a gcc warning bug, thanks to a report by Mike
<michael dot d dot ince at gmail dot com>.

calc 2.12.6.5 release

29 Jan 03:05
Compare
Choose a tag to compare

The following are the changes in this release:

Fixed warning about undefined operations involving the qlink(q)
macro by replacing that macro with an inline-function.  Thanks goes
to David Haller <dnh at opensuse dot org> for this fix.

NOTE for Windows 10 users: Pavel Nemec <pane at seznam dot cz>
reported that calc version 2.12.6.4 has been successfully
compiled, installed and running on Windows 10.  See README.WINDOWS
for more details.

Improved gen_v1(h,n) in lucas.cal to use an even faster search method.

Improved are checking in lucas.cal.  In particular both h and n must be
integers >= 1.  In the case of both rodseth_xhn(x, h, n) and gen_v1(h, n)
h must be odd.

Fixed an C code indenting issue that was reported by Thomas Walter
<th dot walter42 at gmx dot de> in zfunc.c.

Fixed a man page warning about ./myfile where the leading dot
was mistook for an nroff macro.  Thanks goes to David Haller
<dnh at opensuse dot org> for providing the patch.

Improved gen_v1(h,n) in lucas.cal for cases where h is not a
multiple of 3. Optimized the search for v(1) when h is a
multiple of 3.

Fixed a Makefile problem, reported by Doug Hays <doughays6 at gmail
dot com>, where if a macOS user set BINDIR, LIBDIR, CALC_SHAREDIR
or INCDIR in the top section, their values will be overwritten by
the Darwin specific section.