Blacksky Math Calculator

Comprehensive Command Documentation

Table of Contents

Basic Commands

!help / !?
Aliases: ?
Usage: !help [command]
Displays help information about available commands. Without arguments, lists all commands. With a command argument, shows detailed help for that specific command.

Examples:

!help solve !help
!exit / !quit / !q
Usage: !exit
Exits the calculator program.
!clear
Usage: !clear
Clears the terminal screen.
!history / !h
Usage: !history
Displays the command history (last 20 commands).
!vars / !v
Usage: !vars
Shows all currently defined variables and their values.
!del / !d
Usage: !del <variable_name>
Deletes a variable from memory.

Example:

!del x
!save
Usage: !save [filename]
Saves the current session (variables and history) to a JSON file. Default filename is "blacksky_session.json".

Example:

!save my_calculation.json
!load
Usage: !load [filename]
Loads a previously saved session from a JSON file. Default filename is "blacksky_session.json".

Example:

!load my_calculation.json
!menu
Usage: !menu
Displays the calculator mode menu.
!mode
Usage: !mode <mode_name>
Switches between different calculator modes. Available modes: scientific, graphing, matrix, statistical, financial, programming, unit, date, game, chemistry, physics, engineering.

Examples:

!mode financial !mode 5

Mathematical Operations

!solve / !s
Usage: !solve <equation>
Solves equations symbolically.

Examples:

!solve x^2 - 4 = 0 !solve 2*x + 5 = 13
!plot / !p
Usage: !plot <function> [xmin:xmax]
Plots mathematical functions. Optionally specify x-axis range.

Examples:

!plot sin(x) !plot x^2 -2*pi:2*pi

Calculus Commands

!derive / !dx
Usage: !derive <function>
Calculates the derivative of a function.

Examples:

!derive x^2 + 3*x !derive sin(x)
!integrate / !int
Usage: !integrate <function>
Calculates the integral of a function.

Examples:

!integrate x^2 !integrate cos(x)
!limit / !lim
Usage: !limit <function> <point> [direction]
Calculates the limit of a function at a point. Optional direction can be '+' or '-'.

Examples:

!limit sin(x)/x 0 !limit 1/x 0 +
!series
Usage: !series <function> <point> [order]
Calculates series expansion of a function at a point. Optional order parameter (default is 6).

Examples:

!series sin(x) 0 !series exp(x) 1 4
!factor
Usage: !factor <expression>
Factors a polynomial expression.

Examples:

!factor x^2 - 4 !factor x^3 + 3*x^2 + 3*x + 1
!expand
Usage: !expand <expression>
Expands a polynomial expression.

Examples:

!expand (x + 1)^3 !expand (x + y)*(x - y)

Statistical Commands

!stats / !stat
Usage: !stats <data_points>
Calculates basic statistics (mean, median, mode, standard deviation, etc.) for a dataset.

Example:

!stats 5 10 15 20 25
!regress
Usage: !regress <x1,x2,...>;<y1,y2,...>
Performs linear regression on paired data points.

Example:

!regress 1,2,3,4;2,4,5,4
!dist
Usage: !dist <distribution> <params> [x]
Calculates probability distribution values. Available distributions: normal, uniform, binom, poisson, expon, gamma, beta, chi2, t, f, lognorm, weibull.

Example:

!dist normal 0 1 1.5
!hist
Usage: !hist <data_points>
Creates a histogram from the data.

Example:

!hist 5 10 15 20 25 30 35

Matrix Operations

!matrix / !mat
Usage: !matrix <operation> <args>
Perform matrix operations including creation, addition, multiplication, and transposition.

Examples:

!matrix create 2 [[1, 2], [3, 4]] !matrix add matrix1 matrix2 !matrix multiply matrix1 matrix2 !matrix transpose matrix1
!det
Usage: !det <matrix_name>
Calculate the determinant of a matrix.

Example:

!det matrix1
!inv
Usage: !inv <matrix_name>
Calculate the inverse of a matrix.

Example:

!inv matrix1
!eigen
Usage: !eigen <matrix_name>
Calculate eigenvalues and eigenvectors of a matrix.

Example:

!eigen matrix1

Unit Conversion

!convert / !conv
Usage: !convert <value> <from_unit> to <to_unit>
Convert between different units of measurement. Supported categories include length, mass, time, temperature, volume, pressure, energy, power, speed, and angle.

