Average Error: 0.0 → 0.1
Time: 3.5s
Precision: binary64
\[\left(\left(\left(a \cdot \left(x - y\right) + b \cdot \left(x - y\right)\right) + c \cdot \left(x - y\right)\right) + d \cdot \left(x - y\right)\right) + e \cdot \left(x - y\right)\]
\[\left(x - y\right) \cdot \left(\left(\left(a + b\right) + c\right) + \left(d + e\right)\right)\]
\left(\left(\left(a \cdot \left(x - y\right) + b \cdot \left(x - y\right)\right) + c \cdot \left(x - y\right)\right) + d \cdot \left(x - y\right)\right) + e \cdot \left(x - y\right)
\left(x - y\right) \cdot \left(\left(\left(a + b\right) + c\right) + \left(d + e\right)\right)
double code(double a, double x, double y, double b, double c, double d, double e) {
	return ((double) (((double) (((double) (((double) (((double) (a * ((double) (x - y)))) + ((double) (b * ((double) (x - y)))))) + ((double) (c * ((double) (x - y)))))) + ((double) (d * ((double) (x - y)))))) + ((double) (e * ((double) (x - y))))));
}
double code(double a, double x, double y, double b, double c, double d, double e) {
	return ((double) (((double) (x - y)) * ((double) (((double) (((double) (a + b)) + c)) + ((double) (d + e))))));
}

Error

Bits error versus a

Bits error versus x

Bits error versus y

Bits error versus b

Bits error versus c

Bits error versus d

Bits error versus e

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(\left(\left(a \cdot \left(x - y\right) + b \cdot \left(x - y\right)\right) + c \cdot \left(x - y\right)\right) + d \cdot \left(x - y\right)\right) + e \cdot \left(x - y\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\left(x - y\right) \cdot \left(\left(\left(a + b\right) + c\right) + \left(d + e\right)\right)}\]
  3. Final simplification0.1

    \[\leadsto \left(x - y\right) \cdot \left(\left(\left(a + b\right) + c\right) + \left(d + e\right)\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (a x y b c d e)
  :name "(+ (+ (+ (+ (* a (- x y)) (* b (- x y))) (* c (- x y))) (* d (- x y))) (* e (- x y)))"
  :precision binary64
  (+ (+ (+ (+ (* a (- x y)) (* b (- x y))) (* c (- x y))) (* d (- x y))) (* e (- x y))))