fmaDot

inline fun fmaDot(a0: Double, b0: Double, a1: Double, b1: Double): Double(source)

Computes a fused multiply-add operation and sums the results of two multiplications. Specifically, it calculates (a1 * b1 + a0 * b0) in a way that ensures higher precision.

Return

The result of (a1 * b1) + (a0 * b0) computed with enhanced precision for the first product using fused multiply-add.

Parameters

a0

The first multiplicand in the second multiplication.

b0

The second multiplicand in the second multiplication.

a1

The first multiplicand in the first multiplication.

b1

The second multiplicand in the first multiplication.


inline fun fmaDot(a0: Double, b0: Double, a1: Double, b1: Double, a2: Double, b2: Double): Double(source)

Computes the dot product of two 3-dimensional vectors using fused multiply-add operations to enhance precision. The vectors are represented as pairs of coordinates, where the first vector's components are (a0, a1, a2) and the second vector's components are (b0, b1, b2).

Return

The computed dot product of the two vectors with improved precision due to fused multiply-add operations.

Parameters

a0

The first component of the first vector.

b0

The first component of the second vector.

a1

The second component of the first vector.

b1

The second component of the second vector.

a2

The third component of the first vector.

b2

The third component of the second vector.


inline fun fmaDot(a0: Double, b0: Double, a1: Double, b1: Double, a2: Double, b2: Double, a3: Double, b3: Double): Double(source)

Computes the dot product of two 4-dimensional vectors using fused multiply-add operations for enhanced precision. The result is calculated as: (a0 * b0) + (a1 * b1) + (a2 * b2) + (a3 * b3) using fused operations.

Return

The dot product of the two vectors, computed using fused multiply-add operations.

Parameters

a0

The first component of the first vector.

b0

The first component of the second vector.

a1

The second component of the first vector.

b1

The second component of the second vector.

a2

The third component of the first vector.

b2

The third component of the second vector.

a3

The fourth component of the first vector.

b3

The fourth component of the second vector.