Examples:

!convert 100 cm to m !convert 32 f to c !convert 1 au to km

Number Theory

!prime / !pr
Usage: !prime <operation> <args>
Perform prime number operations including checking, finding next/previous primes, generating prime ranges, and factorization.

Examples:

!prime check 17 !prime next 100 !prime range 1 100 !prime factor 12345
!gcd
Usage: !gcd <num1> <num2> [...]
Calculate greatest common divisor of two or more numbers.

Example:

!gcd 48 18 12
!lcm
Usage: !lcm <num1> <num2> [...]
Calculate least common multiple of two or more numbers.

Example:

!lcm 4 6 8
!factorint
Usage: !factorint <number>
Factor an integer into its prime components.

Example:

!factorint 123456

Financial Calculations

!finance / !fin
Usage: !finance <operation> <args>
Perform financial calculations including future value, present value, payments, interest rates, and more.

Examples:

!finance fv 0.05 10 1000 0 !finance pv 0.05 10 1000 0 !finance pmt 0.05/12 360 100000 0 !finance rate 360 -500 100000 0
!amort / !am
Usage: !amort <principal> <rate> <term> [type]
Generate a loan amortization schedule.

Example:

!amort 100000 0.05 360
!roi
Usage: !roi <gain> <cost>
Calculate return on investment.

Example:

!roi 1500 1000

Date/Time Operations

!date
Usage: !date <operation> <args>
Perform date calculations including date arithmetic, weekday determination, and leap year checks.

Examples:

!date now !date add 2023-01-01 30 !date diff 2023-01-01 2023-12-31 !date weekday 2023-01-01 !date leap 2024
!time
Usage: !time <time> <from_tz> <to_tz>
Convert between timezones.

Example:

!time 12:00:00 UTC EST
!countdown
Usage: !countdown <seconds>
Start a countdown timer.

Example:

!countdown 60

System Commands

!system
Usage: !system
Display system information including Python and library versions.
!bench
Usage: !bench
Run performance benchmarks for math operations.

Programming

!eval
Usage: !eval <python_code>
Evaluate restricted Python code (basic operations only).

Example:

!eval [x**2 for x in range(5)]
!lambda
Usage: !lambda <args>:<expression>
Create a lambda function for later use.

Example:

!lambda x: x**2 + 2*x + 1

Graph Theory

!graph
Usage: !graph <operation> <args>
Perform graph theory operations including graph creation, node/edge addition, and shortest path calculation.

Examples:

!graph create my_graph undirected !graph add_node my_graph A !graph add_edge my_graph A B !graph shortest_path my_graph A D

Game Theory

!game
Usage: !game <operation> <args>
Analyze game theory scenarios including Prisoner's Dilemma and Battle of the Sexes.

Examples:

!game list !game show prisoners_dilemma !game nash prisoners_dilemma

Chemistry

!chem
Usage: !chem <operation> <args>
Perform chemistry calculations including element lookup, molar mass calculation, and equation balancing.

Examples:

!chem element H !chem molar_mass H2O !chem balance H2 + O2 = H2O

Physics

!physics
Usage: !physics <operation> <args>
Perform physics calculations including constant lookup and kinematic equations.

Examples:

!physics constant speed_of_light !physics kinematic d=v0t+0.5at^2 v0=10 t=5 a=9.8

Engineering

!eng
Usage: !eng <operation> <args>
Access engineering tools and formulas for beam deflection, stress-strain, and fluid flow.

Examples:

!eng list !eng formula beam_deflection

Math Puzzles

!puzzle
Usage: !puzzle <operation> <args>
Solve math puzzles and brain teasers with hints and solutions.

Examples:

!puzzle list !puzzle show 1 !puzzle solve 1 232792560

Math Quiz

!quiz
Usage: !quiz [stop]
Start an interactive math quiz with random arithmetic problems.

Examples:

!quiz !quiz stop

Calculator Modes

!menu
Usage: !menu
Show the calculator mode menu with all available modes.
!mode
Usage: !mode <mode_name>
Switch between different calculator modes. Available modes:
  • scientific (1)
  • graphing (2)
  • matrix (3)
  • statistical (4)
  • financial (5)
  • programming (6)
  • unit (7)
  • date (8)
  • game (9)
  • chemistry (10)
  • physics (11)
  • engineering (12)
  • main (13)

Examples:

!mode financial !mode 5