Skip to content

realsqrt

specfun · scripts/specfun/realsqrt.m

: y = realsqrt (x)

Square root restricted to real results.

Works like sqrt but refuses input that would give a complex answer: a negative element or a complex x raises an error instead.