Average Error: 0.0 → 0.0
Time: 9.6s
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 r475950 = x;
        double r475951 = y;
        double r475952 = r475950 - r475951;
        double r475953 = z;
        double r475954 = r475953 - r475951;
        double r475955 = r475952 / r475954;
        return r475955;
}

double f(double x, double y, double z) {
        double r475956 = x;
        double r475957 = y;
        double r475958 = r475956 - r475957;
        double r475959 = z;
        double r475960 = r475959 - r475957;
        double r475961 = r475958 / r475960;
        return r475961;
}

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