Average Error: 0.0 → 0.0
Time: 5.3s
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 r531243 = x;
        double r531244 = y;
        double r531245 = r531243 - r531244;
        double r531246 = z;
        double r531247 = r531246 - r531244;
        double r531248 = r531245 / r531247;
        return r531248;
}

double f(double x, double y, double z) {
        double r531249 = x;
        double r531250 = z;
        double r531251 = y;
        double r531252 = r531250 - r531251;
        double r531253 = r531249 / r531252;
        double r531254 = r531251 / r531252;
        double r531255 = r531253 - r531254;
        return r531255;
}

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 2019294 
(FPCore (x y z)
  :name "Graphics.Rasterific.Shading:$sgradientColorAt from Rasterific-0.6.1"
  :precision binary64

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

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