fn sqrt(x: anytype) Sqrt(@TypeOf(x))

Returns the square root of x.

Special Cases:

  • sqrt(+inf) = +inf
  • sqrt(+-0) = +-0
  • sqrt(x) = nan if x < 0
  • sqrt(nan) = nan TODO Decide if all this logic should be implemented directly in the @sqrt builtin function.

Parameters

x: anytype,