A high precision scientific calculator with full support for physical units.
-
Evaluate mathematical expressions:
1920/16*9 2^32 sqrt(1.4^2 + 1.5^2) * cos(pi/3)^2-
Operators: addition (
+), subtraction (-), multiplication (*,·,×), division (/,÷,per), exponentiation (^,**). Full list: see Reference below. -
Mathematical functions:
acos,acosh,asin,asinh,atan,atanh,ceil,cos,cosh,exp,floor,fromCelsius,fromFahrenheit,gamma,ln,log,log10,round,sin,sinh,sqrt,tan,tanh,toCelsius,toFahrenheit. -
High-precision numeric type with 30 significant digits that can handle very large (or small) exponents like 10^(10^10).
-
Exponential notation:
6.022e23.
-
-
Physical units: parsing and handling, including metric prefixes:
2 min + 30 s 40 kg * 9.8 m/s^2 * 150 cm sin(30°)-
Supported units: see Reference section below.
-
Implicit conversions:
15 km/h * 30 minevaluates to7.5 km. -
Useful error messages:
> 2 watts + 4 newton meter Unification error: Cannot convert unit N·m (base units: kg·m²·s⁻²) to unit W (base units: kg·m²·s⁻³)
-
-
Explicit unit conversions: the
->conversion operator (aliases:→,➞,to):60 mph -> m/s 500 km/day -> km/h 1 mrad -> degree 52 weeks -> days 5 in + 2 ft -> cm atan(30 cm / 2 m) -> degree 6 Mbit/s * 1.5 h -> GB -
Variable assignments:
Example: mass of the earth
r = 6000km vol = 4/3 * pi * r^3 density = 5 g/cm^3 vol * density -> kgExample: oscillation period of a pendulum
len = 20 cm 2pi*sqrt(len/g0) -> ms-
Predefined constants (type
listto see them all): speed of light (c), Planck's constant (h_bar), electron mass (electronMass), elementary charge (elementaryCharge), magnetic constant (µ0), electric constant (eps0), Bohr magneton (µ_B), Avogadro's constant (N_A), Boltzmann constant (k_B), gravitational acceleration (g0), ... -
Last result: you can use
ans(answer) to refer to the result of the last calculation.
-
-
Unicode support:
λ = 2 × 300 µm ν = c/λ → GHz -
And more: tab completion, command history (arrow keys,
Ctrl+R), pretty printing, syntax highlighting, ...
-
Operators (ordered by precedence: high to low)
Operator Syntax factorial !square, cube, ... ²,³,⁻¹, ...exponentiation ^,**multiplication (implicit) whitespace modulo %division /,÷,permultiplication (explicit) *,·,×subtraction -addition +unit conversion ->,→,➞,toassignment =Note that implicit multiplication has a higher precedence than division, i.e.
50 cm / 2 mwill be parsed as50 cm / (2 m). -
Commands
Command Syntax help text help,?list of variables list,ls,llreset environment resetclear screen clear,clsquit (CLI) quit,exit -
Supported units (remember that you can use tab completion).
All SI-accepted units support metric prefixes. In addition, binary prefixes (
MiB,GiB, ...) are also supported.Unit Syntax Ampere amperes,ampere,AÅngström angstrom,ÅAstronomical unit AUAtmosphere atmBar barBarn barnBecquerel becquerel,BqBel belBits per second bpsBit bits,bitBritish thermal unit BTUByte Bytes,bytes,Byte,byte,B,Octets,octets,Octet,octetCalorie calories,calorie,calCandela candela,cdCoulomb coulomb,CCup cups,cupDay days,day,dDegree degrees,degree,deg,°Electronvolt electronvolt,eVFarad farad,FFortnight fortnights,fortnightFluid ounce fluidounces,fluidounce,flozFurlong furlongs,furlongFoot feet,foot,ftGallon gallons,gallon,galGauss gaussGram grams,gram,grammes,gramme,gGray gray,GyHectare hectare,haHenry henry,HHertz hertz,HzHogshead hogsheads,hogsheadHour hours,hour,hInch inches,inch,inJoule joules,joule,JKatal katal,katKelvin kelvin,KLight-year lightyears,lightyear,lyLiter liters,liter,litres,litre,L,lLumen lumen,lmLux lux,lxMeter meters,meter,metres,metre,mMiles per hour mphMile miles,mileMillimeter of mercury mmHgMinute minutes,minute,minMole mole,molMonth months,monthNewton newton,NOhm ohms,ohm,ΩOunce ounces,ounce,ozParsec parsecs,parsec,pcPascal pascal,PaPint pints,pintPound pounds,pound,lbPsi psiRPM RPM,rpmRadian radians,radian,radRod rods,rodSecond seconds,second,sec,sSiemens siemens,SSievert sievert,SvTablespoon tablespoons,tablespoon,tbspTeaspoon teaspoons,teaspoon,tspTesla tesla,TTonne tonnes,tonne,tons,ton,tVolt volts,volt,VWatt watts,watt,WWatt-hour WhWeber weber,WbWeek weeks,weekYard yards,yard,ydYear years,year
In addition to the web interface, there is also a command line version which can by installed via npm:
npm install -g insect
For Arch Linux, there is a package on AUR:
yaourt -S insect
For Fedora, there is a copr repository:
sudo dnf copr enable fnux/insect
sudo dnf install insect
For macOS, there is a Homebrew package:
brew install insect
Insect is written in PureScript (see Getting Started guide). You can install all dependencies and build the whole project by running:
bower install
npm install
pulp -w browserify --skip-entry-point -m Insect --standalone Insect -O -t insect.js
Insect comes with a comprehensive set of unit tests. You can run them by calling
pulp test
