Average Error: 6.6 → 6.6
Time: 9.6s
Precision: 64
\[x + \frac{\left(y - x\right) \cdot z}{t}\]
\[x + \frac{{\left(\left(y - x\right) \cdot z\right)}^{1}}{t}\]
x + \frac{\left(y - x\right) \cdot z}{t}
x + \frac{{\left(\left(y - x\right) \cdot z\right)}^{1}}{t}
double f(double x, double y, double z, double t) {
        double r361541 = x;
        double r361542 = y;
        double r361543 = r361542 - r361541;
        double r361544 = z;
        double r361545 = r361543 * r361544;
        double r361546 = t;
        double r361547 = r361545 / r361546;
        double r361548 = r361541 + r361547;
        return r361548;
}

double f(double x, double y, double z, double t) {
        double r361549 = x;
        double r361550 = y;
        double r361551 = r361550 - r361549;
        double r361552 = z;
        double r361553 = r361551 * r361552;
        double r361554 = 1.0;
        double r361555 = pow(r361553, r361554);
        double r361556 = t;
        double r361557 = r361555 / r361556;
        double r361558 = r361549 + r361557;
        return r361558;
}

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

Original6.6
Target1.9
Herbie6.6
\[\begin{array}{l} \mathbf{if}\;x \lt -9.025511195533004570453352523209034680317 \cdot 10^{-135}:\\ \;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;x \lt 4.275032163700714748507147332551979944314 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{y - x}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if t < -1.5706208345865676e+56 or 1.6399433788347336e+119 < t

    1. Initial program 11.8

      \[x + \frac{\left(y - x\right) \cdot z}{t}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt12.0

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

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

    if -1.5706208345865676e+56 < t < 1.6399433788347336e+119

    1. Initial program 2.1

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

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

      \[\leadsto x + \frac{\color{blue}{{\left(y - x\right)}^{1}} \cdot {z}^{1}}{t}\]
    5. Applied pow-prod-down2.1

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

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

Reproduce

herbie shell --seed 2019294 
(FPCore (x y z t)
  :name "Numeric.Histogram:binBounds from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< x -9.0255111955330046e-135) (- x (* (/ z t) (- x y))) (if (< x 4.2750321637007147e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))

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