Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 93.2% → 96.6%
Time: 8.3s
Alternatives: 13
Speedup: TODO×

Specification

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

Your Program's Arguments

Results

Enter valid numbers for all inputs

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Target

Original93.2%
Target97.7%
Herbie96.6%
\[\begin{array}{l} \mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\ \;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\ \mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{y - x}{t} \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\ \end{array} \]

Alternative 1?

\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+305} \lor \neg \left(t_1 \leq 10^{+308}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < -1.9999999999999999e305 or 1e308 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t))

    1. Initial program 85.0%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 85.0%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative85.0%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/95.1%

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

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

    if -1.9999999999999999e305 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) z) t)) < 1e308

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot z}{t} \leq -2 \cdot 10^{+305} \lor \neg \left(x + \frac{\left(y - x\right) \cdot z}{t} \leq 10^{+308}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\ \end{array} \]

Alternative 2?

\[\begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+66} \lor \neg \left(y \leq 5.8 \cdot 10^{-37} \lor \neg \left(y \leq 13.4\right) \land y \leq 6.2 \cdot 10^{+131}\right):\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if y < -6.6000000000000003e66 or 5.80000000000000009e-37 < y < 13.4000000000000004 or 6.20000000000000032e131 < y

    1. Initial program 92.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 73.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around inf 63.3%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*r/67.6%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified67.6%

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

    if -6.6000000000000003e66 < y < 5.80000000000000009e-37 or 13.4000000000000004 < y < 6.20000000000000032e131

    1. Initial program 96.2%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 52.2%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+66} \lor \neg \left(y \leq 5.8 \cdot 10^{-37} \lor \neg \left(y \leq 13.4\right) \land y \leq 6.2 \cdot 10^{+131}\right):\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3?

\[\begin{array}{l} t_1 := \frac{y}{\frac{t}{z}}\\ \mathbf{if}\;y \leq -1.25 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-36}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 14.2:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+134}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if y < -1.25e51 or 5.6000000000000002e-36 < y < 14.199999999999999

    1. Initial program 94.3%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 73.0%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around inf 60.2%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*r/64.0%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified64.0%

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    6. Step-by-step derivation
      1. clear-num63.9%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv64.0%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    7. Applied egg-rr64.0%

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

    if -1.25e51 < y < 5.6000000000000002e-36 or 14.199999999999999 < y < 4.4e134

    1. Initial program 96.7%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 52.3%

      \[\leadsto \color{blue}{x} \]

    if 4.4e134 < y

    1. Initial program 87.3%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 71.0%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around inf 65.7%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*r/73.0%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified73.0%

      \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+51}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-36}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 14.2:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+134}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 4?

\[\begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{-42}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{-198}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{-65}:\\ \;\;\;\;-z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if t < -5.2e-42 or 7.4e-65 < t

    1. Initial program 90.5%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 60.5%

      \[\leadsto \color{blue}{x} \]

    if -5.2e-42 < t < -4.9000000000000002e-198

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 81.3%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around inf 56.4%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*r/56.6%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified56.6%

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

    if -4.9000000000000002e-198 < t < 7.4e-65

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 90.0%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative90.0%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/86.4%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr86.4%

      \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    5. Taylor expanded in y around 0 63.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot x}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg63.5%

        \[\leadsto \color{blue}{-\frac{z \cdot x}{t}} \]
      2. associate-*r/59.9%

        \[\leadsto -\color{blue}{z \cdot \frac{x}{t}} \]
      3. distribute-rgt-neg-in59.9%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{x}{t}\right)} \]
    7. Simplified59.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{-42}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{-198}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{-65}:\\ \;\;\;\;-z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5?

\[\begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-41}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-200}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1e-41 or 4.9999999999999999e-61 < t

    1. Initial program 90.5%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 60.5%

      \[\leadsto \color{blue}{x} \]

    if -1.1e-41 < t < -8.50000000000000014e-200

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 81.3%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around inf 56.4%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate-*r/56.6%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    5. Simplified56.6%

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

    if -8.50000000000000014e-200 < t < 4.9999999999999999e-61

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 90.0%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Taylor expanded in y around 0 63.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot x}{t}} \]
    4. Step-by-step derivation
      1. mul-1-neg63.5%

        \[\leadsto \color{blue}{-\frac{z \cdot x}{t}} \]
      2. distribute-neg-frac63.5%

        \[\leadsto \color{blue}{\frac{-z \cdot x}{t}} \]
      3. distribute-rgt-neg-out63.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(-x\right)}}{t} \]
      4. associate-*l/64.6%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(-x\right)} \]
    5. Simplified64.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-41}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-200}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6?

\[\begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-101} \lor \neg \left(t \leq 4.5 \cdot 10^{-67}\right):\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0000000000000001e-101 or 4.50000000000000015e-67 < t

    1. Initial program 91.4%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 84.3%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/32.0%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified87.9%

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

    if -2.0000000000000001e-101 < t < 4.50000000000000015e-67

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 89.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative89.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/85.8%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr85.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-101} \lor \neg \left(t \leq 4.5 \cdot 10^{-67}\right):\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \end{array} \]

Alternative 7?

\[\begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+55}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+163}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if t < -7.50000000000000014e55 or 7.19999999999999955e163 < t

    1. Initial program 87.0%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in z around 0 74.3%

      \[\leadsto \color{blue}{x} \]

    if -7.50000000000000014e55 < t < 7.19999999999999955e163

    1. Initial program 98.3%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 76.2%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative76.2%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/75.6%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr75.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+55}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+163}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8?

