Skip to content

sumOfProducts

sumOfProducts(a, b, c, d): number

Defined in: diff-of-products.ts:67

a * b + c * d, accurate to within 1.5 units in the last place of the true result however badly the two products cancel.

The companion of diffOfProducts, for the sum form — a two-term dot product, the imaginary part of a complex product. See that function for when this is worth its cost.

number

First factor of the first product.

number

Second factor of the first product.

number

First factor of the second product.

number

Second factor of the second product.

number

a * b + c * d.