INTEGRITY Cloudflare Docs

Math functions

Cloudflare Pipelines scalar function implementations are based on Apache DataFusion (via Arroyo) and these docs are derived from the DataFusion function reference.

abs

Returns the absolute value of a number.

abs(numeric_expression)

Arguments

acos

Returns the arc cosine or inverse cosine of a number.

acos(numeric_expression)

Arguments

acosh

Returns the area hyperbolic cosine or inverse hyperbolic cosine of a number.

acosh(numeric_expression)

Arguments

asin

Returns the arc sine or inverse sine of a number.

asin(numeric_expression)

Arguments

asinh

Returns the area hyperbolic sine or inverse hyperbolic sine of a number.

asinh(numeric_expression)

Arguments

atan

Returns the arc tangent or inverse tangent of a number.

atan(numeric_expression)

Arguments

atanh

Returns the area hyperbolic tangent or inverse hyperbolic tangent of a number.

atanh(numeric_expression)

Arguments

atan2

Returns the arc tangent or inverse tangent of expression_y / expression_x.

atan2(expression_y, expression_x)

Arguments

cbrt

Returns the cube root of a number.

cbrt(numeric_expression)

Arguments

ceil

Returns the nearest integer greater than or equal to a number.

ceil(numeric_expression)

Arguments

cos

Returns the cosine of a number.

cos(numeric_expression)

Arguments

cosh

Returns the hyperbolic cosine of a number.

cosh(numeric_expression)

Arguments

degrees

Converts radians to degrees.

degrees(numeric_expression)

Arguments

exp

Returns the base-e exponential of a number.

exp(numeric_expression)

Arguments

factorial

Factorial. Returns 1 if value is less than 2.

factorial(numeric_expression)

Arguments

floor

Returns the nearest integer less than or equal to a number.

floor(numeric_expression)

Arguments

gcd

Returns the greatest common divisor of expression_x and expression_y. Returns 0 if both inputs are zero.

gcd(expression_x, expression_y)

Arguments

isnan

Returns true if a given number is +NaN or -NaN otherwise returns false.

isnan(numeric_expression)

Arguments

iszero

Returns true if a given number is +0.0 or -0.0 otherwise returns false.

iszero(numeric_expression)

Arguments

lcm

Returns the least common multiple of expression_x and expression_y. Returns 0 if either input is zero.

lcm(expression_x, expression_y)

Arguments

ln

Returns the natural logarithm of a number.

ln(numeric_expression)

Arguments

log

Returns the base-x logarithm of a number. Can either provide a specified base, or if omitted then takes the base-10 of a number.

log(base, numeric_expression)
log(numeric_expression)

Arguments

log10

Returns the base-10 logarithm of a number.

log10(numeric_expression)

Arguments

log2

Returns the base-2 logarithm of a number.

log2(numeric_expression)

Arguments

nanvl

Returns the first argument if it's not NaN. Returns the second argument otherwise.

nanvl(expression_x, expression_y)

Arguments

pi

Returns an approximate value of π.

pi()

power

Returns a base expression raised to the power of an exponent.

power(base, exponent)

Arguments

Aliases

pow

Alias of power.

radians

Converts degrees to radians.

radians(numeric_expression)

Arguments

random

Returns a random float value in the range [0, 1). The random seed is unique to each row.

random()

round

Rounds a number to the nearest integer.

round(numeric_expression[, decimal_places])

Arguments

signum

Returns the sign of a number. Negative numbers return -1. Zero and positive numbers return 1.

signum(numeric_expression)

Arguments

sin

Returns the sine of a number.

sin(numeric_expression)

Arguments

sinh

Returns the hyperbolic sine of a number.

sinh(numeric_expression)

Arguments

sqrt

Returns the square root of a number.

sqrt(numeric_expression)

Arguments

tan

Returns the tangent of a number.

tan(numeric_expression)

Arguments

tanh

Returns the hyperbolic tangent of a number.

tanh(numeric_expression)

Arguments

trunc

Truncates a number to a whole number or truncated to the specified decimal places.

trunc(numeric_expression[, decimal_places])

Arguments