Average Error: 0.0 → 0.0
Time: 1.2s
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 r531002 = x;
        double r531003 = y;
        double r531004 = r531002 - r531003;
        double r531005 = z;
        double r531006 = r531005 - r531003;
        double r531007 = r531004 / r531006;
        return r531007;
}

double f(double x, double y, double z) {
        double r531008 = x;
        double r531009 = y;
        double r531010 = r531008 - r531009;
        double r531011 = z;
        double r531012 = r531011 - r531009;
        double r531013 = r531010 / r531012;
        return r531013;
}

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. Final simplification0.0

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

Reproduce

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