Average Error: 0.0 → 0.0
Time: 13.1s
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 r31627496 = x;
        double r31627497 = y;
        double r31627498 = r31627496 - r31627497;
        double r31627499 = z;
        double r31627500 = r31627499 - r31627497;
        double r31627501 = r31627498 / r31627500;
        return r31627501;
}

double f(double x, double y, double z) {
        double r31627502 = x;
        double r31627503 = y;
        double r31627504 = r31627502 - r31627503;
        double r31627505 = z;
        double r31627506 = r31627505 - r31627503;
        double r31627507 = r31627504 / r31627506;
        return r31627507;
}

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