Average Error: 0.2 → 0.2
Time: 1.5s
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 r725347 = x;
        double r725348 = y;
        double r725349 = 3.0;
        double r725350 = r725348 * r725349;
        double r725351 = r725347 / r725350;
        return r725351;
}

double f(double x, double y) {
        double r725352 = x;
        double r725353 = y;
        double r725354 = 3.0;
        double r725355 = r725353 * r725354;
        double r725356 = r725352 / r725355;
        return r725356;
}

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