Average Error: 0.0 → 0.0
Time: 9.0s
Precision: 64
\[\frac{x - y}{z - y}\]
\[\frac{x}{z - y} - \frac{y}{z - y}\]
\frac{x - y}{z - y}
\frac{x}{z - y} - \frac{y}{z - y}
double f(double x, double y, double z) {
        double r27356462 = x;
        double r27356463 = y;
        double r27356464 = r27356462 - r27356463;
        double r27356465 = z;
        double r27356466 = r27356465 - r27356463;
        double r27356467 = r27356464 / r27356466;
        return r27356467;
}

double f(double x, double y, double z) {
        double r27356468 = x;
        double r27356469 = z;
        double r27356470 = y;
        double r27356471 = r27356469 - r27356470;
        double r27356472 = r27356468 / r27356471;
        double r27356473 = r27356470 / r27356471;
        double r27356474 = r27356472 - r27356473;
        return r27356474;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\frac{x}{z - y} - \frac{y}{z - y}\]

Derivation

  1. Initial program 0.0

    \[\frac{x - y}{z - y}\]
  2. Using strategy rm
  3. Applied div-sub0.0

    \[\leadsto \color{blue}{\frac{x}{z - y} - \frac{y}{z - y}}\]
  4. Final simplification0.0

    \[\leadsto \frac{x}{z - y} - \frac{y}{z - y}\]

Reproduce

herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y z)
  :name "Graphics.Rasterific.Shading:$sgradientColorAt from Rasterific-0.6.1"

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

  (/ (- x y) (- z y)))