Average Error: 0.2 → 0.2
Time: 1.4s
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 r800729 = x;
        double r800730 = y;
        double r800731 = 3.0;
        double r800732 = r800730 * r800731;
        double r800733 = r800729 / r800732;
        return r800733;
}

double f(double x, double y) {
        double r800734 = x;
        double r800735 = y;
        double r800736 = 3.0;
        double r800737 = r800735 * r800736;
        double r800738 = r800734 / r800737;
        return r800738;
}

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 2020059 +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)))