vec_xmadd

Purpose

Returns a vector containing the results of performing a fused cross multiply-add operation for each corresponding set of elements of the given vectors.

Syntax

d=vec_xmadd(a, b, c)

Result and argument types

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

d a b c
vector4double vector4double vector4double vector4double

Result value

The values of the elements of the result are the product of the values of the first and the third elements of a and the elements of b, added to the values of the corresponding elements of c.

Formula

d[0] = ( a[0] × b[0] ) + c[0]
d[1] = ( a[0] × b[1] ) + c[1]
d[2] = ( a[2] × b[2] ) + c[2]
d[3] = ( a[2] × b[3] ) + c[3]

Example

a =  ( 1.0,  0.0,  3.0,  0.0)
b =  ( 5.0, 10.0, 15.0, 20.0)
c =  (10.0, 10.0, 10.0, 10.0)
d: (15.0, 20.0, 55.0, 70.0)