Average Error: 0.2 → 0.2
Time: 1.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 r697569 = x;
        double r697570 = y;
        double r697571 = 3.0;
        double r697572 = r697570 * r697571;
        double r697573 = r697569 / r697572;
        return r697573;
}

double f(double x, double y) {
        double r697574 = x;
        double r697575 = y;
        double r697576 = 3.0;
        double r697577 = r697575 * r697576;
        double r697578 = r697574 / r697577;
        return r697578;
}

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