math

meth (X: complex) ^ (Y: integer): number

Returns X raised to the power of Y.

(1 + 2i) ^ 2 :> -3 + 4i
meth (X: complex) ^ (Y: number): number

Returns X raised to the power of Y.

(1 + 2i) ^ (2 + 3i)
:> -0.0151326724227227 - 0.179867483913335i
meth (Z: complex):abs: real

Returns the absolute value (magnitude) of Z.

meth (Z: complex):arg: real

Returns the complex argument of Z.

meth (Z: complex):conj: real

Returns the complex conjugate of Z.

meth math::acos(Arg₁: complex): complex

Returns acos(Arg₁).

math::acos(1.2345 + 6.789i)
:> 1.39274491905556 - 2.62959948793467i
math::acos(-1.2345 + 6.789i)
:> 1.74884773453423 - 2.62959948793467i
meth math::acosh(Arg₁: complex): complex

Returns acosh(Arg₁).

math::acosh(1.2345 + 6.789i)
:> 2.62959948793467 + 1.39274491905556i
math::acosh(-1.2345 + 6.789i)
:> 2.62959948793467 + 1.74884773453423i
meth math::asin(Arg₁: complex): complex

Returns asin(Arg₁).

math::asin(1.2345 + 6.789i)
:> 0.178051407739337 + 2.62959948793467i
math::asin(-1.2345 + 6.789i)
:> -0.178051407739337 + 2.62959948793467i
meth math::asinh(Arg₁: complex): complex

Returns asinh(Arg₁).

math::asinh(1.2345 + 6.789i)
:> 2.61977023992049 + 1.38904733381322i
math::asinh(-1.2345 + 6.789i)
:> -2.61977023992049 + 1.38904733381322i
meth math::atan(Arg₁: complex): complex

Returns atan(Arg₁).

math::atan(1.2345 + 6.789i)
:> 1.54433788133329 + 0.143460974564643i
math::atan(-1.2345 + 6.789i)
:> -1.54433788133329 + 0.143460974564643i
meth math::atanh(Arg₁: complex): complex

Returns atanh(Arg₁).

math::atanh(1.2345 + 6.789i)
:> 0.0254155192875644 + 1.42907622916881i
math::atanh(-1.2345 + 6.789i)
:> -0.0254155192875644 + 1.42907622916881i
meth math::cos(Arg₁: complex): complex

Returns cos(Arg₁).

math::cos(1.2345 + 6.789i)
:> 146.521288000429 - 419.139907811584i
math::cos(-1.2345 + 6.789i)
:> 146.521288000429 + 419.139907811584i
meth math::cosh(Arg₁: complex): complex

Returns cosh(Arg₁).

math::cosh(1.2345 + 6.789i)
:> 1.63043250480246 + 0.762072763912413i
math::cosh(-1.2345 + 6.789i)
:> 1.63043250480246 - 0.762072763912413i
meth math::exp(Arg₁: complex): complex

Returns exp(Arg₁).

math::exp(1.2345 + 6.789i)
:> 3.00632132754822 + 1.66513134304082i
math::exp(-1.2345 + 6.789i)
:> 0.254543682056692 + 0.140985815215994i
meth math::log(Arg₁: complex): complex

Returns log(Arg₁).

math::log(1.2345 + 6.789i)
:> 1.93156878648542 + 1.39092338385419i
math::log(-1.2345 + 6.789i)
:> 1.93156878648542 + 1.75066926973561i
meth math::log10(Arg₁: complex): complex

Returns log10(Arg₁).

math::log10(1.2345 + 6.789i)
:> 0.838869665387177 + 0.604070350358072i
math::log10(-1.2345 + 6.789i)
:> 0.838869665387177 + 0.76030600348377i
meth math::sin(Arg₁: complex): complex

Returns sin(Arg₁).

math::sin(1.2345 + 6.789i)
:> 419.14097082583 + 146.520916397013i
math::sin(-1.2345 + 6.789i)
:> -419.14097082583 + 146.520916397013i
meth math::sinh(Arg₁: complex): complex

Returns sinh(Arg₁).

math::sinh(1.2345 + 6.789i)
:> 1.37588882274576 + 0.903058579128407i
math::sinh(-1.2345 + 6.789i)
:> -1.37588882274576 + 0.903058579128407i
meth math::sqrt(Arg₁: complex): complex

