vec_mul

Purpose

Returns a vector containing the results of performing a multiply operation using the given vectors.

Syntax

d=vec_mul(a, b)

Result and argument types

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

d a b
vector4double vector4double vector4double

Result value

The values of the elements of the result are obtained by multiplying the elements of a and the corresponding elements of b.

Formula

d[0] = a[0] × b[0]
d[1] = a[1] × b[1]
d[2] = a[2] × b[2]
d[3] = a[3] × b[3]

Example

a =   (10.0,   20.0,   30.0,   40.0)
b =   (50.0,   60.0,   70.0,   80.0)
d: (500.0, 1200.0, 2100.0, 3200.0)