dsqrt: Element-wise square root

View source: R/blas_extras.R

dsqrtR Documentation

Element-wise square root

Description

Applies the square root to each entry of 'X' in place, supporting both base R and ['bigmemory::big.matrix'] inputs.

Usage

dsqrt(N = NULL, X, INCX = 1L)

Arguments

N

Optional integer giving the number of elements. Defaults to 'length(X)'.

X

Double-precision vector, matrix or ['bigmemory::big.matrix'] input.

INCX

Integer stride for traversing 'X'.

Value

Invisibly returns the modified object 'X'.

Examples

vals <- matrix(c(1, 4, 9, 16), 2)
dsqrt(X = vals)
vals


bigalgebra documentation built on Sept. 9, 2026, 5:12 p.m.