**Shell Calculator** is a powerful scientific calculator.
It can evaluate wide range of mathematical expressions, supports variable assignment loading external javascript resources
and custom calculators.
For instance try entering the following:

*a=3*
*c=sqrt(25+a*a)*
(press Enter or click Compute button after each expression)

## Examples

- How much would $1000 would turn into after 30 years if APY is 10%? Solve.
- What is the sum of all natural numbers less or equal to 100. Solve.
- What is the chance of getting heads 10 times in a row in a cointoss? Solve.

## Documentation

__History__: use arrow up and arrow down to navigate command history.

__Syntax__: put function arguments in parentheses:

sin(x) - correct,

sin x - incorrect;
do not omit multiplication:

x*sin(x) - correct,

x sin(x) - incorrect;
use

**e** for numbers in scientific notation:

**2e3** = 2000;

**log** - natural logarithm,
to express decimal logarithm use

**log(x)/log(10)**.

__Constants__:

**e** (Base of the natural logarithm: 2.71828...),

**pi** (π: 3.14159...),

**Infinity** (Positive infinity),

**-Infinity** (Negative infinity).

__Arithmetic operators__:

**+** (Addition),

**-** (Subtraction),

***** (Multiplication),

**/** (Division),

**%** (Modulus).

__Comparison operator__:

**==** (equal),

**!=** (not equal),

**<** (less than),

**>** (greater than),

**<=** (less than or equal),

**>=** (greater than or equal),

**===** (equal in both value and type),

**!==** (not equal in either value or type).

__Logical operator__:

**&&** (and),

**||** (or),

**!** (not).

__Bitwise operators__:

**&** (and),

**|** (or),

**~** (not),

**^** (xor),

**<<** (left shift),

**>>** (Sign-propagating right shift),

**>>>** (Zero-fill right shift).

__Assignment operators__:

**=**,

**+=**,

**-=**,

***=**,

**/=**,

**%=**,

**<<=**,

**>>=**,

**>>>=**,

**&=**,

**^=**,

**|=**.

__Ternary conditional operator__: <condition>

**?** <value if true>

**:** <value if false>

__Functions__:

**sqrt** (Square root),

**exp** (Exponent),

**pow** (Power),

**log** (Natural logarithm),

**erf** (Error function),

**abs** (Absolute value),

**sign** (Sign function).

__Trigonometric functions__:

**sin** (Sine),

**cos** (Cosine),

**sec** (Secant),

**csc** (Cosecant),

**tan** (Tangent),

**cot** (Cotangent),

**asin** (Arcsine),

**acos** (Arccosine),

**asec** (Arcsecant),

**acsc** (Arccosecant),

**atan** (Arctangent),

**acot** (Arccotangent);

**rad** (Converts from degrees to radians),

**deg** (Converts from radians to degrees).

__Hyperbolic functions__:

**sinh**
**cosh**
**sech**
**csch**
**tanh**
**coth**
**asinh**
**acosh**
**asech**
**acsch**
**atanh**
**acoth**.

__Rounding functions__:

**floor** (returns largest integer smaller or equal to the number),

**ceil** (returns smallest integer greater or equal to the number),

**round** (returns nearest integer).

__Random functions__:

**random** (returns float between in [0, 1) interval),

**rand(min, max)** (returns integer in [min, max) interval).

__Statistical functions__ (operate on arrays):

**max** (maximum element),

**min** (minimum element),

**sum** (sum of elements),

**mean** (arithmetic mean),

**geometric_mean** (geometric mean),

**harmonic_mean** (harmonic mean),

**median**,

**range** (returns range = max - min),

**variance**,

**sample_variance**,

**std** (standard deviation),

**sample_std** (sample standard deviation),

**standard_error**,

**cv** (coefficient of variation),

**skewness**,

**sample_skewness**.

__Integraton with external resources__:

**load(URL)** - if resource is a javascript it will be loaded and executed, if resource is an image it will be inserted in the console.

__Advanced usage__: valid javascript expressions are supported. For instance, you can ask for the user input by calling

*prompt* function as demonstrated in

circumference calculator.

## Creating a custom calculator

If you need to compute an expression frequently you can define it as a function and then use direct link to access a custom version of this calculator.
For example to can define hypotenuse of a triangle as follows:

*hyp = function(a, b) { return sqrt(a*a+b*b)}*
Change the title of the calculator:

*title('Hypotenuse calculator')*
and definte custom help string:

*help('<b>Hypotenuse Calculator</b> is a custom shell calculator that allows to compute hypotenuse of a right triangle using function <b>hyp(a, b)</b>. Example: <i>hyp(3, 4)</i>') *
Final result is a

hypotenuse calculator.