vec_swsqrt, vec_swsqrt_nochk

Purpose

Returns a vector containing the square root of each element in the given vector.

Syntax

d=vec_swsqrt(a)
d=vec_swsqrt_nochk(a)

Result and argument types

The following table describes the types of the returned value and the function arguments.

d a
vector4double vector4double

For vec_swsqrt_nochk, the compiler does not check the validity of the arguments. You must ensure that the following condition is satisfied where x represents each element of a:

Result value

The result value is a quad vector that contains the square root of each element of a.

When the following options are used, the result is bitwise identical to the IEEE square root.

Otherwise, the result might differ slightly from the IEEE square root.

Formula

d[0] = √a[0]
d[1] = √a[1]
d[2] = √a[2]
d[3] = √a[3]

Example

a =  ( 4.0,  9.0,  16.0,  25.0)
d: ( 2.0,  3.0,   4.0,   5.0)