Average Error: 58.0 → 53.3
Time: 1.8s
Precision: binary64
\[\frac{\left(\left(10 \cdot {x}^{4}\right) \cdot m\right) \cdot {n}^{2}}{\left(\left(5 \cdot {x}^{3}\right) \cdot m\right) \cdot n}\]
\[\frac{{n}^{2}}{n} \cdot \frac{10 \cdot {x}^{4}}{5 \cdot {x}^{3}}\]
\frac{\left(\left(10 \cdot {x}^{4}\right) \cdot m\right) \cdot {n}^{2}}{\left(\left(5 \cdot {x}^{3}\right) \cdot m\right) \cdot n}
\frac{{n}^{2}}{n} \cdot \frac{10 \cdot {x}^{4}}{5 \cdot {x}^{3}}
double code(double x, double m, double n) {
	return ((double) (((double) (((double) (((double) (10.0 * ((double) pow(x, 4.0)))) * m)) * ((double) pow(n, 2.0)))) / ((double) (((double) (((double) (5.0 * ((double) pow(x, 3.0)))) * m)) * n))));
}
double code(double x, double m, double n) {
	return ((double) (((double) (((double) pow(n, 2.0)) / n)) * ((double) (((double) (10.0 * ((double) pow(x, 4.0)))) / ((double) (5.0 * ((double) pow(x, 3.0))))))));
}

Error

Bits error versus x

Bits error versus m

Bits error versus n

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.0

    \[\frac{\left(\left(10 \cdot {x}^{4}\right) \cdot m\right) \cdot {n}^{2}}{\left(\left(5 \cdot {x}^{3}\right) \cdot m\right) \cdot n}\]
  2. Simplified53.3

    \[\leadsto \color{blue}{\left(\frac{{n}^{2}}{n} \cdot \frac{10 \cdot {x}^{4}}{5 \cdot {x}^{3}}\right) \cdot 1}\]
  3. Final simplification53.3

    \[\leadsto \frac{{n}^{2}}{n} \cdot \frac{10 \cdot {x}^{4}}{5 \cdot {x}^{3}}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x m n)
  :name "(/ (* (* (* 10 (pow x 4)) m) (pow n 2)) (* (* (* 5 (pow x 3)) m) n))"
  :precision binary64
  (/ (* (* (* 10.0 (pow x 4.0)) m) (pow n 2.0)) (* (* (* 5.0 (pow x 3.0)) m) n)))