When I'm working on a project and I need a quick calcul I usualy use Python. The problem is that it require many step.
- I launch python
- If i need some math function like
log10orexpI need to import themathmodule. - And then I can type my calcul and get the result.
This is to many step for a quick calcul this is why I created tval for Terminal (Math Expression) Evaluation.
To build tval it's easy. There is 2 way of doing it.
./build.shIt will juste generate the tval executable.
sudo make installIt will install tval in your /usr/local/bin folder.
To use tval it's easy !
tval [OPTIONS] "EXPRESSION"There is several options you can have access :
-h,--help: Print the help message-p PRECISION: Set the precision of the result (default : 12)-s: Print the result in the scientific format
tval "2 +5/2"
4.500000000000tval -p 0 "sin(pi)"
-0tval -s -p 2 "2*pi + 230"
2.36e+02pi/pie: 3.141592653589793238462643383279502884197e: 2.7182818284590452353602874713526624977572gr(golden ratio): 1.61803398874989484820458683436563811
log,log10,log2exptanh,sqrtsin,cos,tan,atan
- Expression like
tan(pi/2)should returninfand not the maximum value for along double.
I love working on this project. If you have any suggestion about new fonctionnalities dont hesitate !