CONCALC(1)

๐Ÿ“ฆ
version 0.9.3 ยท 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– CONCALC โ€” console calculator ๐Ÿ’–

okay bestie, gather round, because this is the manual page for concalc, the little console calculator that lives in your terminal and does so much more than you'd expect. it's part of the User Commands crew, and it is, genuinely, iconic. ๐Ÿงฎโœจ


โœจ NAME โœจ

concalc โ€” console calculator ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

concalc [options] "expression"

concalc -m script "path"

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so basically, concalc takes the input term you give it, does the math, and hands you back the result as text. simple. slay.

but listen: quote your expression, because otherwise the shell interpretor is gonna have problems with it. ๐Ÿ’€ fr, protect your expression.

and if you hand concalc more than one expression? it doesn't get confused, it just puts all of them together. teamwork, periodt. ๐Ÿ’…


๐Ÿ”ฅ CALCULATION SYNTAX ๐Ÿ”ฅ

standard calculations

2*(3+4/9)^3

standard operations

+ - * / ^ % sin cos tan asin acos atan sinh cosh tanh asinh acosh
atanh ln log & | ! && || ~ >> << x rnd sqrt curt root integ d/dx

square root and cubic root

sqrt12 curt8

trigonometric functions and logarithms

sin3.64+ln5

other roots

fourth root of nine:

4root9

differential calculation

differential calculation of 2x^2-3x+3 at x=9:

d/dx(2x^2-3x+3,9)

integration

integration of sinx+cosx between -1 and 3.2:

integ(sinx+cosx,-1,3.2)

set variables

save the result of a calculation in variable A:

12*45/2->A

recall variables

multiply the saved value with 2:

A*2

use last result

the last result is saved in the answer memory:

ans+1

โญ CONSTANTS โญ

  • e โ€” euler constant
  • pi โ€” pi; example: sin(pi/2)

๐Ÿ’œ NUMBERS ๐Ÿ’œ

standard

12.34

with exponent

12.23e-5

complex

12i-5

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -o, --output [output length] โ€” the argument is a number between 2 and the maximal possible output length (normally 18). like, don't be greedy, bestie.
  • -m, --mode [calculator mode] โ€” the mode can be std (default, normal scientific calculatons), base (for logic functions and base-n calculatons) or script (for executing scripts). in scripting mode, the last argument must be the path to the script file. pick your era. ๐ŸŽ€
  • -c, --complex โ€” this option enables complex numbers for the calculation. they are switched off by default, so you gotta opt in.
  • -b, --base [calculator base] โ€” the argument must be one of hex (hexadecimal), dec (decimal, default), oct (octal) and bin (binary). this option can only be used when -m base is set. ๐Ÿ‘€
  • -a, --angle [angle type] โ€” the argument must be one of deg (degrees), rad (radiant), gra (grade).
  • -v, --version โ€” output the version of Concalc. iykyk.
  • -h, --help โ€” outputs a short help. your little cheat sheet. ๐Ÿ’–

๐ŸŒˆ SCRIPTING ๐ŸŒˆ

the script interpreter of calc uses a C-like programming syntax. the following command are supported. yes, we're coding now, main character energy activated. โœจ

if expression

if(condition)

  command for condition true;

else command for condition false;

while loop

while(condition)

  command that is run while condition is true;

for loop

for(initialisation; condition; count-command)
  command that is run while condition is true;
print( output to print out );

getline command

getline; // read a text line from stdin and returns this text

getkey command

getkey; // return the key pressed by the user
        // blocks until the user presses any key

keystate command

keystate; // returns the key pressed by the user or 0 if no key was pressed
          // nonblocking

sleep command

sleep( time in microseconds ); //Script is stops for the given time

compare operators

  • ==, != โ€” equal, unequal
  • >=, <=, >, < โ€” greather or equal, less or equal, greather, less

set operators

  • -> โ€” calculator set operator
  • = โ€” C-like set operator

type converting

  • (float) โ€” floating point value
  • (int) โ€” integer value
  • (string) โ€” text value
  • (bool) โ€” boolean value

๐Ÿ™ˆ BUGS ๐Ÿ™ˆ

No bugs known! ๐Ÿ˜‡

If you find one, please report it by e-mail to the author.

not me manifesting a bug-free life. but fr, if you catch one, email the author, don't just vibe with it. ๐Ÿ’Œ

๐Ÿซถ AUTHOR ๐Ÿซถ

Rainer Strobel <rainer1223@users.sourceforge.net>


๐ŸŒŸ SEE ALSO ๐ŸŒŸ

http://extcalc-linux.sourceforge.net


and that's the whole page, bestie! ๐Ÿ’… this was the Linux version, dated APRIL 2007 โ€” yeah, vintage, but the math still eats. go calculate something cute. ๐Ÿ“๐Ÿงš๐Ÿ’–

๐Ÿ“ฆ where this page comes from