Average Error: 0.2 → 0.2
Time: 2.7s
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 r859821 = x;
        double r859822 = y;
        double r859823 = 3.0;
        double r859824 = r859822 * r859823;
        double r859825 = r859821 / r859824;
        return r859825;
}

double f(double x, double y) {
        double r859826 = x;
        double r859827 = y;
        double r859828 = 3.0;
        double r859829 = r859827 * r859828;
        double r859830 = r859826 / r859829;
        return r859830;
}

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.2
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 2020083 +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)))