A simple floating-point command line calculator
Input to the calculator can be entered as command line arguments. If no arguments are entered, the calculator will enter a repl mode.
2 + 2
4
(1 + sqrt3)/2
1.3660254037844386
sin(90 degrees)
1
pi^2/6
1.6449340668482264
(3.5*10^-4)(6.2*10^2)
0.217
+
(addition)-
(subtraction)-
(negative)*
(multiplication)/
(division)^
(exponentiation)
pi
=3.141592653589793
e
=2.718281828459045
degrees
ordeg
=pi/180
ln
sin
,cos
,tan
asin
,acos
,atan
sqrt
,cbrt