sqrti: Generalized square root

sqrtiR Documentation

Generalized square root

Description

Square root wrapper that keeps answer real if possible, coerces to complex if not.

Usage

sqrti(x)

Arguments

x

Vector to return square root of

Author(s)

Robin K. S. Hankin

Examples

sqrti(1:10)  #real
sqrti(-10:10) #coerced to complex (compare sqrt(-10:10))
sqrti(1i+1:10) #complex anyway

elliptic documentation built on Nov. 11, 2025, 1:07 a.m.