Average Error: 0.3 → 0.3
Time: 2.3s
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 r661909 = x;
        double r661910 = y;
        double r661911 = 3.0;
        double r661912 = r661910 * r661911;
        double r661913 = r661909 / r661912;
        return r661913;
}

double f(double x, double y) {
        double r661914 = x;
        double r661915 = y;
        double r661916 = 3.0;
        double r661917 = r661915 * r661916;
        double r661918 = r661914 / r661917;
        return r661918;
}

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}\]

Derivation

  1. Initial program 0.3

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

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

Reproduce

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