Average Error: 0.0 → 0.0
Time: 15.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 r33284948 = x;
        double r33284949 = y;
        double r33284950 = r33284948 - r33284949;
        double r33284951 = z;
        double r33284952 = r33284951 - r33284949;
        double r33284953 = r33284950 / r33284952;
        return r33284953;
}

double f(double x, double y, double z) {
        double r33284954 = x;
        double r33284955 = z;
        double r33284956 = y;
        double r33284957 = r33284955 - r33284956;
        double r33284958 = r33284954 / r33284957;
        double r33284959 = r33284956 / r33284957;
        double r33284960 = r33284958 - r33284959;
        return r33284960;
}

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