Returns sqrt(Arg₁).

math::sqrt(1.2345 + 6.789i)
:> 2.01678294499314 + 1.68312609367665i
math::sqrt(-1.2345 + 6.789i)
:> 1.68312609367665 + 2.01678294499314i
meth math::square(C: complex): complex

Returns C * C

math::square(1 + 2i) :> -3 + 4i
meth math::tan(Arg₁: complex): complex

Returns tan(Arg₁).

math::tan(1.2345 + 6.789i)
:> 1.58008203338542e-06 + 1.0000019838211i
math::tan(-1.2345 + 6.789i)
:> -1.58008203338542e-06 + 1.0000019838211i
meth math::tanh(Arg₁: complex): complex

Returns tanh(Arg₁).

math::tanh(1.2345 + 6.789i)
:> 0.905042091321087 + 0.130855248843389i
math::tanh(-1.2345 + 6.789i)
:> -0.905042091321087 + 0.130855248843389i
fun random::seed(Arg₁: integer)

TBD

meth !(N: integer): integer

Returns the factorial of N.

!10 :> 3628800
meth (N: integer) ! (R: integer): integer

Returns the number of ways of choosing R elements from N.

meth (X: integer) ^ (Y: integer): number

Returns X raised to the power of Y.

let N := 2 ^ 2 :> 4
type(N) :> <<int32>>
let R := 2 ^ -1 :> 0.5
type(R) :> <<double>>
meth (N: integer):abs: integer

Returns the absolute value of N.

meth (N: integer):floor: integer

Returns the floor of N (= N for an integer).

meth (A: integer):gcd(B: integer): integer

Returns the greatest common divisor of A and B.

meth math::sqrt(Arg₁: integer): integer | real

Returns the square root of Arg₁.

meth math::square(N: integer): integer

Returns N * N

math::square(10) :> 100
def math::pi: real

Pi.

def math::e: real

Euler's constant.

meth (X: number) ^ (Y: complex): number

Returns X raised to the power of Y.

2.3 ^ (1 + 2i) :> -0.218221674358723 + 2.28962427066977i
type random < function

TBD

meth (X: real) % (Y: real): real

Returns the remainder of X on division by Y.

meth (X: real) ^ (Y: integer): number

Returns X raised to the power of Y.

2.3 ^ 2 :> 5.29
meth (X: real) ^ (Y: real): number

Returns X raised to the power of Y.

let R := 2.3 ^ 1.5 :> 3.48812270426371
type(R) :> <<double>>
let C := -2.3 ^ 1.5
:> -6.40757745721465e-16 - 3.48812270426371i
type(C) :> <<complex>>
meth (R: real):arg: real

Returns the complex argument of R (= 0 for a real number).

meth (R: real):conj: real

Returns the complex conjugate of R (= R for a real number).

meth math::abs(Arg₁: real): real

Returns abs(Arg₁).

math::abs(1.2345) :> 1.2345
math::abs(-1.2345) :> 1.2345
meth math::acos(Arg₁: real): real

Returns acos(Arg₁).

math::acos(1.2345) :> nan
math::acos(-1.2345) :> nan
meth math::acosh(Arg₁: real): real

Returns acosh(Arg₁).

math::acosh(1.2345) :> 0.672113366870564
math::acosh(-1.2345) :> -nan
meth math::asin(Arg₁: real): real

Returns asin(Arg₁).

math::asin(1.2345) :> nan
math::asin(-1.2345) :> nan
meth math::asinh(Arg₁: real): real

Returns asinh(Arg₁).

math::asinh(1.2345) :> 1.03787350829816
math::asinh(-1.2345) :> -1.03787350829816
meth math::atan(Arg₁: real): real

Returns atan(Arg₁).

math::atan(1.2345) :> 0.88996059643618
math::atan(-1.2345) :> -0.88996059643618
meth math::atan(Arg₁: real, Arg₂: real): real

Returns atan(Arg₂ / Arg₁).

meth math::atanh(Arg₁: real): real

Returns atanh(Arg₁).

math::atanh(1.2345) :> -nan
math::atanh(-1.2345) :> -nan
meth math::cbrt(Arg₁: real): real

