Reciprocal (1/x) of a number

rec(x)

Arguments

x

a numeric vector or array

Examples

rec(2)
#> [1] 0.5
rec(1:10)
#> [1] 1.0000000 0.5000000 0.3333333 0.2500000 0.2000000 0.1666667 0.1428571 #> [8] 0.1250000 0.1111111 0.1000000