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

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

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

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

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

Reproduce

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