\[\begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{-101}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-70}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if t < -2.05000000000000013e-101

    1. Initial program 92.0%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 83.1%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/29.5%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified85.3%

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

    if -2.05000000000000013e-101 < t < 4.9999999999999998e-70

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 89.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative89.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/85.8%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr85.8%

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

    if 4.9999999999999998e-70 < t

    1. Initial program 90.7%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 85.7%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*l/91.3%

        \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative91.3%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{t}} \]
    4. Simplified91.3%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{-101}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-70}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \end{array} \]

Alternative 9?

\[\begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-102}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-67}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if t < -6.99999999999999973e-102

    1. Initial program 92.0%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Step-by-step derivation
      1. +-commutative92.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
      2. *-commutative92.0%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} + x \]
      3. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} + x \]
      4. fma-def99.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.9%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right) + x} \]
      2. associate-*l/92.0%

        \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} + x \]
      3. *-commutative92.0%

        \[\leadsto \frac{\color{blue}{\left(y - x\right) \cdot z}}{t} + x \]
      4. associate-*r/99.9%

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{t}} + x \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{t} + x} \]
    6. Step-by-step derivation
      1. associate-*r/92.0%

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} + x \]
      2. *-commutative92.0%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} + x \]
      3. associate-/l*99.9%

        \[\leadsto \color{blue}{\frac{z}{\frac{t}{y - x}}} + x \]
    7. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{y - x}}} + x \]
    8. Taylor expanded in y around inf 85.4%

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

    if -6.99999999999999973e-102 < t < 2.4e-67

    1. Initial program 99.8%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in t around 0 89.5%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t}} \]
    3. Step-by-step derivation
      1. *-commutative89.5%

        \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} \]
      2. associate-*l/85.8%

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr85.8%

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

    if 2.4e-67 < t

    1. Initial program 90.7%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 85.7%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*l/91.3%

        \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative91.3%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{t}} \]
    4. Simplified91.3%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-102}:\\ \;\;\;\;x + \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-67}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \end{array} \]

Alternative 10?

\[\begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+49}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-16}:\\ \;\;\;\;x - x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if y < -1.5000000000000001e49

    1. Initial program 93.1%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 86.7%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/67.0%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified89.8%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    5. Step-by-step derivation
      1. clear-num66.9%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{t}{z}}} \]
      2. un-div-inv67.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} \]
    6. Applied egg-rr89.8%

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

    if -1.5000000000000001e49 < y < 2.1000000000000001e-16

    1. Initial program 97.9%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in x around inf 89.3%

      \[\leadsto \color{blue}{\left(1 + -1 \cdot \frac{z}{t}\right) \cdot x} \]
    3. Step-by-step derivation
      1. *-commutative89.3%

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{t}\right)} \]
      2. distribute-lft-in89.3%

        \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-1 \cdot \frac{z}{t}\right)} \]
      3. *-rgt-identity89.3%

        \[\leadsto \color{blue}{x} + x \cdot \left(-1 \cdot \frac{z}{t}\right) \]
      4. mul-1-neg89.3%

        \[\leadsto x + x \cdot \color{blue}{\left(-\frac{z}{t}\right)} \]
      5. distribute-rgt-neg-in89.3%

        \[\leadsto x + \color{blue}{\left(-x \cdot \frac{z}{t}\right)} \]
      6. unsub-neg89.3%

        \[\leadsto \color{blue}{x - x \cdot \frac{z}{t}} \]
    4. Simplified89.3%

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

    if 2.1000000000000001e-16 < y

    1. Initial program 88.3%

      \[x + \frac{\left(y - x\right) \cdot z}{t} \]
    2. Taylor expanded in y around inf 84.0%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{t}} \]
    3. Step-by-step derivation
      1. associate-*r/58.6%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified90.6%

      \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+49}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-16}:\\ \;\;\;\;x - x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \end{array} \]

Alternative 11?

\[x + \left(y - x\right) \cdot \frac{z}{t} \]
Derivation
  1. Initial program 94.7%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Step-by-step derivation
    1. +-commutative94.7%

      \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot z}{t} + x} \]
    2. *-commutative94.7%

      \[\leadsto \frac{\color{blue}{z \cdot \left(y - x\right)}}{t} + x \]
    3. associate-*l/98.0%

      \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} + x \]
    4. fma-def98.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)} \]
  3. Simplified98.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)} \]
  4. Step-by-step derivation
    1. fma-udef98.0%

      \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right) + x} \]
    2. associate-*l/94.7%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} + x \]
    3. *-commutative94.7%

      \[\leadsto \frac{\color{blue}{\left(y - x\right) \cdot z}}{t} + x \]
    4. associate-*r/98.0%

      \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{t}} + x \]
  5. Applied egg-rr98.0%

    \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{t} + x} \]
  6. Final simplification98.0%

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

Alternative 12?

\[x + \frac{y - x}{\frac{t}{z}} \]
Derivation
  1. Initial program 94.7%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Step-by-step derivation
    1. associate-/l*98.0%

      \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
  3. Simplified98.0%

    \[\leadsto \color{blue}{x + \frac{y - x}{\frac{t}{z}}} \]
  4. Final simplification98.0%

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

Alternative 13?

\[x \]
Derivation
  1. Initial program 94.7%

    \[x + \frac{\left(y - x\right) \cdot z}{t} \]
  2. Taylor expanded in z around 0 40.1%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification40.1%

    \[\leadsto x \]

Reproduce

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

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

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