04 Which functions, operators and constants are available?

Operators

  • +, -, *, / Basic calculations (Add, Subtract, Multiply, Divide)
    • Support for: : and ÷ (Division) and × (Multiplication)
  • ^ Exponent; 2^3 = 8
  • % Modulo, Returns the remainder of an integer division: 5 % 2 = 1
  • ! Factorial; 5! = 1 * 2 * 3 * 4 * 5 = 120

Functions

Number-based functions

  • sqrt(x): Square Root; sqrt(9) = 3
  • nrt(n,x): n-th Root; nrt(3,8) = ∛8 = 2
  • sin(x), cos(x), tan(x): Trigonometric functions*
  • arcsin(x), arccos(x), arctan(x): Trigonometric arcus functions*
  • log(a,x): Logarithm based a; log(10, 100) = 2
  • ln(x): Natural logarithm (log based e); ln(42) = log(e, 42)
  • e(x): Exponential function with base e); e(1) ≈ 2.71828; e(2) ≈ 2.71828²
  • abs(x): absolute value, converts negative values into positive values: abs(-3) = 3
  • floor(x): Rounds the value down to next integer value: floor(2.8) = 2
  • ceil(x): Rounds the value up to next integer value: ceil(2.2) = 3
  • sgn(x): Returns the sign of a number, -1 for negative values, 1 for positive and 0 for 0
  • min(x, y): Returns the smallest number of the argument list; min(23, 12, 42) = 12
  • max(x, y): Returns the biggest number of the argument list; max(23, 12, 42) = 42
  • cs(x): Returns the cross sum of given numbers; cs(99) = 18, cs(99, 88) = 16
  • csi(x): Returns the iterated cross sum of given numbers; cs(99) = 9, cs(99, 88) = 7
  • nth(x, n): Returns the n-th number (decimal sign counts!); nth(1234, 2) = 2; nth(1234.5, 6) = 5
  • nth(x, s, e): Returns the s-th until e-th number (decimal sign counts!); nth(1234, 2, 4) = 234; nth(1234.5, 2, 6) = 234.5

Note, that all decimal values need to be inserted with a dot as decimal character. Other way round, a function may return a dot-delimited decimal value, which could yield unexpected results in your entire formula.

Text-based functions

  • bww(x), av(x): Returns the sum of alphabet values of a text; av(ABCXYZ) = 1 + 2 + 3 + 24 + 25 + 26 = 81
  • len(x): Returns the number of characters of a text; len(ABCXYZ) = 6

Constants

  • pi: ~3.1415926…
  • phi: Golden Ratio, ~1.61803…
  • ln10: Natural logarithm of 10; = ln(10)
  • ln2: Natural logarithm of 2; = ln(2)
  • log10e: Logarithm based 10 of e; = log(10, e)
  • log2e: Logarithm based 2 of e; = log(2, e)
  • sqrt2: Square Root of 2; = sqrt(2)
  • sqrt1_2: Square Root of 1/2; = sqrt(1/2)