Average Error: 12.5 → 2.3
Time: 7.9s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[x \cdot \frac{y - z}{t - z}\]
\frac{x \cdot \left(y - z\right)}{t - z}
x \cdot \frac{y - z}{t - z}
double f(double x, double y, double z, double t) {
        double r426127 = x;
        double r426128 = y;
        double r426129 = z;
        double r426130 = r426128 - r426129;
        double r426131 = r426127 * r426130;
        double r426132 = t;
        double r426133 = r426132 - r426129;
        double r426134 = r426131 / r426133;
        return r426134;
}

double f(double x, double y, double z, double t) {
        double r426135 = x;
        double r426136 = y;
        double r426137 = z;
        double r426138 = r426136 - r426137;
        double r426139 = t;
        double r426140 = r426139 - r426137;
        double r426141 = r426138 / r426140;
        double r426142 = r426135 * r426141;
        return r426142;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original12.5
Target2.2
Herbie2.3
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Split input into 3 regimes
  2. if x < 7.699492722691725e-213

    1. Initial program 11.3

      \[\frac{x \cdot \left(y - z\right)}{t - z}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity11.3

      \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{1 \cdot \left(t - z\right)}}\]
    4. Applied times-frac2.4

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}}\]
    5. Simplified2.4

      \[\leadsto \color{blue}{x} \cdot \frac{y - z}{t - z}\]

    if 7.699492722691725e-213 < x < 6.215776646690527e-89

    1. Initial program 2.1

      \[\frac{x \cdot \left(y - z\right)}{t - z}\]
    2. Using strategy rm
    3. Applied sub-neg2.1

      \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(-z\right)\right)}}{t - z}\]
    4. Applied distribute-lft-in2.1

      \[\leadsto \frac{\color{blue}{x \cdot y + x \cdot \left(-z\right)}}{t - z}\]

    if 6.215776646690527e-89 < x

    1. Initial program 18.4

      \[\frac{x \cdot \left(y - z\right)}{t - z}\]
    2. Using strategy rm
    3. Applied associate-/l*1.9

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}}\]
    4. Using strategy rm
    5. Applied div-inv2.0

      \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot \frac{1}{y - z}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification2.3

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

Reproduce

herbie shell --seed 2019297 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (/ x (/ (- t z) (- y z)))

  (/ (* x (- y z)) (- t z)))