calcu
A simple calculator for your CLI.
(It uses Python's eval() and spits out the result, with some prettifying.)
Installation
pip install calcu
Usage
Type c followed by your expression.
Example:
c 2+2
= 4
Refer to the result of the previous calculation with an underscore _:
c _+10
= 14
Do multiplication and exponentiation:
c 2 x 3^2
= 18
# you can also use * and ** but then you must
# wrap your expression in quotes ' ' or bash will mess it up
# eg: c '2*3**2'
And dividing and brackets:
c [2+10]/10
= 1.2
# as above, the square brackets are to stop bash cleverness
# if you want to use regular brackets, use quotes
# eg: c '(2+10)/10
Use any function from Python's math library:
c log[e] x pi
= 3.141592654
It returns the appropriate number of decimal values, up to 9.
Metadata
Release files for calcu 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| calcu-1.0.0.tar.gz | 91.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| calcu-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 96.2 kB
Release files / calcu-1.0.0.tar.gz
| Download URL | calcu-1.0.0.tar.gz |
|---|---|
| Size | 91.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e3d4b90d0eb62bcdfa965966619c35bf7a7a41d99b3608a2e46f14c895f85f4
|
|
BLAKE2b-256 checksum How to use checksums |
a8316148c978bad2a3b62fb33af4a6f588c74c17ed4993859b79ec8bd42bb5d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / calcu-1.0.0-py3-none-any.whl
| Download URL | calcu-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a778f84533291da41b96bd2977da632228311e5eb6ab49290e1d0f2cb5091b59
|
|
BLAKE2b-256 checksum How to use checksums |
c806f225e949d9bc021f118e6aa7c9a8a4c936785d6dcb0b0a795720736e6eeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|