Appendix A. Function List

Table of Contents

Algebra
Calculus
Named Integrals
Combinatorics
Complex Numbers
Data Sets
Date & Time
Economics
Microeconomics
Exponents & Logarithms
Geometry
Circle
Cone
Cube
Cylinder
Parallelogram
Prism
Pyramid
Rectangle
Sphere
Square
Trapezoid
Triangle
Logical
Matrices & Vectors
Miscellaneous
Number Theory
Arithmetic
Integers
Number Bases
Polynomials
Prime Numbers
Rounding
Special Functions
Step Functions
Statistics
Correlation
Descriptive Statistics
Distribution
Means
Moments
Random Numbers
Regression
Statistical Tests
Trigonometry
Utilities
Intervals & Uncertainties

Algebra

Find Linear Function

linearfunction(x1, y1, x2, y2)

Finds the linear function for the straight line between two distinct points.

Arguments. 

  • x1: a free value

  • y1: a free value

  • x2: a free value

  • y2: a free value

Product of a sequence

product(Factor expression, Lower limit (i), Upper limit (n)[, Index variable])

Π

Corresponds to the product symbol. Multiplies factors for each x ranging from the lower to the upper limit.

Example: product(x2, 1, 5) = 12 × 22 × 32 × 42 × 52 = 14400

Arguments. 

  • Factor expression: a free value

  • Lower limit (i): an integer

  • Upper limit (n): an integer

  • Index variable: an unknown variable/symbol (optional, default: undefined)

Requirement.  "Upper limit (n)" ≥ "Lower limit (i)"

Solve differential equation

dsolve(Equation[, Initial condition: function value (y)][, Initial condition: argument value (x)])

Solves a differential equation and returns the value of y(x). The derivative in the equation should be in the format diff(y, x). Only first-order differential equations are currently supported.

Example: dsolve(2 × diff(y, x) − y = 4x, 5, 2) = 21e^(x/2) / e − 4x − 8

Arguments. 

  • Equation: a free value

  • Initial condition: function value (y): a free value (optional, default: undefined)

  • Initial condition: argument value (x): a free value (optional, default: 0)

Solve equation

solve(Equation[, With respect to])

Arguments. 

  • Equation: a free value

  • With respect to: an unknown variable/symbol (optional, default: undefined)

Solve for multiple variables

multisolve(Equation vector, Variable vector)

Arguments. 

  • Equation vector: a vector

  • Variable vector: a vector with an unknown variable/symbol, ...

Requirement.  dimension("Equation vector") = dimension("Variable vector")

Solve for two variables

solve2(Equation 1, Equation 2[, Variable 1][, Variable 2])

Solves two equations with two unknown variables. Returns the value of the first variable.

Arguments. 

  • Equation 1: a free value

  • Equation 2: a free value

  • Variable 1: an unknown variable/symbol (optional, default: x)

  • Variable 2: an unknown variable/symbol (optional, default: y)

Solve using Newton's Method

newtonsolve(Equation, Initial estimate[, Variable][, Precision][, Max iterations])

Arguments. 

  • Equation: a free value

  • Initial estimate: a number

  • Variable: an unknown variable/symbol (optional, default: undefined)

  • Precision: an integer ≥ -2147483648 and ≤ 2147483647 (optional, default: -10)

  • Max iterations: an integer ≥ 0 and ≤ 4294967295 (optional, default: 1000)

Solve using Secant Method

secantsolve(Equation, Initial estimate 1, Initial estimate 2[, Variable][, Precision][, Max iterations])

Arguments. 

  • Equation: a free value

  • Initial estimate 1: a number

  • Initial estimate 2: a number

  • Variable: an unknown variable/symbol (optional, default: undefined)

  • Precision: an integer ≥ -2147483648 and ≤ 2147483647 (optional, default: -10)

  • Max iterations: an integer ≥ 0 and ≤ 4294967295 (optional, default: 1000)

Summation

sum(Term expression, Lower limit (i), Upper limit (n)[, Index variable])

Σ

Corresponds to the summation symbol. Adds terms for each x ranging from the lower to the upper limit.

Example: sum(x2, 1, 5) = 12 + 22 + 32 + 42 + 52 = 55

Arguments. 

  • Term expression: a free value

  • Lower limit (i): an integer

  • Upper limit (n): an integer

  • Index variable: an unknown variable/symbol (optional, default: undefined)

Requirement.  "Upper limit (n)" ≥ "Lower limit (i)"

Calculus

Differentiate

diff(Function[, With respect to][, Order][, Variable value])

derivative

Arguments. 

  • Function: a free value

  • With respect to: an unknown variable/symbol (optional, default: undefined)

  • Order: an integer ≥ 1 and ≤ 2147483647 (optional, default: 1)

  • Variable value: a free value (optional, default: undefined)

Extreme Values

extremum(Function[, With respect to])

Arguments. 

  • Function: a free value

  • With respect to: an unknown variable/symbol (optional, default: x)

Integrate

integrate(Function[, Lower limit][, Upper limit][, Variable of integration][, Force numerical integration])

integral

Arguments. 

  • Function: a free value

  • Lower limit: a free value (optional, default: undefined)

  • Upper limit: a free value (optional, default: undefined)

  • Variable of integration: an unknown variable/symbol (optional, default: undefined)

  • Force numerical integration: a boolean (0 or 1) (optional, default: 0)

Limit

limit(Function, Value to approach[, Variable][, Direction])

Returns the two-sided limit of the function if direction is zero, limit from left (below) if direction is -1, or limit from right (above) if direction is +1.

Arguments. 

  • Function: a free value

  • Value to approach: a real number

  • Variable: an unknown variable/symbol (optional, default: x)

  • Direction: an integer ≥ -1 and ≤ 1 (optional, default: 0)

Romberg Integration

romberg(Function, Lower limit, Upper limit[, Min iterations][, Max iterations][, Variable of integration])

Arguments. 

  • Function: a free value

  • Lower limit: a real number

  • Upper limit: a real number

  • Min iterations: an integer ≥ 2 and ≤ 9223372036854775807 (optional, default: 6)

  • Max iterations: an integer ≥ -9223372036854775808 and ≤ 9223372036854775807 (optional, default: 20)

  • Variable of integration: an unknown variable/symbol (optional, default: undefined)

Requirement.  "Upper limit" > "Lower limit"

Named Integrals

Cosine Integral

Ci(argument)

cosint

The integral of cos(x)/x.

Arguments. 

  • 1: a number

Exponential Integral

Ei(argument)

expint

The integral of e^x/x.

Arguments. 

  • 1: a number

Fresnel Integral C

fresnelc(argument)

The integral of cos(pi*x^2/2).

Arguments. 

  • 1: a number ≥ -6 and ≤ 6

Fresnel Integral S

fresnels(argument)

The integral of sin(pi*x^2/2).

Arguments. 

  • 1: a number ≥ -6 and ≤ 6

Hyperbolic Cosine Integral

Chi(argument)

coshint

The integral of cosh(x)/x.

Arguments. 

  • 1: a number

Hyperbolic Sine Integral

Shi(argument)

sinhint

The integral of sinh(x)/x.

Arguments. 

  • 1: a number

Inverse Regularized Incomplete Beta Function

betaincinv(argument 1, argument 2, argument 3)

Arguments. 

  • 1: a number ≥ 0 and ≤ 1

  • 2: a number

  • 3: a number

Logarithmic Integral

li(argument)

logint

The integral of 1/ln(x).

Arguments. 

  • 1: a number

Lower Incomplete Gamma Function

gammainc(argument 1, argument 2)

Arguments. 

  • 1: a free value

  • 2: a free value

Regularized Incomplete Beta Function

betainc(argument 1, argument 2, argument 3)

Arguments. 

  • 1: a real number

  • 2: a real number

  • 3: a real number

Sine Integral

Si(argument)

sinint

The integral of sin(x)/x.

Arguments. 

  • 1: a number

Upper Incomplete Gamma Function

igamma(argument 1, argument 2)

Arguments. 

  • 1: a number

  • 2: a number

Combinatorics

Binomial Coefficient

binomial(n, k)

Arguments. 

  • n: an integer

  • k: an integer ≥ 0 and ≤ 18446744073709551615

Combinations

comb(Objects, Size)

Returns the number of possible arrangements of an unordered list with a number of objects to choose from and a list size. If there are three objects (1, 2 and 3) that are put in a list with place for two, the alternatives are [1, 2], [1, 3], and [2, 3], and thus the number of combinations is 3.

Arguments. 

  • Objects: an integer ≥ 0

  • Size: an integer ≥ 0

Derangements

derangements(Number of elements)

Returns the number of possible rearrangements of an ordered list, of a certain size, where none of the objects are in their original positions. If the original list is [1, 2, 3], the possible derangements are [2, 3, 1] and [3, 1, 2], and thus the number of derangements is 2.

Arguments. 

  • Number of elements: an integer ≥ 1

Double Factorial

factorial2(Value)

Calculates the double factorial of an integer. Multiplies the argument with every second lesser positive integer (n(n-2)(n-4)...). Can also be entered as a number followed by two exclamation marks.

Example: factorial2(5) = 5!! = 5 × 3 × 1 = 15

Arguments. 

  • Value: an integer ≥ -1 and ≤ 9223372036854775807

Factorial

factorial(Value)

Calculates the factorial of an integer. Multiplies the argument with every lesser positive integer (n(n-1)(n-2)...2*1). Can also be entered as a number followed by one exclamation mark.

Example: factorial(5) = 5! = 5 × 4 × 3 × 2 × 1 = 120

Arguments. 

  • Value: an integer ≥ 0 and ≤ 9223372036854775807

Hyperfactorial

hyperfactorial(Value)

Calculates the hyperfactorial of an integer. Multiplies the argument raised by itself with every lesser positive integer raised by themselves (1^1 * 2^2 ... n^n).

Example: hyperfactorial(3) = (33) × (22) × (11) = 108

Arguments. 

  • Value: an integer ≥ 1

Multifactorial

multifactorial(Value, Factorial)

Calculates the multifactorial of an integer. Multiplies the argument with every x lesser positive integer (n(n-x)(n-2x)...). Can also be entered as a number followed by three or more exclamation marks.

Example: multifactorial(18, 4) = 18!!!! = 18 × 14 × 10 × 6 × 2 = 30 240

Arguments. 

  • Value: an integer ≥ 0 and ≤ 9223372036854775807

  • Factorial: an integer ≥ 1 and ≤ 9223372036854775807

Permutations (Variations)

perm(Objects, Size)

variations

Returns the number of possible arrangements of an ordered list with a number of objects to choose from and a list size. If there are three objects (1, 2 and 3) that are put in a list with two positions, the alternatives are [1, 2], [2, 1], [1, 3], [3, 1], [2, 3] and [3, 2], and thus the number of permutations is 6.

Arguments. 

  • Objects: an integer ≥ 0

  • Size: an integer ≥ 0

Superfactorial

superfactorial(Value)

Calculates the superfactorial of an integer. Multiplies the factorial of the argument with the factorial of every lesser positive integer (1! * 2! ... n!).

Example: superfactorial(5) = 5! × 4! × 3! × 2! × 1! = 34 560

Arguments. 

  • Value: an integer ≥ 0

Complex Numbers

Complex Conjugate

conj(Complex number)

Arguments. 

  • Complex number: a number

Imaginary Part

im(Complex number)

Arguments. 

  • Complex number: a number

Principal Argument

arg(Complex number)

Arguments. 

  • Complex number: a number

Real Part

re(Complex number)

Arguments. 

  • Complex number: a number

Data Sets

Elements

atom(Element[, Property])

Retrieves data from the Elements data set for a given object and property. If "info" is typed as property, all properties of the object will be listed.

This data uses material from the Wikipedia, under the Creative Commons Attribution-ShareAlike License

Arguments. 

  • Element: an object from "Elements" (use symbol, number, or name)

  • Property: name of a data property (symbol, number, name, class, mass, boiling, melting, or density) (optional, default: info)

Properties. 

  • Symbol: symbol (key)

  • Number: number (key)

  • Name: name (key)

  • Classification: class

    A number representing an element group:

    1 Alkali Metal

    2 Alkaline-Earth Metal

    3 Lanthanide

    4 Actinide

    5 Transition Metal

    6 Metal

    7 Metalloid

    8 Polyatomic Non-Metal

    9 Diatomic Non-Metal

    10 Noble Gas

    11 Unknown chemical properties

  • Atomic Mass: mass, weight

    The property uses standard atomic weight, when determined, or the mass number.

  • Boiling Point: boiling

  • Melting Point: melting

  • Density: density

    Density at STP (gases) or near room temperature

