Skip to main content
Calculates the difference between every two neighboring elements of an array by subtracting each element from its following element and returns an array that consists of the differences.

Syntax

Parameters

input: the array for which you want to calculate the differences between every two neighboring elements.

Return value

Returns an array with the same length as input. The return element type is determined by the input element type as follows: ARRAY<DECIMAL256> (P > 38) is not supported.

Examples

Example 1:
Example 2:
Example 3:
Example 4: