fmaDotC

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

Computes a fused multiply-add operation for two pairs of values and a constant offset. This function calculates a0 * b0 + c, then uses the result as the offset for a1 * b1. The fma operation ensures higher precision by performing the operations in a single rounding step.

Return

The result of the fused multiply-add operation for the two pairs of values and the constant offset.

Parameters

a0

The first operand of the first multiplication.

b0

The second operand of the first multiplication.

a1

The first operand of the second multiplication.

b1

The second operand of the second multiplication.

c

The constant to be added to the result of the first multiplication.


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

Computes the dot product of three vector components combined with an additional constant term, using fused multiply-add operations for improved precision.

Return

The result of a0 * b0 + a1 * b1 + a2 * b2 + c, computed with higher precision 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.

c

The constant term to be added to the dot product.


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

Computes the dot product of four (a, b) pairs with an additional constant value c. This operation is performed using fused multiply-add operations for improved precision.

Return

The fused multiply-add result of the dot product calculation.

Parameters

a0

The first operand of the first pair.

b0

The second operand of the first pair.

a1

The first operand of the second pair.

b1

The second operand of the second pair.

a2

The first operand of the third pair.

b2

The second operand of the third pair.

a3

The first operand of the fourth pair.

b3

The second operand of the fourth pair.

c

The initial constant value to be added to the result.