Planets

planet(Planet[, Property])

Retrieves data from the Planets data set for a given object and property. If "info" is typed as property, all properties of the object will be listed.

This data uses material from the Wikipedia articles

"Earth" (http://www.wikipedia.org/wiki/Earth),

"Jupiter" (http://www.wikipedia.org/wiki/Jupiter),

"Mars" (http://www.wikipedia.org/wiki/Mars),

"Mercury (planet)" (http://www.wikipedia.org/wiki/Mercury_(planet)),

"Neptune" (http://www.wikipedia.org/wiki/Neptune),

"Pluto" (http://www.wikipedia.org/wiki/Pluto),

"Saturn" (http://www.wikipedia.org/wiki/Saturn),

"Uranus" (http://www.wikipedia.org/wiki/Uranus), and

"Venus" (http://en.wikipedia.org/wiki/Venus), under Creative Commons Attribution-ShareAlike License

Arguments. 

  • Planet: an object from "Planets" (use name)

  • Property: name of a data property (name, year, speed, eccentricity, inclination, satellites, mass, density, area, gravity, temperature, or radius) (optional, default: info)

Properties. 

  • Name: name (key)

  • Orbital Period (Year): year

  • Average Orbital Speed: speed

  • Eccentricity: eccentricity

  • Inclination (to ecliptic): inclination

  • Number of Satellites: satellites

  • Mass: mass

  • Mean Density: density

  • Surface Area: area

  • Equatorial Gravity: gravity

  • Mean Surface Temperature: temperature

  • Mean Radius: radius

Date & Time

Add Days

addDays(Date, Days)

Arguments. 

  • Date: a date (Y-M-D)

  • Days: a number

Add Months

addMonths(Date, Months)

Arguments. 

  • Date: a date (Y-M-D)

  • Months: a number

Add Time

addTime(Date, Time)

Adds a time value to a date. The value can be positive or negative, but must use a unit based on seconds (such as day and year). Fractions of days are truncated.

Arguments. 

  • Date: a date (Y-M-D)

  • Time: a free value that fulfills the condition: "isNumber(Time/s)"

Add Years

addYears(Date, Years)

Arguments. 

  • Date: a date (Y-M-D)

  • Years: a number

Construct Date

date(Year[, Month][, Day][, Calendar])

Returns a date. Available calendars are gregorian (1), hebrew (2), islamic (3), persian (4), indian (5), chinese (6), julian (7), milankovic (8), coptic (9), ethiopian (10), egyptian (11). The Chinese year uses an epoch of 2697 BCE and chinese leap months are indicated by adding 12 to the month number (e.g. leap month 4 = 16).

Arguments. 

  • Year: an integer ≥ -9223372036854775808 and ≤ 9223372036854775807

  • Month: an integer ≥ 1 and ≤ 24 (optional, default: 1)

  • Day: an integer ≥ 1 and ≤ 31 (optional, default: 1)

  • Calendar: a text string (optional, default: gregorian)

Construct Date and Time

datetime(Year[, Month][, Day][, Hour][, Minute][, Second])

Arguments. 

  • Year: an integer ≥ -9223372036854775808 and ≤ 9223372036854775807

  • Month: an integer ≥ 1 and ≤ 12 (optional, default: 1)

  • Day: an integer ≥ 1 and ≤ 31 (optional, default: 1)

  • Hour: an integer ≥ 0 and ≤ 23 (optional, default: 0)

  • Minute: an integer ≥ 0 and ≤ 59 (optional, default: 0)

  • Second: a number ≥ 0 and < 61 (optional, default: 0)

Current Time

time()

Date to Unix Timestamp

timestamp([Date])

Arguments. 

  • Date: a date (Y-M-D) (optional, default: now)

Day of Month

day([Date])

Arguments. 

  • Date: a date (Y-M-D) (optional, default: today)

Day of Week

weekday([Date][, Week begins on Sunday])

Arguments. 

  • Date: a date (Y-M-D) (optional, default: today)

  • Week begins on Sunday: a boolean (0 or 1) (optional, default: 0)

Day of Year

yearday([Date])

Arguments. 

  • Date: a date (Y-M-D) (optional, default: today)

Days between two dates

days(First date, Second date[, Day counting basis][, Financial function mode])

Returns the number of days between two dates.

Basis is the type of day counting you want to use: 0: US 30/360, 1: real days (default), 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • First date: a date (Y-M-D)

  • Second date: a date (Y-M-D)

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 1)

  • Financial function mode: a boolean (0 or 1) (optional, default: 0)

Days in Month

daysInMonth([Date])

Arguments. 

  • Date: a date (Y-M-D) (optional, default: today)

Find Lunar Phase

nextlunarphase(Lunar Phase[, Start Date])

Returns the date when the specified lunar phase occurs. The function searches forward beginning at the specified date. The lunar phase is specified as a number between 0 and 1, where 0 represents new moon, 0.5 full moon, and 0.25 and 0.75 quarter moons. Angle values are also allowed (e.g. π rad = 180° which corresponds to a value of 0.5). Values above 1, without unit, are interpreted as degrees.

Arguments. 

  • Lunar Phase: a number ≥ 0 and < 1

  • Start Date: a date (Y-M-D) (optional, default: now)

Lunar Phase

lunarphase([Date])

Returns the lunar phase, as a number between 0 and 1, for the specified date. This value corresponds to an angle between 0 and 360 degrees. 0 represents new moon, 0.5 full moon, and 0.25 and 0.75 quarter moons.

Arguments. 

  • Date: a date (Y-M-D) (optional, default: now)

Month

month([Date])

Arguments. 

  • Date: a date (Y-M-D) (optional, default: today)

Time Value

timevalue([Date])

Returns the time part, in fractional hours, of a date and time value.

Arguments. 

  • Date: a date (Y-M-D) (optional, default: now)

Unix Timestamp to Date

stamptodate(Timestamp)

unix2date

Returns the local date and time represented by the specified Unix timestamp (seconds, excluding leap seconds, since 1970-01-01). Supports time units.

Arguments. 

  • Timestamp: a free value

Week of Year

week([Date][, Week begins on Sunday])

Arguments. 

  • Date: a date (Y-M-D) (optional, default: today)

  • Week begins on Sunday: a boolean (0 or 1) (optional, default: 0)

Year

year([Date])

Arguments. 

  • Date: a date (Y-M-D) (optional, default: today)

Years between two dates

yearfrac(First date, Second date[, Day counting basis][, Financial function mode])

Returns the number of years (fractional) between two dates.

Basis is the type of day counting you want to use: 0: US 30/360, 1: real days (default), 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • First date: a date (Y-M-D)

  • Second date: a date (Y-M-D)

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 1)

  • Financial function mode: a boolean (0 or 1) (optional, default: 0)

Economics

Accrued interest of security paying at maturity

accrintm(Issue date, Settlement date, Annual rate of security[, Par value][, Day counting basis])

Returns the accrued interest for a security which pays interest at maturity date.

Basis is the type of day counting you want to use: 0: US 30/360 (default), 1: real days, 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • Issue date: a date (Y-M-D)

  • Settlement date: a date (Y-M-D)

  • Annual rate of security: a free value

  • Par value: a free value (optional, default: 1000)

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 0)

Accrued interest of security with periodic interest payments

accrint(Issue date, First interest, Settlement date, Annual rate of security, Par value, Frequency[, Day counting basis])

Returns accrued interest for a security which pays periodic interest.

Allowed frequencies are 1 - annual, 2 - semi-annual or 4 - quarterly. Basis is the type of day counting you want to use: 0: US 30/360 (default), 1: real days, 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • Issue date: a date (Y-M-D)

  • First interest: a date (Y-M-D)

  • Settlement date: a date (Y-M-D)

  • Annual rate of security: a free value

  • Par value: a free value

  • Frequency: an integer ≥ 1 and ≤ 4

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 0)

Amount received at maturity for a security bond

received(Settlement date, Maturity date, Investment, Discount rate[, Day counting basis])

Returns the amount received at the maturity date for an invested security.

Basis is the type of day counting you want to use: 0: US 30/360 (default), 1: real days, 2: real days/360, 3: real days/365 or 4: European 30/360. The settlement date must be before maturity date.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Investment: a free value

  • Discount rate: a free value

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 0)

Compound

compound(Principal, Nominal interest rate, Periods per year, Years)

Returns the value of an investment, given the principal, nominal interest rate, compounding frequency and time.

Arguments. 

  • Principal: a free value

  • Nominal interest rate: a free value

  • Periods per year: a free value

  • Years: a free value

Discount rate for a security

disc(Settlement date, Maturity date, Price per $100 face value, Redemption[, Day counting basis])

Returns the discount rate for a security.

Basis is the type of day counting you want to use: 0: US 30/360 (default), 1: real days, 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Price per $100 face value: a free value

  • Redemption: a free value

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 0)

Dollar Decimal

dollarde(Fractional dollar, Denominator of fraction)

Converts a dollar price expressed as a fraction into a dollar price expressed as a decimal number.

Arguments. 

  • Fractional dollar: a free value

  • Denominator of fraction: an integer ≥ 1

Dollar Fraction

dollarfr(Decimal dollar, Denominator of fraction)

Converts a decimal dollar price into a dollar price expressed as a fraction.

Arguments. 

  • Decimal dollar: a free value

  • Denominator of fraction: an integer ≥ 1

Effective Interest Rate

effect(Nominal interest rate, Periods)

Calculates the effective interest for a given nominal rate.

Arguments. 

  • Nominal interest rate: a free value

  • Periods: a free value

Future Value

fv(Interest rate, Number of periods, Payment made each period[, Present value][, Type])

FV

Computes the future value of an investment. This is based on periodic, constant payments and a constant interest rate.

If type = 1 then the payment is made at the beginning of the period. If type = 0 (or omitted) it is made at the end of each period.

Arguments. 

  • Interest rate: a free value

  • Number of periods: a free value

  • Payment made each period: a free value

  • Present value: a free value (optional, default: 0)

  • Type: a boolean (0 or 1) (optional, default: 0)

Interest paid on a given period of an investment (ISPMT)

ispmt(Periodic interest rate, Amortizement period, Number of periods, Present value)

Calculates the interest paid on a given period of an investment.

Arguments. 

  • Periodic interest rate: a free value

  • Amortizement period: an integer ≥ 1

  • Number of periods: an integer ≥ 1

  • Present value: a free value

Interest rate for a fully invested security

intrate(Settlement date, Maturity date, Investment, Redemption[, Day counting basis])

Returns the interest rate for a fully invested security.

Basis is the type of day counting you want to use: 0: US 30/360 (default), 1: real days, 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Investment: a free value

  • Redemption: a free value

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 0)

Level-Coupon Bond

levelCoupon(Face value, Coupon rate, Coupons per year, Years, Market interest rate)

Calculates the value of a level-coupon bond.

Arguments. 

  • Face value: a free value

  • Coupon rate: a free value

  • Coupons per year: a free value

  • Years: a free value

  • Market interest rate: a free value

Nominal Interest Rate

nominal(Effective interest rate, Periods)

Calculates the nominal interest rate from a given effective interest rate compounded at given intervals.

Arguments. 

  • Effective interest rate: a free value

  • Periods: a free value

Number of coupons to be paid

coupnum(Settlement date, Maturity date, Frequency[, Day counting basis])

Returns the number of coupons to be paid between the settlement and the maturity.

Basis is the type of day counting you want to use: 0: US 30/360 (default), 1: real days, 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Frequency: an integer ≥ 1 and ≤ 12

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 0)

Payment for a loan

pmt(Rate, Number of periods, Present value[, Future value][, Type])

Returns the amount of payment (negative) each period for a loan based on a constant interest rate and constant payments (each payment is equal amount).

If type = 1 then the payment is made at the beginning of the period. If type = 0 (or omitted) it is made at the end of each period.

Note that the interest rate here refers to the rate for each period and if you calculate with an annual rate, each period will be interpreted as a whole year. To get monthly payments divide the annual interest rate by 12 and enter the total number of months (12 times number of years) in the periods field.

Example: pmt(2%/12, 10×12, 100000€) = −€920

Arguments. 

  • Rate: a free value

  • Number of periods: a free value

  • Present value: a free value

  • Future value: a free value (optional, default: 0)

  • Type: a boolean (0 or 1) (optional, default: 0)

Payment of an annuity going towards interest (IPMT)

ipmt(Periodic interest rate, Period, Number of periods, Present value[, Future value][, Type])

Calculates the amount of a payment of an annuity going towards interest.

Type defines the due date. 1 for payment at the beginning of a period and 0 (default) for payment at the end of a period.

Arguments. 

  • Periodic interest rate: a free value

  • Period: an integer ≥ 1

  • Number of periods: an integer ≥ 1

  • Present value: a free value

  • Future value: a free value (optional, default: 0)

  • Type: a boolean (0 or 1) (optional, default: 0)

Payment of an annuity going towards principal (PPMT)

ppmt(Periodic interest rate, Amortizement period, Number of periods, Present value[, Desired future value][, Type])

Calculates the amount of a payment of an annuity going towards principal.

Type defines the due date. 1 for payment at the beginning of a period and 0 (default) for payment at the end of a period.

Arguments. 

  • Periodic interest rate: a free value

  • Amortizement period: an integer ≥ 1

  • Number of periods: an integer ≥ 1

  • Present value: a free value

  • Desired future value: a free value (optional, default: 0)

  • Type: a boolean (0 or 1) (optional, default: 0)

Periods for investment to attain desired value

g_duration(Rate, Present value, Future value)

Returns the number of periods needed for an investment to attain a desired value.

Arguments. 

  • Rate: a free value

  • Present value: a free value

  • Future value: a free value

Periods of an investment

nper(Interest rate, Payment made each period, Present value[, Future value][, Type])

Calculates number of periods of an investment based on periodic constant payments and a constant interest rate.

Type defines the due date. 1 for payment at the beginning of a period and 0 (default) for payment at the end of a period.

Arguments. 

  • Interest rate: a free value

  • Payment made each period: a free value

  • Present value: a free value

  • Future value: a free value (optional, default: 0)

  • Type: a free value (optional, default: 0)

Present Value

pv(Interest rate, Number of periods, Payment made each period[, Future value][, Type])

Returns the present value of an investment.

If type = 1 then the payment is made at the beginning of the period. If type = 0 (or omitted) it is made at the end of each period.

Arguments. 

  • Interest rate: a free value

  • Number of periods: a free value

  • Payment made each period: a free value

  • Future value: a free value (optional, default: 0)

  • Type: a boolean (0 or 1) (optional, default: 0)

Price per $100 face value of a discounted security

pricedisc(Settlement date, Maturity date, Discount, Redemption[, Day counting basis])

Calculates and returns the price per $100 face value of a discounted security. The security does not pay interest at maturity.

Basis is the type of day counting you want to use: 0: US 30/360 (default), 1: real days, 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Discount: a free value

  • Redemption: a free value

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 0)

