Average Error: 9.6 → 9.6
Time: 14.3s
Precision: binary64
\[{\left(\left(x0 - x1\right) \cdot \left(\left(\left(y0 - 3 \cdot y1\right) + 3 \cdot y2\right) - y3\right) - \left(y0 - y1\right) \cdot \left(\left(\left(x0 - 3 \cdot x1\right) + 3 \cdot x2\right) - x3\right)\right)}^{2}\]
\[{\left(\left(x0 - x1\right) \cdot \left(\left(\left(y0 - 3 \cdot y1\right) + 3 \cdot y2\right) - y3\right) - \left(y0 - y1\right) \cdot \left(\left(\left(x0 - 3 \cdot x1\right) + 3 \cdot x2\right) - x3\right)\right)}^{2}\]
{\left(\left(x0 - x1\right) \cdot \left(\left(\left(y0 - 3 \cdot y1\right) + 3 \cdot y2\right) - y3\right) - \left(y0 - y1\right) \cdot \left(\left(\left(x0 - 3 \cdot x1\right) + 3 \cdot x2\right) - x3\right)\right)}^{2}
{\left(\left(x0 - x1\right) \cdot \left(\left(\left(y0 - 3 \cdot y1\right) + 3 \cdot y2\right) - y3\right) - \left(y0 - y1\right) \cdot \left(\left(\left(x0 - 3 \cdot x1\right) + 3 \cdot x2\right) - x3\right)\right)}^{2}
double code(double x0, double x1, double y0, double y1, double y2, double y3, double x2, double x3) {
	return ((double) pow(((double) (((double) (((double) (x0 - x1)) * ((double) (((double) (((double) (y0 - ((double) (3.0 * y1)))) + ((double) (3.0 * y2)))) - y3)))) - ((double) (((double) (y0 - y1)) * ((double) (((double) (((double) (x0 - ((double) (3.0 * x1)))) + ((double) (3.0 * x2)))) - x3)))))), 2.0));
}
double code(double x0, double x1, double y0, double y1, double y2, double y3, double x2, double x3) {
	return ((double) pow(((double) (((double) (((double) (x0 - x1)) * ((double) (((double) (((double) (y0 - ((double) (3.0 * y1)))) + ((double) (3.0 * y2)))) - y3)))) - ((double) (((double) (y0 - y1)) * ((double) (((double) (((double) (x0 - ((double) (3.0 * x1)))) + ((double) (3.0 * x2)))) - x3)))))), 2.0));
}

Error

Bits error versus x0

Bits error versus x1

Bits error versus y0

Bits error versus y1

Bits error versus y2

Bits error versus y3

Bits error versus x2

Bits error versus x3

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 9.6

    \[{\left(\left(x0 - x1\right) \cdot \left(\left(\left(y0 - 3 \cdot y1\right) + 3 \cdot y2\right) - y3\right) - \left(y0 - y1\right) \cdot \left(\left(\left(x0 - 3 \cdot x1\right) + 3 \cdot x2\right) - x3\right)\right)}^{2}\]
  2. Final simplification9.6

    \[\leadsto {\left(\left(x0 - x1\right) \cdot \left(\left(\left(y0 - 3 \cdot y1\right) + 3 \cdot y2\right) - y3\right) - \left(y0 - y1\right) \cdot \left(\left(\left(x0 - 3 \cdot x1\right) + 3 \cdot x2\right) - x3\right)\right)}^{2}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x0 x1 y0 y1 y2 y3 x2 x3)
  :name "(pow (- (* (- x0 x1) (- (+ (- y0 (* 3 y1)) (* 3 y2)) y3)) (* (- y0 y1) (- (+ (- x0 (* 3 x1)) (* 3 x2)) x3))) 2)"
  :precision binary64
  (pow (- (* (- x0 x1) (- (+ (- y0 (* 3.0 y1)) (* 3.0 y2)) y3)) (* (- y0 y1) (- (+ (- x0 (* 3.0 x1)) (* 3.0 x2)) x3))) 2.0))