Average Error: 0.3 → 0.3
Time: 12.3s
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 r39127772 = x;
        double r39127773 = y;
        double r39127774 = 3.0;
        double r39127775 = r39127773 * r39127774;
        double r39127776 = r39127772 / r39127775;
        return r39127776;
}

double f(double x, double y) {
        double r39127777 = x;
        double r39127778 = 3.0;
        double r39127779 = y;
        double r39127780 = r39127778 * r39127779;
        double r39127781 = r39127777 / r39127780;
        return r39127781;
}

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. Using strategy rm
  3. Applied *-un-lft-identity0.3

    \[\leadsto \frac{\color{blue}{1 \cdot x}}{y \cdot 3}\]
  4. Applied times-frac0.3

    \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{x}{3}}\]
  5. Using strategy rm
  6. Applied frac-times0.3

    \[\leadsto \color{blue}{\frac{1 \cdot x}{y \cdot 3}}\]
  7. Simplified0.3

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

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

Reproduce

herbie shell --seed 2019171 
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, C"

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

  (/ x (* y 3.0)))