Price per $100 face value of a security

pricemat(Settlement date, Maturity date, Issue date, Discount rate, Annual yield[, Day counting basis])

Calculates and returns the price per $100 face value of a security. The security pays interest at maturity.

Basis is the type of day counting you want to use: 0: US 30/360 (default), 1: real days, 2: real days/360, 3: real days/365 or 4: European 30/360.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Issue date: a date (Y-M-D)

  • Discount rate: a free value

  • Annual yield: a free value

  • Day counting basis: an integer ≥ 0 and ≤ 4 (optional, default: 0)

Rate of investment

rate(Number of periods, Payment made each period, Present value[, Future value][, Type][, Guess])

Calculates the rate of return.

If type = 1 then the payment is made at the beginning of the period. If type = 0 (or omitted) it is made at the end of each period.

Note that the optional guess is needed because there can be more than one valid result. It defaults to 10%.

Example: rate(10, −1500, 10000) ≈ 0.0814

Arguments. 

  • Number of periods: a number > 0

  • Payment made each period: a free value

  • Present value: a free value

  • Future value: a free value (optional, default: 0)

  • Type: a boolean (0 or 1) (optional, default: 0)

  • Guess: a number (optional, default: 0.1)

Return on continuously compounded interest

continuous(Principal, Interest rate, Years)

Calculates the return on continuously compounded interest, given the principal, nominal rate and time in years.

Arguments. 

  • Principal: a free value

  • Interest rate: a free value

  • Years: a free value

Straight Line Depreciation

sln(Cost, Salvage value, Life)

Determines the straight line depreciation of an asset for a single period.

Cost is the amount you paid for the asset. Salvage is the value of the asset at the end of the period. Life is the number of periods over which the asset is depreciated. SLN divides the cost evenly over the life of an asset.

Arguments. 

  • Cost: a free value

  • Salvage value: a free value

  • Life: a free value

Sum-of-Years Digits Depreciation

syd(Cost, Salvage value, Life, Period)

Calculates the sum-of-years digits depreciation for an asset based on its cost, salvage value, anticipated life, and a particular period. This method accelerates the rate of the depreciation, so that more depreciation expense occurs in earlier periods than in later ones. The depreciable cost is the actual cost minus the salvage value. The useful life is the number of periods (typically years) over which the asset is depreciated.

Arguments. 

  • Cost: a free value

  • Salvage value: a free value

  • Life: a free value

  • Period: a free value

Treasury Bill Equivalent

tbilleq(Settlement date, Maturity date, Discount rate)

Returns the bond equivalent for a treasury bill.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Discount rate: a free value

Treasury Bill Price

tbillprice(Settlement date, Maturity date, Discount rate)

Returns the price per $100 value for a treasury bill.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Discount rate: a free value

Treasury Bill Yield

tbillyield(Settlement date, Maturity date, Price per $100 face value)

Returns the yield for a treasury bill.

Arguments. 

  • Settlement date: a date (Y-M-D)

  • Maturity date: a date (Y-M-D)

  • Price per $100 face value: a free value

Zero Coupon

zeroCoupon(Face value, Interest rate, Years)

Calculates the value of a zero-coupon (pure discount) bond.

Arguments. 

  • Face value: a free value

  • Interest rate: a free value

  • Years: a free value

Microeconomics

Elasticity

elasticity(Demand function, Price[, Price variable])

Calculates the demand elasticity. Also works for supply elasticity, income elasticity, cross-price elasticity, etc. Just replace demand with supply, or price with income...

eg. elasticity(100-x^2, 3) calculates the demand elasticity when the price is 3 for the function "Q = 100 - x^2" where x is the default price variable.

Arguments. 

  • Demand function: a free value

  • Price: a free value

  • Price variable: an unknown variable/symbol (optional, default: x)

Exponents & Logarithms

10 raised to the power X

exp10(Exponent)

Arguments. 

  • Exponent: a free value

2 raised to the power X

exp2(Exponent)

Arguments. 

  • Exponent: a free value

All Roots

allroots(Value, Degree (n))

Example: allroots(4, 2) = [2 −2]

Arguments. 

  • Value: a number

  • Degree (n): an integer ≥ 1 and ≤ 4294967295

Base-10 Logarithm

log10(Value)

Returns the base n logarithm.

Arguments. 

  • Value: a number ≥ 0

Base-2 Logarithm

log2(Value)

Returns the base n logarithm.

Arguments. 

  • Value: a number ≥ 0

Base-N Logarithm

log(Value[, Base])

Arguments. 

  • Value: a number that is nonzero

  • Base: a number that is nonzero (optional, default: e)

Complex Exponential (Cis)

cis(Exponent)

Arguments. 

  • Exponent: a number

Cube Root

cbrt(Value)

Returns the third real root.

Arguments. 

  • Value: a free value

Exponential (e^x)

exp(Exponent)

Arguments. 

  • Exponent: a free value

Lambert W Function (Omega Function, Product Log)

lambertw(Value[, Branch])

productlog

Returns the inverse function for x*e^x as ln() does for e^x. Only the principal branch and real valued results are currently supported.

Arguments. 

  • Value: a real number

  • Branch: an integer (optional, default: 0)

Natural Logarithm

ln(Value)

Arguments. 

  • Value: a number that is nonzero

Nth root

root(Value, Degree (n))

Returns the real root. For negative values the degree must be odd. Complex values are not allowed.

Arguments. 

  • Value: a real number

  • Degree (n): a rational number

Power Tower

powertower(Value, Order)

Example: powertower(2, 4) = 2^(2^(22)) = 65 536

Arguments. 

  • Value: a free value

  • Order: an integer ≥ 1

Square

sq(Value)

Arguments. 

  • Value: a free value

Square Root

sqrt(Value)

Returns the principal square root (for positive values the positive root is returned).

Arguments. 

  • Value: a free value

Square root (x * pi)

sqrtpi(Non-negative value)

Returns the non-negative square root of x * pi

Arguments. 

  • Non-negative value: a number ≥ 0

Geometry

Circle

Circle Area

circle(Radius)

Calculates the area of a circle using the radius

Arguments. 

  • Radius: a free value

Circle Circumference

circumference(Radius)

Calculates the area of a circle using the radius

Arguments. 

  • Radius: a free value

Cone

Cone Volume

cone(Radius, Height)

Arguments. 

  • Radius: a free value

  • Height: a free value

Surface Area of Cone

coneSa(Radius, Height)

Arguments. 

  • Radius: a free value

  • Height: a free value

Cube

Cube Volume

cube(Length of side)

Arguments. 

  • Length of side: a free value

Surface Area of Cube

cubeSa(Length of side)

Arguments. 

  • Length of side: a free value

Cylinder

Cylinder Volume

cylinder(Radius, Height)

Arguments. 

  • Radius: a free value

  • Height: a free value

Surface Area of Cylinder

cylinderSa(Radius, Height)

Arguments. 

  • Radius: a free value

  • Height: a free value

Parallelogram

Parallelogram Area

parallelogram(Base, Height)

Calculates the area of a four-sided figure whose opposite sides are both parallel and equal in length.

Arguments. 

  • Base: a free value

  • Height: a free value

Parallelogram Perimeter

parallelogramPerimeter(Side A, Side B)

Calculates the perimeter of a four-sided figure whose opposite sides are both parallel and equal in length.

Arguments. 

  • Side A: a free value

  • Side B: a free value

Prism

Surface Area of Rectangular Prism

rectprismSa(Length, Width, Height)

Calculates the surface area of a prism with rectangular base.

Arguments. 

  • Length: a free value

  • Width: a free value

  • Height: a free value

Volume of Rectangular Prism

rectprism(Length, Width, Height)

Calculates the volume of a prism with rectangular base.

Arguments. 

  • Length: a free value

  • Width: a free value

  • Height: a free value

Volume of Triangular Prism

triangleprism(Length, Width, Height)

Calculates the volume of a prism with triangular base.

Arguments. 

  • Length: a free value

  • Width: a free value

  • Height: a free value

Pyramid

Height of Regular Tetrahedron

tetrahedronHeight(Length of side)

Arguments. 

  • Length of side: a free value

Height of Square Pyramid (Equilateral)

sqpyramidHeight(Length of side)

Arguments. 

  • Length of side: a free value

Pyramid Volume

pyramid(Length of base, Width of base, Height)

Calculates the volume of a 3-dimensional shape standing on a rectangular base and terminating in a point at the top.

Arguments. 

  • Length of base: a free value

  • Width of base: a free value

  • Height: a free value

Surface Area of Regular Tetrahedron

tetrahedronSa(Length of side)

Arguments. 

  • Length of side: a free value

Surface Area of Square Pyramid (Equilateral)

sqpyramidSa(Length of side)

Arguments. 

  • Length of side: a free value

Volume of Regular Tetrahedron

tetrahedron(Length of side)

Arguments. 

  • Length of side: a free value

Volume of Square Pyramid (Equilateral)

sqpyramid(Length of side)

Arguments. 

  • Length of side: a free value

Rectangle

Rectangle Area

rect(Length, Width)

Arguments. 

  • Length: a free value

  • Width: a free value

Rectangle Perimeter

rectPerimeter(Length, Width)

Arguments. 

  • Length: a free value

  • Width: a free value

Sphere

Sphere Volume

sphere(Radius)

Arguments. 

  • Radius: a free value

Surface Area of Sphere

sphereSa(Radius)

