TCalc - The GNU/Linux terminal calculator

The terminal calculator is a small and helpful program to help users of the GNU/Linux terminal do calculations simply and quickly. The formula to be calculated can be fed to tcalc through the command line. Alternatively, tcalc can be run with no formula and then the free mode is started, in which the calculator will wait for user input, do the necessary calculations and print out the result, and the cycle will repeat until the user enters 'q' or 'quit'.

The calculator works with the decimal, hexadecimal, octal, and binary number systems. It automatically identifies hex numbers if entered with a preceding "0x" or "0X", octal by preceding the number with a zero, binaries by preceding the number with 'b' and decimals by absence of all of the above. Alternatively, the user can indicate the type of input by setting the 'format' argument (See below).

Math functions defined are (dependent on underlying GNU LibC):
acos(x)Arc cosine of X
asin(x)Arc sine of X
atan(x) Arc tangent of X
atan2(y, x)Arc tengent of Y/X
cos(x)Cosine of X
sin(x)
Sine of X
tan(x)Tangent of X
cosh(x)Hyperbolic cosine of X
sinh(x)
Hyperbolic sine of X
tanh(x)
Hyperbolic tangent of X 
acosh(x)
Hyperbolic arc cosine of X 
asinh(x)Hyperbolic arc sine of X
atanh(x)
Hyperbolic arc tangent of X 
exp(x)Exponential function of X
log(x)
Natural logarithm of X
log10(x)
Base-ten logarithm of X
pow(x, y)
X to the power Y
sqrt(x)
Square root of X
cbrt(x)
Cube root of X
ceil(x)
Smallest integral value not less than X
floor(x)Largest integer not greater than X
fabs(x)
Absolute value of X
round(x)
Round X to nearest integral value, rounding halfway cases away from zero
trunc(x)
Round X to the integral value in floating-point format nearest but not larger in magnitude

These functions can be called within a formula. to have a printout of the above list, use the "-m" or "--math" flags (see 'info tcalc' or 'man tcalc').

The source tarballs and the package RPM can be downloaded from below. If you are using Fedora, you can install the package through yum.

For comments, enhancements or suggestions, contact me at [mohammed_isam1984@yahoo.com].

ċ
tcalc-1.5-1.fc21.x86_64.rpm
(52k)
Mohammed Abdel-magid,
Nov 7, 2015, 9:15 AM
ċ
tcalc-1.5.tar.gz
(382k)
Mohammed Abdel-magid,
Oct 17, 2015, 1:42 PM
ċ
tcalc-2.0.tar.gz
(386k)
Mohammed Abdel-magid,
Nov 30, 2015, 10:16 AM
Comments