Average Error: 0.0 → 0.0
Time: 8.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 r10743962 = x;
        double r10743963 = y;
        double r10743964 = r10743962 - r10743963;
        double r10743965 = z;
        double r10743966 = r10743965 - r10743963;
        double r10743967 = r10743964 / r10743966;
        return r10743967;
}

double f(double x, double y, double z) {
        double r10743968 = x;
        double r10743969 = y;
        double r10743970 = r10743968 - r10743969;
        double r10743971 = z;
        double r10743972 = r10743971 - r10743969;
        double r10743973 = r10743970 / r10743972;
        return r10743973;
}

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