Average Error: 0.0 → 0.0
Time: 10.0s
Precision: 64
\[\frac{x - y}{z - y}\]
\[\frac{x - y}{z - y}\]
\frac{x - y}{z - y}
\frac{x - y}{z - y}
double f(double x, double y, double z) {
        double r588185 = x;
        double r588186 = y;
        double r588187 = r588185 - r588186;
        double r588188 = z;
        double r588189 = r588188 - r588186;
        double r588190 = r588187 / r588189;
        return r588190;
}

double f(double x, double y, double z) {
        double r588191 = x;
        double r588192 = y;
        double r588193 = r588191 - r588192;
        double r588194 = z;
        double r588195 = r588194 - r588192;
        double r588196 = r588193 / r588195;
        return r588196;
}

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. Using strategy rm
  5. Applied sub-div0.0

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

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

Reproduce

herbie shell --seed 2019194 
(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)))