(+) add operator

(+ number) -> number, const autodiff

The unary no-op number operator, intended as the counterpart of the unary minus operator.

x = 3
show scalar "" with +x

(number + number) -> number, const autodiff

The regular addition of numbers.

x = 3 + 4
show scalar "" with x

(i64 + i64) -> i64, const

Adds two i64 values, returning an i64. Convert operands before addition to preserve integers beyond the exact range of number.

x = to.i64(16777216) + to.i64(1)
show scalar "Sum" with text(x) // 16777217

(f64 + f64) -> f64, const

Adds two f64 values, returning an f64.

x = to.f64(1.5) + to.f64(2.25)
show scalar "Sum" with text(x) // 3.75

(date + number) -> date, const

Adds an integral number of days to a date.

x = date(2020,8,25) + 12
show scalar "" with x

(number + date) -> date, const

The sum (n + d) where n is a number and d is a date is defined by (d + n).

x = 12 + date(2020,8,25)
show scalar "" with x

(ranvar + ranvar) -> ranvar

The addition of ranvars, random variables over $\mathbb{Z}$ assumed to be independent.

x = poisson(3) + poisson(4)
show scalar "" with x

Under the hood, a convolution happens. The mean of the resulting ranvar is equal to the sum of the means of the two ranvar operands.

(zedfunc + zedfunc) -> zedfunc

The addition of zedfuncs, real functions over $\mathbb{Z}$.

x = linear(2) + linear(-1)
show scalar "" with x

(embedding + embedding) -> embedding

Combines two embeddings into a new embedding.

a = embedding("warehouse")
b = embedding("distribution")
c = a + b
show scalar "Embedding sum" with spark(c)

See also

User Contributed Notes
0 notes + add a note