reciprocal

Syntax

reciprocal(X)

Arguments

X is a scalar/vector/matrix.

Details

Return element-by-element reciprocal of X. The data type of the result is always DOUBLE.

Examples

reciprocal(10);
// output
0.1

reciprocal(1 2 4 8);
// output
[1,0.5,0.25,0.125]

reciprocal(1 2 4 8$2:2);
#0 #1
1 0.25
0.5 0.125