Arguments. 

  • Radius: a free value

Square

Square Area

square(Length of side)

Arguments. 

  • Length of side: a free value

Square Perimeter

squarePerimeter(Length of side)

Arguments. 

  • Length of side: a free value

Trapezoid

Trapezoid Area

trapezoid(Side A, Side B, Height)

Calculates the area of a four-sided figure with two parallel sides.

Arguments. 

  • Side A: a free value

  • Side B: a free value

  • Height: a free value

Triangle

Hypotenuse

hypot(Side A, Side B)

Arguments. 

  • Side A: a free value

  • Side B: a free value

Triangle Area

triangle(Base, Height)

Arguments. 

  • Base: a free value

  • Height: a free value

Triangle Perimeter

trianglePerimeter(Side A, Side B, Side C)

Arguments. 

  • Side A: a free value

  • Side B: a free value

  • Side C: a free value

Logical

Bit Rotation

bitrot(Number, Steps[, Bit width][, Signed integer])

Applies circular bitwise shift to an integer of specified bit width and signedness (use 1 for signed and 0 for unsigned). The second argument specifies the number of steps that each binary bit is shifted to the left (use negative values for right shift). If bit width is zero, the smallest necessary number of bits (of 8, 16, 32, 64, 128, ...) will be used.

Arguments. 

  • Number: an integer

  • Steps: an integer

  • Bit width: an integer ≥ 0 and ≤ 4294967295 (optional, default: 0)

  • Signed integer: a boolean (0 or 1) (optional, default: 1)

Bitwise Complement (Not)

bitcmp(Number[, Bit width][, Signed integer])

Applies bitwise NOT to an integer of specified bit width and signedness (use 1 for signed and 0 for unsigned). If bit width is zero, the smallest necessary number of bits (of 8, 16, 32, 64, 128, ...) will be used.

Arguments. 

  • Number: an integer

  • Bit width: an integer ≥ 0 and ≤ 4294967295 (optional, default: 0)

  • Signed integer: a boolean (0 or 1) (optional, default: 0)

Bitwise Exclusive OR

xor(Value 1, Value 2)

Arguments. 

  • Value 1: an integer or a vector

  • Value 2: an integer or a vector

Bitwise Shift

