Learn R Programming

rkeops (version 2.2.2)

rsqrt.default: Element-wise inverse square root operation

Description

Element-wise inverse square root on numeric or complex vectors (or objects which can be coerced to them).

Usage

# S3 method for default
rsqrt(x)

Value

a numeric or complex vector or array.

Arguments

x

a numeric or complex vector or array.

Author

Chloe Serre-Combe, Amelie Vernay

Details

rsqrt(x) is equivalent to 1 / sqrt(x) where sqrt() is the default square root function, i.e. \(1/\sqrt{x}\).

See Also

Examples

Run this code
rsqrt(4)
rsqrt(c(1,4,9,16))

Run the code above in your browser using DataLab