Average Error: 0.3 → 0.3
Time: 9.5s
Precision: 64
\[\frac{x}{y \cdot 3}\]
\[\frac{x}{3 \cdot y}\]
\frac{x}{y \cdot 3}
\frac{x}{3 \cdot y}
double f(double x, double y) {
        double r535028 = x;
        double r535029 = y;
        double r535030 = 3.0;
        double r535031 = r535029 * r535030;
        double r535032 = r535028 / r535031;
        return r535032;
}

double f(double x, double y) {
        double r535033 = x;
        double r535034 = 3.0;
        double r535035 = y;
        double r535036 = r535034 * r535035;
        double r535037 = r535033 / r535036;
        return r535037;
}

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. Final simplification0.3

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

Reproduce

herbie shell --seed 2019174 +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)))