Average Error: 0.0 → 0.0
Time: 3.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 r574264 = x;
        double r574265 = y;
        double r574266 = r574264 - r574265;
        double r574267 = z;
        double r574268 = r574267 - r574265;
        double r574269 = r574266 / r574268;
        return r574269;
}

double f(double x, double y, double z) {
        double r574270 = x;
        double r574271 = z;
        double r574272 = y;
        double r574273 = r574271 - r574272;
        double r574274 = r574270 / r574273;
        double r574275 = r574272 / r574273;
        double r574276 = r574274 - r574275;
        return r574276;
}

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 2020039 +o rules:numerics
(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)))