Average Error: 4.5 → 4.5
Time: 1.5s
Precision: binary64
\[\left(\frac{\left(x \cdot x\right) \cdot \left(3 - 2 \cdot x\right)}{y} - \frac{0.5}{y}\right) + \frac{z}{y}\]
\[\left(\frac{\left(x \cdot x\right) \cdot \left(3 - 2 \cdot x\right)}{y} - \frac{0.5}{y}\right) + \frac{z}{y}\]
\left(\frac{\left(x \cdot x\right) \cdot \left(3 - 2 \cdot x\right)}{y} - \frac{0.5}{y}\right) + \frac{z}{y}
\left(\frac{\left(x \cdot x\right) \cdot \left(3 - 2 \cdot x\right)}{y} - \frac{0.5}{y}\right) + \frac{z}{y}
double code(double x, double y, double z) {
	return ((double) (((double) (((double) (((double) (((double) (x * x)) * ((double) (3.0 - ((double) (2.0 * x)))))) / y)) - ((double) (0.5 / y)))) + ((double) (z / y))));
}
double code(double x, double y, double z) {
	return ((double) (((double) (((double) (((double) (((double) (x * x)) * ((double) (3.0 - ((double) (2.0 * x)))))) / y)) - ((double) (0.5 / y)))) + ((double) (z / y))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 4.5

    \[\left(\frac{\left(x \cdot x\right) \cdot \left(3 - 2 \cdot x\right)}{y} - \frac{0.5}{y}\right) + \frac{z}{y}\]
  2. Final simplification4.5

    \[\leadsto \left(\frac{\left(x \cdot x\right) \cdot \left(3 - 2 \cdot x\right)}{y} - \frac{0.5}{y}\right) + \frac{z}{y}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x y z)
  :name "(+ (- (/ (* (* x x) (- 3.0 (* 2.0 x))) y) (/ 0.5 y)) (/ z y))"
  :precision binary64
  (+ (- (/ (* (* x x) (- 3.0 (* 2.0 x))) y) (/ 0.5 y)) (/ z y)))