Average Error: 0.3 → 0.3
Time: 11.1s
Precision: 64
\[\frac{x}{y \cdot 3.0}\]
\[\frac{0.3333333333333333 \cdot x}{y}\]
\frac{x}{y \cdot 3.0}
\frac{0.3333333333333333 \cdot x}{y}
double f(double x, double y) {
        double r38170150 = x;
        double r38170151 = y;
        double r38170152 = 3.0;
        double r38170153 = r38170151 * r38170152;
        double r38170154 = r38170150 / r38170153;
        return r38170154;
}

double f(double x, double y) {
        double r38170155 = 0.3333333333333333;
        double r38170156 = x;
        double r38170157 = r38170155 * r38170156;
        double r38170158 = y;
        double r38170159 = r38170157 / r38170158;
        return r38170159;
}

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

Derivation

  1. Initial program 0.3

    \[\frac{x}{y \cdot 3.0}\]
  2. Taylor expanded around 0 0.3

    \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{x}{y}}\]
  3. Using strategy rm
  4. Applied associate-*r/0.3

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

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

Reproduce

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

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

  (/ x (* y 3.0)))