cicalc is an interactive calculator written in C. It can handle decimals due to it using double.
Run cc -o nob nob.c, then run ./nob build to build it. This will generate a cicalc executable.
After following the steps in the above section, run ./nob install-sys as root to install system-wide or ./nob install-user to install as the user. You can view full usage of the build system by running ./nob with no arguments
Note: If you install it as the user, you need to add $HOME/.local/share/man to your MANPATH.
The syntax is OPERATOR [NUMBERS...]. However, you could use pi instead of directly using a number to use pi.
You can use the following operators.
Add the numbers following this operator.
Substract the numbers following this operator.
Multiply the numbers following this operator.
Divide the numbers following this operator
Calculate the Nth root of the number following this operator. For example, nrt 4 2 to get the square root of 4, where 2 is N.
Limitation: May not work with negative index if base is negative too
Same as nrt, but it calculates the exponentiation of the number. For example, pow 2 2 to get 2 to the power of 2.
Will quit cicalc.
Run cicalc --help to view usage
Just pipe a command into cicalc. A script file can also be provided as an argument.
Unlike bc, cicalc is a much simpler codebase and does not include a whole scripting language.