Returns cbrt(Arg₁).

math::cbrt(1.2345) :> 1.07274631515821
math::cbrt(-1.2345) :> -1.07274631515821
meth math::ceil(Arg₁: real): real

Returns ceil(Arg₁).

math::ceil(1.2345) :> 2
math::ceil(-1.2345) :> -1
meth math::cos(Arg₁: real): real

Returns cos(Arg₁).

math::cos(1.2345) :> 0.329993157678568
math::cos(-1.2345) :> 0.329993157678568
meth math::cosh(Arg₁: real): real

Returns cosh(Arg₁).

math::cosh(1.2345) :> 1.86381998863995
math::cosh(-1.2345) :> 1.86381998863995
meth math::erf(Arg₁: real): real

Returns erf(Arg₁).

math::erf(1.2345) :> 0.919162396413566
math::erf(-1.2345) :> -0.919162396413566
meth math::erfc(Arg₁: real): real

Returns erfc(Arg₁).

math::erfc(1.2345) :> 0.0808376035864342
math::erfc(-1.2345) :> 1.91916239641357
meth math::exp(Arg₁: real): real

Returns exp(Arg₁).

math::exp(1.2345) :> 3.43665976117046
math::exp(-1.2345) :> 0.290980216109441
meth math::expm1(Arg₁: real): real

Returns expm1(Arg₁).

math::expm1(1.2345) :> 2.43665976117046
math::expm1(-1.2345) :> -0.709019783890559
meth math::floor(Arg₁: real): real

Returns floor(Arg₁).

math::floor(1.2345) :> 1
math::floor(-1.2345) :> -2
meth math::gamma(Arg₁: real): real

Returns gamma(Arg₁).

math::gamma(1.2345) :> -0.0946016466793967
math::gamma(-1.2345) :> 1.42638586810001
meth math::hypot(Arg₁: real, Arg₂: real): real

Returns hypot(Arg₁, Arg₂).

meth math::log(Arg₁: real): real

Returns log(Arg₁).

math::log(1.2345) :> 0.210666029803097
math::log(-1.2345)
:> 0.210666029803097 + 3.14159265358979i
meth math::log10(Arg₁: real): real

Returns log10(Arg₁).

math::log10(1.2345) :> 0.091491094267951
math::log10(-1.2345)
:> 0.091491094267951 + 1.36437635384184i
meth math::log1p(Arg₁: real): real

Returns log1p(Arg₁).

math::log1p(1.2345) :> 0.804017489391369
math::log1p(-1.2345) :> -nan
meth math::logit(Arg₁: real): real

Returns logit(Arg₁).

math::logit(1.2345) :> -nan
math::logit(-1.2345) :> -nan
meth math::rem(Arg₁: real, Arg₂: real): real

Returns rem(Arg₁, Arg₂).

meth math::round(Arg₁: real): real

Returns round(Arg₁).

math::round(1.2345) :> 1
math::round(-1.2345) :> -1
meth math::round(Arg₁: real, Arg₂: real): real

Returns round(Arg₁ * Arg₂) / Arg₂.

math::round(1.2345, 100) :> 1.23
math::round(-1.2345, 32) :> -1.25
meth math::sin(Arg₁: real): real

Returns sin(Arg₁).

math::sin(1.2345) :> 0.943983323944511
math::sin(-1.2345) :> -0.943983323944511
meth math::sinh(Arg₁: real): real

Returns sinh(Arg₁).

math::sinh(1.2345) :> 1.57283977253051
math::sinh(-1.2345) :> -1.57283977253051
meth math::sqrt(Arg₁: real): real

Returns sqrt(Arg₁).

math::sqrt(1.2345) :> 1.11108055513541
math::sqrt(-1.2345) :> 1.11108055513541i
meth math::square(R: real): real

Returns R * R

math::square(1.234) :> 1.522756
meth math::tan(Arg₁: real): real

Returns tan(Arg₁).

math::tan(1.2345) :> 2.86061483997194
math::tan(-1.2345) :> -2.86061483997194
meth math::tanh(Arg₁: real): real

Returns tanh(Arg₁).

math::tanh(1.2345) :> 0.843879656896602
math::tanh(-1.2345) :> -0.843879656896602