DuroDBMS API  1.2
Built-in arithmetic operators

OPERATOR +

OPERATOR + (integer, integer) RETURNS integer;

OPERATOR + (float, float) RETURNS float;

Description

The addition operator.

Return value

The sum of the two operands.


OPERATOR - (unary)

OPERATOR - (integer) RETURNS integer;

OPERATOR - (float) RETURNS float;

Description

The unary minus operator.

Return value

The operand, sign inverted.


OPERATOR - (binary)

OPERATOR - (integer, integer) RETURNS integer;

OPERATOR - (float, float) RETURNS float;

Description

The subtraction operator.

Return value

The difference of the two operands.


OPERATOR *

OPERATOR * (integer, integer) RETURNS integer;;

OPERATOR * (float, float) RETURNS float;

Description

The multiplication operator.

Return value

The product of the two operands.


OPERATOR /

OPERATOR / (integer, integer) RETURNS integer;

OPERATOR / (float, float) RETURNS float;

Description

The division operator.

Return value

The quotient of the operators.

Errors

INVALID_ARGUMENT_ERROR
The divisor is zero.

OPERATOR %

OPERATOR % (integer, integer) RETURNS integer;

Description

The modulo operator.

Return value

The remainder after division of the operators.

Errors

INVALID_ARGUMENT_ERROR
The divisor is zero.

OPERATOR sqrt

OPERATOR sqrt(x float) RETURNS float;

The square root operator.


OPERATOR abs

OPERATOR abs(x integer) RETURNS integer;

OPERATOR abs(x float) RETURNS float;

The abs(absolute value) operator.


OPERATOR sin

OPERATOR sin (x float) RETURNS float;

The sine operator.


OPERATOR cos

OPERATOR cos(x float) RETURNS float;

The cosine operator.


OPERATOR atan

OPERATOR atan(x float) RETURNS float;

The arc tangent operator.


OPERATOR atan2

OPERATOR atan2(y float, x float) RETURNS float;

The atan2 operator.


OPERATOR power

OPERATOR power(b float, x float) RETURNS float;

The power operator.


OPERATOR exp

OPERATOR exp(x float) RETURNS float;

The exponential function operator.


OPERATOR

OPERATOR ln(x float) RETURNS float;

The natural logarithm operator.


OPERATOR

OPERATOR log(x float) RETURNS float;

The base 10 logarithm operator.