Skip to main content

A advanced calculator for complicated mathematics.

Project description

Brliant Calculator

A powerful, advanced command-line scientific calculator for engineers, scientists, and developers.

Features

  • Basic Arithmetic: Addition, subtraction, multiplication, division, modulo.
  • Advanced Math: Trigonometry, logarithms, exponentials, factorials, powers.
  • Vector Operations: Dot product, cross product, magnitude, normalization, angle between vectors.
  • Physics Formulas: Force, kinetic energy, potential energy, Ohm's law, work, speed, acceleration.
  • Unit Conversions: Length, mass, temperature, time, speed.
  • Currency Conversion: Real-time currency exchange rates.
  • Matrix Operations: Multiplication, determinant, inverse, eigenvalues/eigenvectors, transpose, rank.
  • Complex Numbers: Arithmetic, polar/rectangular conversion, magnitude, phase.
  • Symbolic Math: Algebraic simplification, differentiation, integration, equation solving.
  • Graphing: 2D function plotting using Matplotlib.
  • Dimensional Analysis: Unit-aware calculations and conversions.
  • Arbitrary Precision: Exact rational arithmetic and high-precision decimal calculations.
  • Interactive Shell: A dedicated shell mode for continuous calculations.

Installation

pip install brliant_calc

Custom Command Aliases

Create custom shortcuts for the calculator command (permanently installed, no PATH modification needed):

brliant_calc -changeCall bcalc


brliant_calc -listAliases


brliant_calc -removeAlias bcalc

Note: On Windows 11, if you don't have sudo installed, you can enable it in Settings → System → For developers → Enable sudo.

Usage

Run the calculator using python main.py [command] [arguments].

Basic Operations

python main.py basic add 10 5
python main.py basic mul 2 3 4

Advanced Math

python main.py adv sin 1.57
python main.py adv log10 100

Matrix Operations

python main.py matrix mul "[[1,2],[3,4]]" --m2 "[[5,6],[7,8]]"
python main.py matrix det "[[1,2],[3,4]]"
python main.py matrix inv "[[1,2],[3,4]]"

Complex Numbers

python main.py complex add "1+2j" --c2 "3+4j"
python main.py complex polar "1+1j"

Symbolic Math

python main.py symbolic diff "x**2 + 2*x + 1" --variable "x"
python main.py symbolic integrate "sin(x)"
python main.py symbolic solve "x**2 - 4"

Graphing

python main.py plot plot "sin(x)" --range "0,6.28"

Dimensional Analysis

python main.py dim evaluate_dim "5 * meter + 30 * centimeter"
python main.py dim convert_dim --value 100 --from_unit "km/h" --to_unit "m/s"

Arbitrary Precision

python main.py precise add_fraction "1/3" "1/6"
python main.py precise div_decimal "1" "3" --precision 50

Interactive Shell

Enter the interactive mode to run multiple commands without restarting:

python main.py sel basic

Shortcuts

You can use the following short aliases for commands:

  • basic -> b
  • adv -> a
  • curr -> cr
  • convert -> cv
  • vector -> v
  • physics -> p
  • units -> u
  • matrix -> m
  • complex -> cx
  • symbolic -> s
  • plot -> pl
  • dim -> d
  • precise -> pr
  • sel -> sh

Example: python main.py b add 1 2 is the same as python main.py basic add 1 2.

Tab Completion

This tool supports tab completion for commands and arguments using argcomplete.

  1. Install argcomplete:

    pip install argcomplete
    
  2. Activate completion (depends on your shell):

    Bash:

    eval "$(register-python-argcomplete main.py)"
    

    PowerShell:

    Import-Module argcomplete
    

    (See argcomplete documentation for permanent configuration).

  3. Usage: Type python main.py <TAB> to see available commands.

Contributing

Contributions are welcome! Please submit a pull request or open an issue.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brliant_calc-2.1.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brliant_calc-2.1.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file brliant_calc-2.1.1.tar.gz.

File metadata

  • Download URL: brliant_calc-2.1.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for brliant_calc-2.1.1.tar.gz
Algorithm Hash digest
SHA256 778d61a9daee6dff9177043d2c78d4bb980663281cd3b84566fb4c197d41e11a
MD5 e857db935c2685fe0d042488af3c8320
BLAKE2b-256 18de21553750e10d511e3f95137911f815d9cfb3bfa5bd2ab6efaa5146df95c8

See more details on using hashes here.

File details

Details for the file brliant_calc-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: brliant_calc-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for brliant_calc-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e07d3d6ea741913deba168b57bf3760458b8162ec6601638d8d90143f49a6ae3
MD5 ff441b80235588f8dd6cfa89b5cd378c
BLAKE2b-256 6291cec27697d1fd3eac01df06ddf5e4f359f3096b150180e6320fbbcc094efb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page