We made a calculator in python with PyQt5 and Pyinstaller, but the result was a bit over 160MB. I wanted to make something more lightweight.
I will add better UI eventually. Meanwhile enjoy this console version, and this bad UI :) Oh, and it's not tested at all. I'd gladly appreciate you telling me if you find an error.
make
./eval '2 + 3'
- binary addition (
+
), subtraction (-
), multiplication (*
) and division (/
) - unary negation (
-
) and no op (+
) for some reason - power (
^
), roots (either (โ
or#
because inner handling)) - unary factorial (
!
) (actually a gamma function, because of floats) - nesting parentheses
{[()]}
- decimal numbers (
1.2
or even.4
) - complex numbers (
1 - 2i
) - symbols (
pi
,e
,i
(imaginary number)) - functions, although only
sqrt
andabs
have been implemented so farabs
sqrt
,power
,root
sin
,cos
,tan
asin
,acos
,atan
rand
(0..1
)crand
(random normalized complex number)
- gtk3 (only for the UI program)