Average Error: 15.5 → 15.5
Time: 2.7s
Precision: binary64
\[\frac{\left(\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3\right) \cdot \left(j + 1\right)}{n}\]
\[\frac{\left(\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3\right) \cdot \left(j + 1\right)}{n}\]
\frac{\left(\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3\right) \cdot \left(j + 1\right)}{n}
\frac{\left(\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3\right) \cdot \left(j + 1\right)}{n}
double code(double x1, double y1, double x2, double y2, double x3, double y3, double j, double n) {
	return ((double) (((double) (((double) (((double) (((double) (x1 * y1)) + ((double) (x2 * y2)))) + ((double) (x3 * y3)))) * ((double) (j + 1.0)))) / n));
}
double code(double x1, double y1, double x2, double y2, double x3, double y3, double j, double n) {
	return ((double) (((double) (((double) (((double) (((double) (x1 * y1)) + ((double) (x2 * y2)))) + ((double) (x3 * y3)))) * ((double) (j + 1.0)))) / n));
}

Error

Bits error versus x1

Bits error versus y1

Bits error versus x2

Bits error versus y2

Bits error versus x3

Bits error versus y3

Bits error versus j

Bits error versus n

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.5

    \[\frac{\left(\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3\right) \cdot \left(j + 1\right)}{n}\]
  2. Final simplification15.5

    \[\leadsto \frac{\left(\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3\right) \cdot \left(j + 1\right)}{n}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x1 y1 x2 y2 x3 y3 j n)
  :name "(/ (* (+ (+ (* x1 y1) (* x2 y2)) (* x3 y3)) (+ j 1)) n)"
  :precision binary64
  (/ (* (+ (+ (* x1 y1) (* x2 y2)) (* x3 y3)) (+ j 1.0)) n))