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

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 9.7

    \[\frac{\left(x \cdot x\right) \cdot \left(3 - 2 \cdot x\right)}{y}\]
  2. Final simplification9.7

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

Reproduce

herbie shell --seed 2020152 
(FPCore (x y)
  :name "(/ (* (* x x) (- 3.0 (* 2.0 x))) y)"
  :precision binary64
  (/ (* (* x x) (- 3.0 (* 2.0 x))) y))