Average Error: 0.1 → 0.1
Time: 2.5s
Precision: binary64
\[\left(\left(\left(\left(2 \cdot {x}^{2} - 3 \cdot xy\right) + 4 \cdot {y}^{2}\right) + 6 \cdot x\right) - 3 \cdot y\right) - 4\]
\[\left(\left(\left(\left(2 \cdot {x}^{2} - 3 \cdot xy\right) + 4 \cdot {y}^{2}\right) + 6 \cdot x\right) - 3 \cdot y\right) - 4\]
\left(\left(\left(\left(2 \cdot {x}^{2} - 3 \cdot xy\right) + 4 \cdot {y}^{2}\right) + 6 \cdot x\right) - 3 \cdot y\right) - 4
\left(\left(\left(\left(2 \cdot {x}^{2} - 3 \cdot xy\right) + 4 \cdot {y}^{2}\right) + 6 \cdot x\right) - 3 \cdot y\right) - 4
double code(double x, double xy, double y) {
	return ((double) (((double) (((double) (((double) (((double) (((double) (2.0 * ((double) pow(x, 2.0)))) - ((double) (3.0 * xy)))) + ((double) (4.0 * ((double) pow(y, 2.0)))))) + ((double) (6.0 * x)))) - ((double) (3.0 * y)))) - 4.0));
}
double code(double x, double xy, double y) {
	return ((double) (((double) (((double) (((double) (((double) (((double) (2.0 * ((double) pow(x, 2.0)))) - ((double) (3.0 * xy)))) + ((double) (4.0 * ((double) pow(y, 2.0)))))) + ((double) (6.0 * x)))) - ((double) (3.0 * y)))) - 4.0));
}

Error

Bits error versus x

Bits error versus xy

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(\left(2 \cdot {x}^{2} - 3 \cdot xy\right) + 4 \cdot {y}^{2}\right) + 6 \cdot x\right) - 3 \cdot y\right) - 4\]
  2. Final simplification0.1

    \[\leadsto \left(\left(\left(\left(2 \cdot {x}^{2} - 3 \cdot xy\right) + 4 \cdot {y}^{2}\right) + 6 \cdot x\right) - 3 \cdot y\right) - 4\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x xy y)
  :name "(- (- (+ (+ (- (* 2 (pow x 2)) (* 3 xy)) (* 4 (pow y 2))) (* 6 x)) (* 3 y)) 4)"
  :precision binary64
  (- (- (+ (+ (- (* 2.0 (pow x 2.0)) (* 3.0 xy)) (* 4.0 (pow y 2.0))) (* 6.0 x)) (* 3.0 y)) 4.0))