Average Error: 0.3 → 0.3
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 r495128 = x;
        double r495129 = y;
        double r495130 = 3.0;
        double r495131 = r495129 * r495130;
        double r495132 = r495128 / r495131;
        return r495132;
}

double f(double x, double y) {
        double r495133 = x;
        double r495134 = y;
        double r495135 = 3.0;
        double r495136 = r495134 * r495135;
        double r495137 = r495133 / r495136;
        return r495137;
}

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.3
Target0.3
Herbie0.3
\[\frac{\frac{x}{y}}{3}\]

Derivation

  1. Initial program 0.3

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

    \[\leadsto \color{blue}{\frac{x}{3 \cdot y}}\]
  3. Final simplification0.3

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

Reproduce

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

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

  (/ x (* y 3.0)))