Average Error: 0.0 → 0.0
Time: 15.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 r24993328 = x;
        double r24993329 = y;
        double r24993330 = r24993328 - r24993329;
        double r24993331 = z;
        double r24993332 = r24993331 - r24993329;
        double r24993333 = r24993330 / r24993332;
        return r24993333;
}

double f(double x, double y, double z) {
        double r24993334 = x;
        double r24993335 = y;
        double r24993336 = r24993334 - r24993335;
        double r24993337 = z;
        double r24993338 = r24993337 - r24993335;
        double r24993339 = r24993336 / r24993338;
        return r24993339;
}

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