fmaDot3

inline fun fmaDot3(a0: Double, b0: Double, c0: Double, a1: Double, b1: Double, c1: Double, a2: Double, b2: Double, c2: Double, a3: Double, b3: Double, c3: Double, a4: Double, b4: Double, c4: Double, a5: Double, b5: Double, c5: Double): Double(source)

Computes the dot product of three 3-dimensional vectors, combined with fused-multiply-add (FMA) operations for increased precision by avoiding intermediate rounding errors.

The formula applies FMA repeatedly for the components of the vectors: result = fma(a0, b0 * c0, fma(a1, b1 * c1, ... fma(a5, b5 * c5, 0.0) ...))

Return

The computed dot product of the vectors using fused-multiply-add precision.

Parameters

a0

The first component of the first vector.

b0

The first component of the second vector.

c0

The first component of the third vector.

a1

The second component of the first vector.

b1

The second component of the second vector.

c1

The second component of the third vector.

a2

The third component of the first vector.

b2

The third component of the second vector.

c2

The third component of the third vector.

a3

The fourth component of the first vector.

b3

The fourth component of the second vector.

c3

The fourth component of the third vector.

a4

The fifth component of the first vector.

b4

The fifth component of the second vector.

c4

The fifth component of the third vector.

a5

The sixth component of the first vector.

b5

The sixth component of the second vector.

c5

The sixth component of the third vector.