Average Error: 0.2 → 0.2
Time: 9.9s
Precision: 64
\[\frac{x}{y \cdot 3}\]
\[\frac{x}{y \cdot 3}\]
\frac{x}{y \cdot 3}
\frac{x}{y \cdot 3}
double f(double x, double y) {
        double r772800 = x;
        double r772801 = y;
        double r772802 = 3.0;
        double r772803 = r772801 * r772802;
        double r772804 = r772800 / r772803;
        return r772804;
}

double f(double x, double y) {
        double r772805 = x;
        double r772806 = y;
        double r772807 = 3.0;
        double r772808 = r772806 * r772807;
        double r772809 = r772805 / r772808;
        return r772809;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.2
Target0.3
Herbie0.2
\[\frac{\frac{x}{y}}{3}\]

Derivation

  1. Initial program 0.2

    \[\frac{x}{y \cdot 3}\]
  2. Final simplification0.2

    \[\leadsto \frac{x}{y \cdot 3}\]

Reproduce

herbie shell --seed 2020045 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, C"
  :precision binary64

  :herbie-target
  (/ (/ x y) 3)

  (/ x (* y 3)))