shift(Number, Steps[, Arithmetic shift using two's complement])

Applies logical or arithmetic bitwise shift to an integer. The second argument specifies the number of steps that each binary bit is shifted to the left (use negative values for right shift).

Arguments. 

  • Number: an integer

  • Steps: an integer ≥ -9223372036854775808 and ≤ 9223372036854775807

  • Arithmetic shift using two's complement: a boolean (0 or 1) (optional, default: 1)

For Each Element...Do

foreach(Matrix/vector, Initial value, Do function[, Value variable][, Element variable])

Example: foreach(1...5, 0, y + x) = 15

Arguments. 

  • Matrix/vector: a matrix

  • Initial value: a free value

  • Do function: a free value

  • Value variable: an unknown variable/symbol (optional, default: y)

  • Element variable: an unknown variable/symbol (optional, default: x)

For...Do

for(Initial value of counter, Counter variable, For condition, Counter update function, Initial value, Do function, Value variable)

Example: for(1, x, x < 10, x + 1, 2, y × x, y) = 725 760

Arguments. 

  • Initial value of counter: a free value

  • Counter variable: an unknown variable/symbol

  • For condition: a free value

  • Counter update function: a free value

  • Initial value: a free value

  • Do function: a free value

  • Value variable: an unknown variable/symbol

Get Bit

bitget(Number, Position[, Last position])

Returns the binary bit at the specified position. The index of the least significant bit is 1. If last index is non-zero the bits from (first) position to, and including, last position are returned as a new binary number.

Example: bitget(12, 3) = 1; bitget(0b01011100, 2; 4) = 0b00000110 = 6

Arguments. 

  • Number: an integer

  • Position: an integer ≥ 1 and ≤ 18446744073709551615

  • Last position: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

If...Then...Else

if(Condition, Expression if condition is met, Expression if condition is NOT met[, Assume false if not true])

Tests a condition and returns a value depending on the result. Vectors can be used for argument 1 and 2, instead of nested functions.

Arguments. 

  • Condition: a free value

  • Expression if condition is met: a free value

  • Expression if condition is NOT met: a free value

  • Assume false if not true: a boolean (0 or 1) (optional, default: 0)

Logical Exclusive OR

lxor(Value 1, Value 2)

Arguments. 

  • Value 1: a free value

  • Value 2: a free value

Set Bit

bitset(Number, Position[, Value][, Bit width][, Signed integer])

Set binary bit at specified position. The index of the least significant bit is 1. Specify bit width and signedness (use 1 for signed and 0 for unsigned) to allow sign changes when the most significant bit is set.

Example: bitset(8, 3) = 12

Arguments. 

  • Number: an integer

  • Position: an integer ≥ 1 and ≤ 18446744073709551615

  • Value: a boolean (0 or 1) (optional, default: 1)

  • Bit width: an integer ≥ 0 and ≤ 4294967295 (optional, default: 0)

  • Signed integer: a boolean (0 or 1) (optional, default: 0)

Set Multiple Bits

setbits(Number, First position, Last position, Value[, Bit width][, Signed integer])

Set binary bits at specified range with binary bits from an integer (index 1 to length of range). The index of the least significant bit is 1. Specify bit width and signedness (use 1 for signed and 0 for unsigned) to allow sign changes when the most significant bit is set.

Example: setbits(0xFFFF, 9, 12, 0xA) = 0xFAFF

Arguments. 

  • Number: an integer

  • First position: an integer ≥ 1 and ≤ 18446744073709551615

  • Last position: an integer ≥ 1 and ≤ 18446744073709551615

  • Value: an integer

  • Bit width: an integer ≥ 0 and ≤ 4294967295 (optional, default: 0)

  • Signed integer: a boolean (0 or 1) (optional, default: 0)

Matrices & Vectors

Adjugate (Adjoint)

adj(Matrix)

Calculates the adjugate or adjoint of a matrix.

Arguments. 

  • Matrix: a square matrix

Cofactor

cofactor(Matrix, Row, Column)

Calculates the cofactor of the element at specified position.

Arguments. 

  • Matrix: a square matrix

  • Row: an integer ≥ 1 and ≤ 4294967295

  • Column: an integer ≥ 1 and ≤ 4294967295

Colon Function (number sequence vector)

colon(Starting value, Increment or Ending value[, Ending value])

Returns a sequence of numbers as a vector.

Example: colon(1, 0.5, 3) = [1 1.5 2 2.5 3]

Arguments. 

  • Starting value: a free value

  • Increment or Ending value: a free value

  • Ending value: a free value (optional, default: undefined)

Columns

columns(Matrix)

Returns the number of columns in a matrix.

Arguments. 

  • Matrix: a matrix

Concatenate Horizontally

horzcat(Matrix 1[, Matrix 2], ...)

Arguments. 

  • Matrix 1: a matrix

  • Matrix 2: a matrix (optional)

Concatenate Vertically

vertcat(Matrix 1[, Matrix 2], ...)

Arguments. 

  • Matrix 1: a matrix

  • Matrix 2: a matrix (optional)

Construct Matrix

matrix(Rows, Columns, Elements)

Returns a matrix with specified dimensions and listed elements. Omitted elements are set to zero.

Arguments. 

  • Rows: an integer ≥ 1 and ≤ 4294967295

  • Columns: an integer ≥ 1 and ≤ 4294967295

  • Elements: a vector

Construct Vector

vector([Elements], ...)

Returns a vector with listed elements.

Arguments. 

  • Elements: a free value (optional)

Convert Matrix to Vector

matrix2vector(Matrix)

Puts each element of a matrix in vertical order in a vector.

Arguments. 

  • Matrix: a matrix

Cross Product

cross(Vector 1, Vector 2)

Calculates the cross product of two 3-dimensional vectors.

Arguments. 

  • Vector 1: a vector that fulfills the condition: "dimension(Vector 1)==3"

  • Vector 2: a vector that fulfills the condition: "dimension(Vector 2)==3"

Determinant

det(Matrix)

Calculates the determinant of a matrix.

Arguments. 

  • Matrix: a square matrix

Dimension

dimension(Vector)

Returns the number of elements in a vector.

Arguments. 

  • Vector: a vector

Dot Product

dot(Vector 1, Vector 2)

Calculates the dot product of two vectors.

Arguments. 

  • Vector 1: a vector

  • Vector 2: a vector

Element

element(Matrix/vector, Row/index[, Column])

Returns the element at specified position in a matrix (row and column) or vector (index).

Arguments. 

  • Matrix/vector: a matrix

  • Row/index: an integer ≥ 1 and ≤ 4294967295

  • Column: an integer ≥ 0 and ≤ 4294967295 (optional, default: 0)

Element-wise Multiplication

multiply(Factor 1[, Factor 2], ...)

times

hadamard

Arguments. 

  • Factor 1: a free value

  • Factor 2: a free value (optional)

Element-wise Power

pow(Base, Exponent)

raise

power

Arguments. 

  • Base: a free value

  • Exponent: a free value

Element-wise Right Division

divide(Numerator, Denominator)

rdivide

Arguments. 

  • Numerator: a free value

  • Denominator: a free value

Elements

elements(Matrix/vector)

Returns the number of elements in a matrix or vector.

Arguments. 

  • Matrix/vector: a matrix

Entrywise Function

entrywise(Function, Matrices/vectors and variables)

Calculates a new matrix or vector using each separate element in matrix/vector 1 and the corresponding (in the same row and column) elements in matrix/vector 2. An unlimited number of matrices/vectors can be specified, with each matrix/vector argument followed by the corresponding variable used in the function argument.

Example: entrywise(x / y, [4 10 12], x, [2 2 4], y) = [2 5 3]

Arguments. 

  • Function: a free value

  • Matrices/vectors and variables: a vector with a vector, an unknown variable/symbol, ...

Export To CSV File

export(Matrix/vector, Filename[, Separator])

Exports a matrix to a CSV data file.

Arguments. 

  • Matrix/vector: a matrix

  • Filename: a valid file name

  • Separator: a text string (optional, default: ",")

Extract Column as Vector

column(Matrix, Column)

Returns a column in a matrix as a vector.

Arguments. 

  • Matrix: a matrix

  • Column: an integer ≥ 1 and ≤ 4294967295

Extract Row as Vector

row(Matrix, Row)

Returns a row in a matrix as a vector.

Arguments. 

  • Matrix: a matrix

  • Row: an integer ≥ 1 and ≤ 4294967295

Flip

flip(Matrix/vector[, Dimension])

Reverses the order of elements in a matrix or vector. If dimension is 1, the order of rows is reversed, if 2 column order is changed, and if 0 (default) both are changed.

Example: flip([1 2 3]) = [3 2 1]

Arguments. 

  • Matrix/vector: a matrix

  • Dimension: an integer ≥ 0 and ≤ 2 (optional, default: 0)

Generate Vector

genvector(Function, Min, Max[, Dimension / Step size][, Variable][, Use step size])

Returns a vector generated from a function with a variable (default x) running from min to max. The 4th argument is either the step between each value of the variable, if the 6th argument is 1 or if the value is 1 (default), negative, or not an integer and the 6th argument is -1 (default), or the number of elements.

Example: genvector(x2, 1, 5) = [1 4 9 16 25]

Arguments. 

  • Function: a free value

  • Min: a free value

  • Max: a free value

  • Dimension / Step size: a free value (optional, default: 1)

  • Variable: an unknown variable/symbol (optional, default: undefined)

  • Use step size: an integer ≥ -1 and ≤ 1 (optional, default: -1)

Identity

identity(Matrix or rows/columns)

Returns the identity matrix of a matrix or with specified number of rows/columns.

Arguments. 

  • Matrix or rows/columns: an integer ≥ 1 and ≤ 10000000 or a square matrix

Kronecker Product

kron(Matrix 1, Matrix 2)

Arguments. 

  • Matrix 1: a matrix

  • Matrix 2: a matrix

Load CSV File

load(Filename[, First data row][, Separator])

Returns a matrix imported from a CSV data file.

Arguments. 

  • Filename: a valid file name

  • First data row: an integer ≥ 1 and ≤ 2147483647 (optional, default: 1)

  • Separator: a text string (optional, default: ",")

Magnitude

magnitude(Value)

Calculates the magnitude of a value. This function returns the same value as abs() for all values except vectors.

Arguments. 

  • Value: a vector

Matrix Area

area(Matrix, Start row, Start column, End row, End column)

Returns a part of a matrix.

Arguments. 

  • Matrix: a matrix

  • Start row: an integer ≥ 1 and ≤ 4294967295

  • Start column: an integer ≥ 1 and ≤ 4294967295

  • End row: an integer ≥ 1 and ≤ 4294967295

  • End column: an integer ≥ 1 and ≤ 4294967295

Matrix Inverse

inv(Matrix)

inverse

Calculates the inverse of a matrix. The inverse is the matrix that multiplied by the original matrix equals the identity matrix (AB = BA = I).

Arguments. 

  • Matrix: a square matrix

Matrix Rank

rk(Matrix)

Arguments. 

  • Matrix: a matrix

Merge Vectors

mergevectors(Vector 1[, Vector 2], ...)

Returns a vector with the elements from two vectors.

Arguments. 

  • Vector 1: a vector

  • Vector 2: a vector (optional)

Norm (length)

norm(Vector[, Exponent (p)])

Calculates the norm/length of a vector.

Arguments. 

  • Vector: a vector

  • Exponent (p): an integer (optional, default: 2)

Permanent

permanent(Matrix)

Calculates the permanent of a matrix. The permanent differs from a determinant in that all signs in the expansion by minors are taken as positive.

Arguments. 

  • Matrix: a square matrix

Rank

rank(Vector[, Ascending])

Returns a vector with values of elements replaced with their mutual ranks.

Example: rank([6 1 4]) = [3 1 2]

Arguments. 

  • Vector: a vector

  • Ascending: a boolean (0 or 1) (optional, default: 1)

Reduced Row Echelon Form

rref(Matrix)

Arguments. 

  • Matrix: a matrix

Rows

rows(Matrix)

Returns the number of rows in a matrix.

Arguments. 

  • Matrix: a matrix

Sort

sort(Vector[, Ascending])

Returns a sorted vector.

Example: sort([6 1 4]) = [1 4 6]

Arguments. 

  • Vector: a vector

  • Ascending: a boolean (0 or 1) (optional, default: 1)

Transpose

transpose(Matrix)

Returns the transpose of a matrix.

Arguments. 

  • Matrix: a matrix

Vector Limits

limits(Vector, Lower limit, Upper limit)

Returns a part of a vector between two positions.

Arguments. 

  • Vector: a vector

  • Lower limit: an integer ≥ -2147483648 and ≤ 2147483647

  • Upper limit: an integer ≥ -2147483648 and ≤ 2147483647

Miscellaneous

American Wire Gauge Cross-Section Area

awg(AWG)

For gauges larger than 0000 (4/0), please use negative values (00=-1, 000=-2, 0000=-3, 00000=-4, etc). For conversion to AWG, use an equation (e.g. awg(x) = 20 mm^2).

Arguments. 

  • AWG: a text string

American Wire Gauge Diameter

awgd(AWG)

For gauges larger than 0000 (4/0), please use negative values (00=-1, 000=-2, 0000=-3, 00000=-4, etc). For conversion to AWG, use an equation (e.g. awgd(x) = 5 mm).

Arguments. 

  • AWG: a text string

Body Mass Index (BMI)

bmi(Weight, Height)

Calculates the Body Mass Index. The resulting BMI-value is sometimes interpreted as follows (although varies with age, sex, etc.):

Underweight < 18.5

Normal weight 18.5-25

Overweight 25-30

Obesity > 30

Note that you must use units for weight (ex. 59kg) and length (ex. 174cm).

Example: bmi(127 lb, 5ft + 4in) = 21.80

Arguments. 

  • Weight: a free value

  • Height: a free value

Convert to/from Q Format (Fixed Point)

qFormat(Value, Bits (integer part)[, Bits (fraction part)][, Always convert to])

Converts to or from fixed point number. Corresponds to Qm.n format where m is the second argument and n is the third argument. m does not include the sign bit. If the value is an integer, and the fourth argument is false, the value is converted from fixed point, otherwise to.

Arguments. 

  • Value: a number

  • Bits (integer part): an integer ≥ 0

  • Bits (fraction part): an integer ≥ 0 (optional, default: 0)

  • Always convert to: a boolean (0 or 1) (optional, default: 0)

Requirement.  "Bits (fraction part)"=0||abs("Value")≤2^("Bits (integer part)"+"Bits (fraction part)")

Depth of Field

dof(Focal Length, F-stop (aperture), Distance[, Circle of confusion or sensor size])

Returns the estimated distance between the nearest and the farthest objects that are in acceptably sharp focus in a photo. Enter focal length (e.g. 50 mm) and distance (e.g. 5 m) with units, and f-stop without unit (2.8, 4.0, 5.6, etc.). Specify either a cicle of confusion diameter limit (e.g. 0.05 mm) or the sensor size of the camera - 0="35mm", 1="APS-H", 2="APS-CN" (Nikon, Pentax, Sony), 3="APS-C" (Canon), 4="4/3" (Four Thirds System), or 5='1"' (Nikon 1, Sony RX10, Sony RX100) - for a diameter based on d/1500.

Example: dof(50 mm, 2.8, 2 m, "APS−C") ≈ 161 mm

Arguments. 

  • Focal Length: a free value

  • F-stop (aperture): a number ≥ 0

  • Distance: a free value

  • Circle of confusion or sensor size: a free value (optional, default: 0)

Distance Between GPS Coordinates

geodistance(Latitude 1, Longitude 1, Latitude 2, Longitude 2)

gpsdistance

Calculates the distance between two geodetic coordinates using Vincenty's formulae (with datum WGS 84), or, in case of failure, the Haversine forumla. Each coordinate can be specified using a numerical value (representing decimal degrees), an angle (e.g. with degree unit), or a text string ending with N, S, E, or W (S for negative latitude, W for negative longitude).

Arguments. 

  • Latitude 1: a free value

  • Longitude 1: a free value

  • Latitude 2: a free value

  • Longitude 2: a free value

Drill Bit Size

drillbit(Diameter or Gauge)

Returns drill bit gauge number or letter, if argument is fraction or diameter value with length unit, or drill bit diameter (with length unit), if argument is an integer or an upper-case character (quoted)

Example: drillbit("A") = 0.234 in; drillbit(4.4 mm) = 17

Arguments. 

  • Diameter or Gauge: a free value

IEEE 754 Floating-Point

float(Floating-point number (binary)[, Number of bits][, Number of exponent bits][, Position of sign bit])

Reads a number in a IEEE 754 floating-point format. The number will be read as a binary number, unless it contains digits other than 1 or 0. If the third argument (exponent bits) is set to zero, the standard number of exponent bits will be used (e.g. 8 for 32-bit format).

Arguments. 

  • Floating-point number (binary): a text string

  • Number of bits: an integer ≥ 8 and ≤ 18446744073709551615 (optional, default: 32)

  • Number of exponent bits: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

  • Position of sign bit: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

Requirement.  "Number of exponent bits"<"Number of bits"−1 && "Position of sign bit"<"Number of bits"

IEEE 754 Floating-Point Bits

floatBits(Value[, Number of bits][, Number of exponent bits][, Position of sign bit])

Converts a value to a number in a IEEE 754 floating-point format and returns the number corresponding to the binary representation. If the third argument (exponent bits) is set to zero, the standard number of exponent bits will be used (e.g. 8 for 32-bit format).

Arguments. 

  • Value: a real number

  • Number of bits: an integer ≥ 8 and ≤ 18446744073709551615 (optional, default: 32)

  • Number of exponent bits: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

  • Position of sign bit: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

Requirement.  "Number of exponent bits"<"Number of bits"−1 && "Position of sign bit"<"Number of bits"

IEEE 754 Floating-Point Components

floatParts(Value[, Number of bits][, Number of exponent bits][, Position of sign bit])

Converts a value to a number in a IEEE 754 floating-point format and returns sign, exponent, and significand in a vector. If the third argument (exponent bits) is set to zero, the standard number of exponent bits will be used (e.g. 8 for 32-bit format).

Arguments. 

  • Value: a real number

  • Number of bits: an integer ≥ 8 and ≤ 18446744073709551615 (optional, default: 32)

  • Number of exponent bits: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

  • Position of sign bit: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

Requirement.  "Number of exponent bits"<"Number of bits"−1 && "Position of sign bit"<"Number of bits"

IEEE 754 Floating-Point Error

floatError(Value[, Number of bits][, Number of exponent bits][, Position of sign bit])

Calculates the error (the difference between the original and the converted value) when converting a value to a IEEE 754 floating-point format. If the third argument (exponent bits) is set to zero, the standard number of exponent bits will be used (e.g. 8 for 32-bit format).

Arguments. 

  • Value: a real number

  • Number of bits: an integer ≥ 8 and ≤ 18446744073709551615 (optional, default: 32)

  • Number of exponent bits: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

  • Position of sign bit: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

Requirement.  "Number of exponent bits"<"Number of bits"−1 && "Position of sign bit"<"Number of bits"

IEEE 754 Floating-Point Value

floatValue(Value[, Number of bits][, Number of exponent bits][, Position of sign bit])

Returns the closest value that can be represented by a IEEE 754 floating-point format. If the third argument (exponent bits) is set to zero, the standard number of exponent bits will be used (e.g. 8 for 32-bit format).

Arguments. 

  • Value: a real number

  • Number of bits: an integer ≥ 8 and ≤ 18446744073709551615 (optional, default: 32)

  • Number of exponent bits: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

  • Position of sign bit: an integer ≥ 0 and ≤ 18446744073709551615 (optional, default: 0)

Requirement.  "Number of exponent bits"<"Number of bits"−1 && "Position of sign bit"<"Number of bits"

Q Format Error (Fixed Point)

qError(Value, Bits (integer part)[, Bits (fraction part)])

Arguments. 

  • Value: a number

  • Bits (integer part): an integer ≥ 0

  • Bits (fraction part): an integer ≥ 0 (optional, default: 0)

RAID Space

raid(RAID level, Capacity of each disk, Number of disks[, Stripes])

Calculates RAID array disk capacity usable for data storage. If the combination of number of disks and RAID level is invalid, zero is returned. Supported RAID levels are 0, 1, 2, 3, 4, 5, 6, 1+0/10, 0+1, 5+0/50, 6+0/60, and 1+6. Stripes are optional and only used for nested RAID levels (except 1+0).

Example: raid(4, 12, 5) = 12

Arguments. 

  • RAID level: a text string

  • Capacity of each disk: a free value

  • Number of disks: an integer ≥ 1

  • Stripes: an integer ≥ 2 (optional, default: 2)

RAM Latency

ramlatency(Data Rate, CAS Latency[, Word][, Transfers per Clock Cycle])

Example: ramlatency(3600, 18) = 10 ns

Arguments. 

  • Data Rate: a free value

  • CAS Latency: a number > 0

  • Word: an integer ≥ 1 (optional, default: 1)

  • Transfers per Clock Cycle: an integer ≥ 1 (optional, default: 2)

Roman Number

roman(Roman number)

Returns the value of a roman number.

Arguments. 

  • Roman number: a text string

Number Theory

Absolute Value

abs(Value)

Arguments. 

  • Value: a number

Bernoulli Number/Polynomial

bernoulli(Index (n)[, Variable])

Returns the nth Bernoulli number or polynomial (if the second argument is non-zero).

Arguments. 

  • Index (n): an integer ≥ 0

  • Variable: a free value (optional, default: 0)

Divisors

divisors(Value)

Arguments. 

  • Value: an integer that is nonzero

Euler's Totient Function

totient(n)

φ

phi

Counts the positive integers up to a given integer n that are relatively prime to n.

Arguments. 

  • n: an integer

Fibonacci Number

fibonacci(Index (n))

Returns the n-th term of the Fibonacci sequence.

Arguments. 

  • Index (n): a number

Greatest Common Divisor

gcd(Value 1, Value 2[, Value 3], ...)

GCD

Arguments. 

  • Value 1: a free value that is rational (polynomial)

  • Value 2: a free value that is rational (polynomial)

  • Value 3: a free value that is rational (polynomial) (optional)

Least Common Multiple

lcm(Value 1, Value 2[, Value 3], ...)

Arguments. 

  • Value 1: a free value that is rational (polynomial)

  • Value 2: a free value that is rational (polynomial)

  • Value 3: a free value that is rational (polynomial) (optional)

Multiples

multiples(Value, Min, Max)

Returns all multiples of a value in the specified range.

Example: multiples(9, 50, 100) = [54 63 72 81 90 99]

Arguments. 

  • Value: a number that is nonzero

  • Min: a number

  • Max: a number

Requirement.  "Min"≤"Max"

Arithmetic

Denominator

denominator(Number)

Arguments. 

  • Number: a rational number

Integer Division

div(Numerator, Denominator)

Arguments. 

  • Numerator: a free value

  • Denominator: a free value

Modular Exponentiation

powmod(Numerator, Exponent, Denominator)

powerMod

Finds the modular inverse for negative exponents, and is otherwise equivalent to mod(a^b, c). For negative exponents the greatest common divisor of the numerator and the denominator must be 1.

Arguments. 

  • Numerator: an integer

  • Exponent: an integer

  • Denominator: an integer that is nonzero

Modulus

mod(Numerator, Denominator)

Arguments. 

  • Numerator: a real number

  • Denominator: a real number that is nonzero

Negate

neg(Value)

Arguments. 

  • Value: a free value

Numerator

numerator(Number)

Arguments. 

  • Number: a rational number

Parallel Sum

parallel(argument 1, argument 2[, argument 3], ...)

Arguments. 

  • 1: a free value

  • 2: a free value

  • 3: a free value (optional)

Remainder

rem(Numerator, Denominator)

Arguments. 

  • Numerator: a real number

  • Denominator: a real number that is nonzero

Signum

sgn(Number[, Value for zero])

Arguments. 

  • Number: a number

  • Value for zero: a free value (optional, default: 0)

Subtract

subtract(Terms)

Arguments. 

  • Terms: a vector

Requirement.  elements("Terms")≥2

Integers

Even

even(Number)

Arguments. 

  • Number: an integer

Odd

odd(Number)

Arguments. 

  • Number: an integer

Number Bases

Bijective base-26

bijective(Bijective base-26 number)

Returns a value from an expression in bijective base-26. Conversion in the opposite direction is also supported.

Arguments. 

  • Bijective base-26 number: a text string

Binary

bin(Binary number[, Two's complement])

Returns a value from a binary expression. If two's complement is true, numbers beginning with '1' are interpreted as negative binary numbers using two's complement.

Arguments. 

  • Binary number: a text string

  • Two's complement: a boolean (0 or 1) (optional, default: 0)

Binary-Coded Decimal (BCD)

bcd(Binary-coded decimal number[, Packed])

Arguments. 

  • Binary-coded decimal number: a text string

  • Packed: a boolean (0 or 1) (optional, default: 1)

Decimal

dec(Decimal number)

Returns a value from a decimal expression.

Arguments. 

  • Decimal number: a text string

Hexadecimal

hex(Hexadecimal number[, Two's complement])

Returns a value from a hexadecimal expression. If two's complement is true, numbers beginning with 8 or higher are interpreted as negative hexadecimal numbers using two's complement.

Arguments. 

  • Hexadecimal number: a text string

  • Two's complement: a boolean (0 or 1) (optional, default: 0)

Number Base

base(Number, Base[, Set of digits])

Returns a value from an expression using the specified number base (radix). For bases between -62 and 62 full mathematical expressions (including operators and functions) are supported, while for other bases the specified expression is converted to a single number.

Bases ≤ 36 use digits 0-9 and A-Z (case insensitive).

Bases between 37 and 62 uses case sensitive letters (0-9, A-Z, a-z) as digits ('z' equals 61).

Bases over 62 use Unicode characters as digits, with the character code as value (e.g. '0' equals 48). Escaped characters are in this case supported (e.g. '\0' = 0, '\523' = 523, '\x7f' = 127).

Negative bases use the same digits as the corresponding positive bases and the digits used for non-integer bases are determined by rounding the base away from zero. Bases that are not real numbers by default use digits 0-9 and A-Z.

The set of digits used can be selected using the third argument (defaults to 0 for automatic selection). Set it to 1 for digits 0-9 and A-Z, 2 for 0-9, A-Z and a-z, 3 for Unicode digits, and 4 for phonewords (e.g. ABC=2, CDE=3, etc.), or enter a text string with all digits placed in ascending order (e.g. "0123456789") and optionally separated by semicolon (to enable multple equivalent digits, e.g. "0;aA1;bB2;cC3"). When the set of digits is manually selected, the specified expression is always converted to a single number.

Arguments. 

  • Number: a text string

  • Base: a free value

  • Set of digits: a text string (optional, default: 0)

Octal

oct(Octal number)

Returns a value from an octal expression.

Arguments. 

  • Octal number: a text string

Polynomials

Coefficient

coeff(Polynomial, Number[, Variable])

Arguments. 

  • Polynomial: a free value that is rational (polynomial)

  • Number: an integer ≥ 0

  • Variable: an unknown variable/symbol (optional, default: undefined)

Content Part

pcontent(Polynomial[, Variable])

Arguments. 

  • Polynomial: a free value that is rational (polynomial)

  • Variable: an unknown variable/symbol (optional, default: undefined)

Leading Coefficient

lcoeff(Polynomial[, Variable])

Arguments. 

  • Polynomial: a free value that is rational (polynomial)

  • Variable: an unknown variable/symbol (optional, default: undefined)

Lowest Degree (Valuation)

ldegree(Polynomial[, Variable])

Arguments. 

  • Polynomial: a free value that is rational (polynomial)

  • Variable: an unknown variable/symbol (optional, default: undefined)

Polynomial Degree

degree(Polynomial[, Variable])

Arguments. 

  • Polynomial: a free value that is rational (polynomial)

  • Variable: an unknown variable/symbol (optional, default: undefined)

Primitive Part

primpart(Polynomial[, Variable])

Arguments. 

  • Polynomial: a free value that is rational (polynomial)

  • Variable: an unknown variable/symbol (optional, default: undefined)

Trailing Coefficient

tcoeff(Polynomial[, Variable])

Arguments. 

  • Polynomial: a free value that is rational (polynomial)

  • Variable: an unknown variable/symbol (optional, default: undefined)

Unit Part

punit(Polynomial[, Variable])

Arguments. 

  • Polynomial: a free value that is rational (polynomial)

  • Variable: an unknown variable/symbol (optional, default: undefined)

Prime Numbers

Is Prime Number

isprime(Value)

Arguments. 

  • Value: an integer ≥ 0

Next Prime Number

nextprime(Value)

Returns the next prime number greater than or equal to the specified number.

Arguments. 

  • Value: a number ≥ 0

Nth Prime Number

nthprime(Index (n))

Arguments. 

  • Index (n): an integer ≥ 1 and ≤ 1000000000

Previous Prime Number

prevprime(Value)

Returns the largest prime number smaller than or equal to the specified number.

Arguments. 

  • Value: a number ≥ 2

Prime Counting Function

primePi(Value)

primeπ

prime_pi

Returns the number of prime numbers less than or equal to the specified number.

Arguments. 

  • Value: a number ≥ 0

Prime Numbers Less Than or Equal

primes(Value)

Returns a vector containing all the prime numbers less than or equal to the specified number.

Arguments. 

  • Value: a number ≥ 1 and ≤ 1299709

Rounding

Clip

clip(Value[, Lower bound][, Upper bound])

Clips or limits the input value to be between the lower and upper bounds.

Arguments. 

  • Value: a free value

  • Lower bound: a real number (optional, default: -infinity)

  • Upper bound: a real number (optional, default: infinity)

Requirement.  "Lower bound"≤"Upper bound"

Fractional Part

frac(Value)

Arguments. 

  • Value: a real number

Get Digit

digitGet(Number, Position[, Base])

numberDigit

Returns digit at specified position (index of first digit left of decimal sign is zero).

Arguments. 

  • Number: a real number

  • Position: an integer

  • Base: an integer ≥ 2 (optional, default: 10)

Integer Digits

integerDigits(Number[, Base][, Length])

Arguments. 

  • Number: an integer

  • Base: an integer ≥ 2 (optional, default: 10)

  • Length: an integer ≥ -1 and ≤ 9223372036854775807 (optional, default: -1)

Integer Part

int(Value)

Arguments. 

  • Value: a real number

Round

round(Value[, Number of decimals][, Rounding method])

Round to nearest integer or decimal. If the second argument is zero, the value is rounded towards the nearest integer, otherwise the value is rounded to the corresponding number of digits to the right (if positive) or left (if negative) of the decimal point.

Available rounding methods (3rd argument): half away from zero (0), half to even (1), half to odd (2), half toward zero (3), half up (4), half down (5), half random (6), toward zero (7), away from zero (8), up (9), down (10)

Arguments. 

  • Value: a real number

  • Number of decimals: an integer (optional, default: 0)

  • Rounding method: an integer ≥ 0 and ≤ 10 (optional, default: 0)

Round Downwards

floor(Value)

Arguments. 

  • Value: a real number

Round Towards Zero

trunc(Value)

Arguments. 

  • Value: a real number

Round Upwards

ceil(Value)

Arguments. 

  • Value: a real number

Set Digit

digitSet(Number, Position, Value[, Base])

Sets the digit at specified position (index of first digit left of decimal sign is zero).

Arguments. 

  • Number: a real number

  • Position: an integer

  • Value: an integer ≥ 0

  • Base: an integer ≥ 2 (optional, default: 10)

Special Functions

Airy Function

airy(argument)

Arguments. 

  • 1: a number ≥ -500 and ≤ 500

Bessel Function of the First Kind

besselj(Order, Argument)

Arguments. 

  • Order: an integer ≥ -9223372036854775808 and ≤ 9223372036854775807

  • Argument: a real number

Bessel Function of the Second Kind

bessely(Order, Argument)

Arguments. 

  • Order: an integer ≥ -9223372036854775808 and ≤ 1000

  • Argument: a real number

Beta Function

beta(argument 1, argument 2)

Arguments. 

  • 1: a number

  • 2: a number

Complementary Error Function

erfc(argument)

Arguments. 

  • 1: a number

Digamma Function

digamma(argument)

psi

Arguments. 

  • 1: a real number

Error Function

erf(argument)

Arguments. 

  • 1: a number

Gamma Function

gamma(argument)

Arguments. 

  • 1: a real number

Imaginary Error Function

erfi(argument)

Arguments. 

  • 1: a number

Inverse Error Function

erfinv(argument)

Arguments. 

  • 1: a number ≥ -1 and ≤ 1

Kronecker Delta

kronecker(Value 1 (i)[, Value 2 (j)])

kroneckerDelta

Returns 0 if i ≠ j and 1 if i = j.

Arguments. 

  • Value 1 (i): a real number

  • Value 2 (j): a real number (optional, default: 0)

Logit Transformation

logit(Value)

Arguments. 

  • Value: a number

Polylogarithm

Li(Order, Argument)

polylog

Arguments. 

  • Order: a number

  • Argument: a number

Probit Function

probit(Value)

Arguments. 

  • Value: a number ≥ 0 and ≤ 1

Riemann Zeta

zeta(Integral point[, Hurwitz zeta argument])

Calculates Hurwitz zeta function if the second argument is not 1.

Arguments. 

  • Integral point: a number

  • Hurwitz zeta argument: a number (optional, default: 1)

Sigmoid Function

sigmoid(Value)

Arguments. 

  • Value: a number

Step Functions

Dirac Delta Function

dirac(argument)

δ

Returns 0 if x is non-zero, and infinity if x is zero.

Arguments. 

  • 1: a real number

Heaviside Step Function

heaviside(argument)

θ

Discontinuous function also known as "unit step function". Returns 0 if x < 0, 1 if x > 0, and 1/2 if x = 0.

Arguments. 

  • 1: a real number

Ramp Function

ramp(Value)

Arguments. 

  • Value: a real number

Rectangular Function

rectangular(Value)

Arguments. 

  • Value: a real number

Triangular Function

triangular(Value)

Arguments. 

  • Value: a real number

Statistics

Correlation

Pearson's Correlation Coefficient

pearson(Data 1, Data 2)

correl

Arguments. 

  • Data 1: a vector

  • Data 2: a vector

Requirement.  dimension("Data 1")=dimension("Data 2")

Spearman's Rho

spearman(Data 1, Data 2)

Arguments. 

  • Data 1: a vector

  • Data 2: a vector

Requirement.  dimension("Data 1")=dimension("Data 2")

Statistical Correlation

cor(Data 1, Data 2)

Arguments. 

  • Data 1: a vector

  • Data 2: a vector

Descriptive Statistics

Decile

decile(Data, Decile[, Quantile Algorithm (as in R)])

Arguments. 

  • Data: a vector

  • Decile: an integer ≥ 0 and ≤ 10

  • Quantile Algorithm (as in R): an integer ≥ 1 and ≤ 9 (optional, default: 8)

Interquartile Range

iqr(Data[, Quantile Algorithm (as in R)])

Calculates the difference between the first and third quartile.

Arguments. 

  • Data: a vector

  • Quantile Algorithm (as in R): an integer ≥ 1 and ≤ 9 (optional, default: 8)

Max

max(Vector)

Returns the highest value.

Arguments. 

  • Vector: a vector

Median

median(Data)

Arguments. 

  • Data: a vector

Min

min(Vector)

Returns the lowest value.

Arguments. 

  • Vector: a vector

Mode

mode(Vector)

Returns the most frequently occurring value.

Arguments. 

  • Vector: a vector

Number of Samples

number(Data)

Returns the number of samples.

Arguments. 

  • Data: a vector

Percentile

percentile(Vector, Percentile (%)[, Quantile algorithm (as in R)])

Arguments. 

  • Vector: a vector

  • Percentile (%): a number ≥ 0 and ≤ 100

  • Quantile algorithm (as in R): an integer ≥ 1 and ≤ 9 (optional, default: 8)

Quartile

quartile(Data, Quartile[, Quantile Algorithm (as in R)])

Arguments. 

  • Data: a vector

  • Quartile: an integer ≥ 0 and ≤ 4

  • Quantile Algorithm (as in R): an integer ≥ 1 and ≤ 9 (optional, default: 8)

Range

range(Data)

Calculates the difference between the min and max value.

Arguments. 

  • Data: a vector

Sum (total)

total(Data)

add

Arguments. 

  • Data: a vector

Distribution

Beta Distribution

betadist(X, Shape (α), Shape (β)[, Cumulative])

Returns the probability density or cumulative distribution function of the beta distribution.

Arguments. 

  • X: a number ≥ 0 and ≤ 1

  • Shape (α): a number > 0

  • Shape (β): a number > 0

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Binomial Distribution

binomdist(Number of successes (k), Number of trials (n), Probability (p)[, Cumulative])

Returns the probability mass or cumulative distribution function of the binomial distribution.

Arguments. 

  • Number of successes (k): an integer ≥ 0

  • Number of trials (n): an integer ≥ 0

  • Probability (p): a number ≥ 0 and ≤ 1

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Cauchy Distribution

cauchydist(X, Location (x_0), Scale (γ)[, Cumulative])

Returns the probability density or cumulative distribution function of the Cauchy distribution.

Arguments. 

  • X: a number ≥ 0

  • Location (x_0): a number

  • Scale (γ): a number > 0

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Chi-Square Distribution

chisqdist(X, Degrees of freedom (k)[, Cumulative])

Returns the probability density or cumulative distribution function of the chi-square distribution.

Arguments. 

  • X: a number ≥ 0

  • Degrees of freedom (k): an integer ≥ 1

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Exponential Distribution

expondist(X, Rate (λ)[, Cumulative])

Returns the probability density or cumulative distribution function of the exponential distribution.

Arguments. 

  • X: a number ≥ 0

  • Rate (λ): a number > 0

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Exponential Inverse Cumulative Distribution

expinv(P, Rate (λ))

Arguments. 

  • P: a number ≥ 0 and ≤ 1

  • Rate (λ): a number ≥ 0

F-distribution

fdist(X, Degrees of freedom (numerator), Degrees of freedom (denominator)[, Cumulative])

Returns the probability density or cumulative distribution function of the F-distribution.

Arguments. 

  • X: a number ≥ 0

  • Degrees of freedom (numerator): an integer ≥ 1

  • Degrees of freedom (denominator): an integer ≥ 1

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Gamma Distribution

gammadist(X, Shape (k), Scale (θ)[, Cumulative])

Returns the probability density or cumulative distribution function of the gamma distribution.

Arguments. 

  • X: a number ≥ 0

  • Shape (k): a number > 0

  • Scale (θ): a number > 0

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Inverse Cumulative F-distribution

fdistinv(P, Degrees of freedom (numerator), Degrees of freedom (denominator))

Arguments. 

  • P: a number ≥ 0 and ≤ 1

  • Degrees of freedom (numerator): an integer ≥ 1

  • Degrees of freedom (denominator): an integer ≥ 1

Inverse Cumulative Student's t-distribution

tdistinv(P, Degrees of freedom (v))

Arguments. 

  • P: a number ≥ 0 and ≤ 1

  • Degrees of freedom (v): a number ≥ 1

Inverse Normal Cumulative Distribution

normdistinv(P[, Mean (μ)][, Standard deviation (σ)])

Arguments. 

  • P: a number ≥ 0 and ≤ 1

  • Mean (μ): a free value (optional, default: 0)

  • Standard deviation (σ): a free value that fulfills the condition: "Standard deviation (σ)^2>0" (optional, default: 1)

Inverse of Chi-Square Cumulative Distribution

chisqdistinv(P, Degrees of freedom (k))

Arguments. 

  • P: a number ≥ 0 and ≤ 1

  • Degrees of freedom (k): an integer ≥ 1

Logistic Distribution

logistic(X, Scale (s)[, Location (μ)][, Cumulative])

Returns the probability density or cumulative distribution function of the logistic distribution.

Arguments. 

  • X: a free value

  • Scale (s): a number > 0

  • Location (μ): a number (optional, default: 0)

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Normal Distribution

normdist(X[, Mean (μ)][, Standard deviation (σ)][, Cumulative])

Returns the probability density or cumulative distribution function of the normal distribution.

Arguments. 

  • X: a free value

  • Mean (μ): a free value (optional, default: 0)

  • Standard deviation (σ): a free value that fulfills the condition: "Standard deviation (σ)^2>0" (optional, default: 1)

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Pareto Distribution

pareto(X, Shape (α), Scale (x_m)[, Cumulative])

Returns the probability density or cumulative distribution function of the Pareto distribution.

Arguments. 

  • X: a free value

  • Shape (α): a number > 0

  • Scale (x_m): a number > 0

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Requirement.  "X"≥"Scale (x_m)"

Poisson Distribution

poisson(X, Rate (λ)[, Cumulative])

Returns the probability density or cumulative distribution function of the Poisson distribution.

Arguments. 

  • X: an integer ≥ 0

  • Rate (λ): a number > 0

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Rayleigh Distribution

rayleigh(X, Scale (σ)[, Cumulative])

Returns the probability density or cumulative distribution function of the Rayleigh distribution.

Arguments. 

  • X: a number ≥ 0

  • Scale (σ): a number > 0

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Rayleigh Tail Distribution

rayleightail(X, Lower limit, Scale (σ))

Returns the probability density p(x) at x for a Rayleigh tail distribution with scale parameter sigma and a lower limit. (from Gnumeric)

Arguments. 

  • X: a free value

  • Lower limit: a free value

  • Scale (σ): a number ≥ 0

Student's t-distribution

tdist(X, Degrees of freedom (v)[, Cumulative])

Returns the probability density or cumulative distribution function of the Student's t distribution.

Arguments. 

  • X: a number

  • Degrees of freedom (v): a number ≥ 1

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Weibull Distribution

weibulldist(X, Scale (λ), Shape (k)[, Cumulative])

Returns the probability density or cumulative distribution function of the Weibull distribution.

Arguments. 

  • X: a number ≥ 0

  • Scale (λ): a number > 0

  • Shape (k): a number > 0

  • Cumulative: a boolean (0 or 1) (optional, default: 0)

Weibull Inverse Cumulative Distribution

wblinv(P, Scale (λ), Shape (k))

Arguments. 

  • P: a number ≥ 0 and ≤ 1

  • Scale (λ): a number > 0

  • Shape (k): a number > 0

Means

Geometric Mean

geomean(Data)

Arguments. 

  • Data: a vector

Harmonic Mean

harmmean(Data)

Arguments. 

  • Data: a vector

Mean

mean(Data)

average

Arguments. 

  • Data: a vector

Quadratic Mean (RMS)

rms(Data)

Arguments. 

  • Data: a vector

Trimmed Mean

trimmean(Data, Trimmed percentage (at each end))

Arguments. 

  • Data: a vector

  • Trimmed percentage (at each end): a free value

Weighted Mean

weighmean(Data, Weights)

Arguments. 

  • Data: a vector

  • Weights: a vector

Winsorized Mean

winsormean(Data, Winsorized percentage (at each end))

Arguments. 

  • Data: a vector

  • Winsorized percentage (at each end): a free value

Moments

Covariance

cov(Data 1, Data 2)

covar

Arguments. 

  • Data 1: a vector

  • Data 2: a vector

Mean Deviation

meandev(Data)

Arguments. 

  • Data: a vector

Pooled Variance

poolvar(Data 1, Data 2)

Arguments. 

  • Data 1: a vector

  • Data 2: a vector

Standard Deviation (entire population)

stdevp(Data)

Arguments. 

  • Data: a vector

Standard Deviation (random sampling)

stdev(Data)

Arguments. 

  • Data: a vector

Standard Error

stderr(Data)

Arguments. 

  • Data: a vector

Variance (entire population)

varp(Data)

Arguments. 

  • Data: a vector

Variance (random sampling)

var(Data)

Arguments. 

  • Data: a vector

Random Numbers

Exponential Random Number

randexp(Rate parameter[, Number of values])

Arguments. 

  • Rate parameter: a number ≥ 0

  • Number of values: an integer ≥ 1 (optional, default: 1)

Normally Distributed Random Number

randnorm([Mean][, Standard deviation][, Number of values])

Arguments. 

  • Mean: a free value (optional, default: 0)

  • Standard deviation: a free value (optional, default: 1)

  • Number of values: an integer ≥ 1 and ≤ 10000000 (optional, default: 1)

Poisson Distributed Random Number

randpoisson(Rate (λ)[, Number of values])

Arguments. 

  • Rate (λ): an integer ≥ 1

  • Number of values: an integer ≥ 1 and ≤ 10000000 (optional, default: 1)

Random Number

rand([Ceil][, Number of values])

Generates a pseudo-random number. Returns a real number between 0 and 1, if ceil is zero (default), or an integer between 1 and (including) ceil.

Arguments. 

  • Ceil: an integer (optional, default: 0)

  • Number of values: an integer ≥ 1 and ≤ 10000000 (optional, default: 1)

Random Number Between Limits

randbetween(Bottom, Top[, Number of values])

Returns an integer between (including) bottom and top.

Arguments. 

  • Bottom: an integer

  • Top: an integer

  • Number of values: an integer ≥ 1 (optional, default: 1)

Requirement.  "Bottom"≤"Top"

Rayleigh Distributed Random Number

randrayleigh(Sigma[, Number of values])

Arguments. 

  • Sigma: a number ≥ 0

  • Number of values: an integer ≥ 1 (optional, default: 1)

Uniformly Distributed Random Number

randuniform(Lower limit, Upper limit[, Number of values])

Arguments. 

  • Lower limit: a real number

  • Upper limit: a real number

  • Number of values: an integer ≥ 1 (optional, default: 1)

Requirement.  "Lower limit"≤"Upper limit"

Regression

Cubic Fit

cubicfit(X Values[, Y Values])

Fit data to a polynomial of degree 3, using least-squares method. If the vector of y values is empty, the first argument is used for sequential y values (with x values 1, 2, ..., n). It is possible to pass both x and y values in a two column matrix as the first argument.

Arguments. 

  • X Values: a vector

  • Y Values: a vector (optional, default: [])

Requirement.  dimension("X Values")=dimension("Y Values") || dimension("Y Values")=0

Quadratic Fit

quadraticfit(X Values[, Y Values])

Fit data to a polynomial of degree 2, using least-squares method. If the vector of y values is empty, the first argument is used for sequential y values (with x values 1, 2, ..., n). It is possible to pass both x and y values in a two column matrix as the first argument.

Arguments. 

  • X Values: a vector

  • Y Values: a vector (optional, default: [])

Requirement.  dimension("X Values")=dimension("Y Values") || dimension("Y Values")=0

Simple Linear Fit

linearfit(X Values[, Y Values])

Returns the linear function, for a set of x and y values, estimated using simple linear regression with a single explanatory variable using the ordinary least squares method. If the vector of y values is empty, the first argument is used for sequential y values (with x values 1, 2, ..., n). It is possible to pass both x and y values in a two column matrix as the first argument.

Arguments. 

  • X Values: a vector

  • Y Values: a vector (optional, default: [])

Requirement.  dimension("X Values")=dimension("Y Values") || dimension("Y Values")=0

Statistical Tests

Paired T-Test

pttest(Data 1, Data 2)

Arguments. 

  • Data 1: a vector

  • Data 2: a vector

Unpaired T-Test

ttest(Data 1, Data 2)

Arguments. 

  • Data 1: a vector

  • Data 2: a vector

Trigonometry

Cardinal Sine (Sinc Function)

sinc(argument)

Arguments. 

  • 1: a number

Cosecant

csc(Angle)

Arguments. 

  • Angle: an angle or a number (using the default angle unit)

Cosine

cos(Angle)

Arguments. 

  • Angle: an angle or a number (using the default angle unit)

Cotangent

cot(Angle)

Arguments. 

  • Angle: an angle or a number (using the default angle unit)

Default Angle Unit to Radians

deftorad(Value)

Arguments. 

  • Value: a free value

Four-quadrant Inverse Tangent

atan2(Y, X)

arctan2

Computes the principal value of the argument function applied to the complex number x+iy.

Arguments. 

  • Y: a real number

  • X: a real number

Hyperbolic Cosecant

csch(argument)

Arguments. 

  • 1: a number

Hyperbolic Cosine

cosh(argument)

Arguments. 

  • 1: a number

Hyperbolic Cotangent

coth(argument)

Arguments. 

  • 1: a number

Hyperbolic Secant

sech(argument)

Arguments. 

  • 1: a number

Hyperbolic Sine

sinh(argument)

Arguments. 

  • 1: a number

Hyperbolic Tangent

tanh(argument)

Arguments. 

  • 1: a number

Inverse Cosecant

arccsc(argument)

acsc

Arguments. 

  • 1: a number

Inverse Cosine

arccos(argument)

acos

Arguments. 

  • 1: a number

Inverse Cotangent

arccot(argument)

acot

Arguments. 

  • 1: a number

Inverse Hyperbolic Cosecant

arcsch(argument)

acsch

Arguments. 

  • 1: a number

Inverse Hyperbolic Cosine

arcosh(argument)

acosh

Arguments. 

  • 1: a number

Inverse Hyperbolic Cotangent

arcoth(argument)

acoth

Arguments. 

  • 1: a number

Inverse Hyperbolic Secant

arsech(argument)

asech

Arguments. 

  • 1: a number

Inverse Hyperbolic Sine

arsinh(argument)

asinh

Arguments. 

  • 1: a number

Inverse Hyperbolic Tangent

artanh(argument)

atanh

Arguments. 

  • 1: a number

Inverse Secant

arcsec(argument)

asec

Arguments. 

  • 1: a number

Inverse Sine

arcsin(argument)

asin

Arguments. 

  • 1: a number

Inverse Tangent

arctan(argument)

atan

Arguments. 

  • 1: a number

Radians to Default Angle Unit

radtodef(Radians)

Arguments. 

  • Radians: a free value

Secant

sec(Angle)

Arguments. 

  • Angle: an angle or a number (using the default angle unit)

Sine

sin(Angle)

Arguments. 

  • Angle: an angle or a number (using the default angle unit)

Tangent

tan(Angle)

Arguments. 

  • Angle: an angle or a number (using the default angle unit)

Utilities

Concatenate Strings

concatenate(Text string 1[, Text string 2], ...)

Arguments. 

  • Text string 1: a text string

  • Text string 2: a text string (optional)

Custom Sum of Elements

csum(First element, Last element, Initial value, Function, Element variable, Value variable, Vector[, Index variable][, Vector variable])

Arguments. 

  • First element: an integer ≥ 1 and ≤ 2147483647

  • Last element: an integer ≥ -2147483648 and ≤ 2147483647

  • Initial value: a free value

  • Function: a free value

  • Element variable: an unknown variable/symbol

  • Value variable: an unknown variable/symbol

  • Vector: a vector

  • Index variable: an unknown variable/symbol (optional)

  • Vector variable: an unknown variable/symbol (optional)

Display Error

error(Message)

Arguments. 

  • Message: a text string

Display Message

message(Message)

Arguments. 

  • Message: a text string

Display Warning

warning(Message)

Arguments. 

  • Message: a text string

External Command

command(Command[, Argument], ...)

Arguments. 

  • Command: a text string

  • Argument: a free value (optional)

Function

function(Expression, Arguments)

Arguments. 

  • Expression: a text string

  • Arguments: a vector

Is Integer

isInteger(Value)

Returns true if evaluated argument value is explicitely an integer (has integer type).

Example: isInteger(5 + 2) = 1; isInteger(x) = 0; isInteger(log(0.2, 5)) = 0

Arguments. 

  • Value: a free value

Is Number

isNumber(Value)

Returns true if evaluated argument value is explicitely a real, complex, or infinite number (has number type).

Arguments. 

  • Value: a free value

Is Rational

isRational(Value)

Returns true if evaluated argument value is explicitely a rational number (has rational type).

Arguments. 

  • Value: a free value

Is Real

isReal(Value)

Returns true if evaluated argument value is explicitely a real number (has number type with zero complex part).

Arguments. 

  • Value: a free value

Length of string

len(Text)

Arguments. 

  • Text: a text string

Plot Functions and Vectors

plot(Expression or vector[, Minimum x value][, Maximum x value][, Options], ...)

Plots one or more expressions or vectors. Use a vector for the first argument to plot multiple series. Only the first argument is used for vector series. It is also possible to plot a matrix where each row is a pair of x and y values.

Additional arguments specify various plot options. Enter the name of the option and the desired value, either separated by space or as separate arguments. For most options, the value can be omitted to enable a default active value. For options with named values, the option name can be omitted (otherwise the value can be replaced by an integer, representing the index of the value starting from zero). If the first option specified is a numerical value, this is interpreted as either sampling rate (for integers > 10) or step value.

List of options:

samples

step

variable / var (x, y, z, ...)

style (lines / lines, points / points, linespoints / linespoints, boxes / boxes, histogram / histogram, steps / steps, candlesticks / candlesticks, dots / dots, polar / polar)

smooth (none / none, splines / splines, bezier / bezier)

ymin

ymax

xlog

ylog

complex (0, 1)

grid

linewidth / lw

legend / key (none / none, top-left / top-left, top-right / top-right, bottom-left / bottom-left, bottom-right / bottom-right, below / below, outside / outside)

title

xlabel

ylabel

Arguments. 

  • Expression or vector: a free value

  • Minimum x value: a real number (optional, default: 0)

  • Maximum x value: a real number (optional, default: 10)

  • Options: a text string (optional)

Requirement.  "Minimum x value" < "Maximum x value"

Process Matrix Elements

processm(Function, Element variable, Matrix[, Row variable][, Column variable][, Matrix variable])

Arguments. 

  • Function: a free value

  • Element variable: an unknown variable/symbol

  • Matrix: a matrix

  • Row variable: an unknown variable/symbol (optional)

  • Column variable: an unknown variable/symbol (optional)

  • Matrix variable: an unknown variable/symbol (optional)

Process Vector Elements

process(Function, Element variable, Vector[, Index variable][, Vector variable])

Arguments. 

  • Function: a free value

  • Element variable: an unknown variable/symbol

  • Vector: a vector

  • Index variable: an unknown variable/symbol (optional)

  • Vector variable: an unknown variable/symbol (optional)

RPN Stack Register

register(Index)

Returns the value of a RPN stack register.

Arguments. 

  • Index: an integer ≥ 1 and ≤ 4294967295

RPN Stack Vector

stack()

Returns the RPN stack as a vector.

Replace

replace(Expression, Original value, New value[, Precalculate expression])

Replaces a certain value in an expression with a new value. The expression is calculated before the replacement if the fourth argument is true.

Arguments. 

  • Expression: a free value

  • Original value: a free value

  • New value: a free value

  • Precalculate expression: a boolean (0 or 1) (optional, default: 0)

Represents Integer

representsInteger(Value)

Returns true if value is or represents an integer. False negatives are allowed.

Example: representsInteger(2n) = 1; representsInteger(log(0.2, 5)) = 0

Arguments. 

  • Value: a free value

Represents Number

representsNumber(Value)

Returns true if value is or represents a number (scalar without unit). False negatives are allowed.

Arguments. 

  • Value: a free value

Represents Rational

representsRational(Value)

Returns true if value is or represents a rational number. False negatives are allowed.

Arguments. 

  • Value: a free value

Represents Real

representsReal(Value)

Returns true if value is or represents a real number. False negatives are allowed.

Arguments. 

  • Value: a free value

Save as Variable or Function

save(Value, Name[, Category][, Title][, Precalculate expression])

Stores a value in a variable or saves an expression as a function.

A function is created if the name includes parentheses (e.g. "f()"). Optionally the function arguments can be specified in the name (e.g. "save(a+b,f(a,b))"). Otherwise the function arguments are expected to be referred to in the expression using \x, \y, \z ,\a , \b..., or x, y, z (e.g. "save(x+y,f())").

If a function was created, the processed function expression is returned as a text string, otherwise the value is returned.

The ":=" operator (e.g. var1:=10) is a shortcut for this function.

Arguments. 

  • Value: a free value

  • Name: a text string

  • Category: a text string (optional, default: Temporary)

  • Title: a text string (optional)

  • Precalculate expression: a boolean (0 or 1) (optional, default: 0)

Select Vector Elements

select(Vector, Condition[, Element variable][, Select first match])

Arguments. 

  • Vector: a vector

  • Condition: a free value

  • Element variable: an unknown variable/symbol (optional, default: undefined)

  • Select first match: a boolean (0 or 1) (optional, default: 0)

Strip Units

nounit(Expression)

stripUnits

Removes all units from an expression. No unit conversion or prefix changes are performed before the removal.

Example: nounit(5 km) = 5; nounit(5 m + 2 ft) = 7

Arguments. 

  • Expression: a free value

Title

title(Name)

Arguments. 

  • Name: a valid function, unit or variable name

Unicode Character

char(Value)

Arguments. 

  • Value: an integer ≥ 32 and ≤ 1114111

Unicode Value

code(Character[, Encoding][, Use vector])

Encodes a Unicode character or text string using the selected format. Supported encodings are UTF-8 (0), UTF-16 (1), and UTF-32 (2). If the third argument is true, each separate code unit (8, 16, or 32 bits depending on encoding) is placed in a vector.

Arguments. 

  • Character: a text string

  • Encoding: a text string (optional, default: UTF-32)

  • Use vector: a boolean (0 or 1) (optional, default: 1)

Intervals & Uncertainties

Get Uncertainty

errorPart(Value[, Uncertainty is relative])

Returns the absolute (default) or relative uncertainty/error of a numerical value.

Arguments. 

  • Value: a number

  • Uncertainty is relative: a boolean (0 or 1) (optional, default: 0)

Interval

interval(Lower endpoint, Upper endpoint)

Returns a closed interval with the specified endpoints.

Arguments. 

  • Lower endpoint: a number

  • Upper endpoint: a number

Lower Endpoint (interval)

lowerEndpoint(Value)

Returns the lower endpoint of a numerical interval.

Arguments. 

  • Value: a number

Midpoint (interval)

midpoint(Value)

valuePart

Returns the midpoint between the endpoints of a numerical interval, or the value part of a value with uncertainty/error.

Arguments. 

  • Value: a number

Uncertainty

uncertainty(Value, Uncertainty[, Uncertainty is relative])

Specifies the absolute or relative (default) uncertainty/error of a value.

Arguments. 

  • Value: a number

  • Uncertainty: a number

  • Uncertainty is relative: a boolean (0 or 1) (optional, default: 1)

Upper Endpoint (interval)

upperEndpoint(Value)

Returns the upper endpoint of a numerical interval.

Arguments. 

  • Value: a number