Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A

Percentage Accurate: 85.9% → 98.1%
Time: 8.6s
Alternatives: 11
Speedup: 11.0×

Specification

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

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 11 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.

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
  3. Simplified97.6%

    \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
  4. Final simplification97.6%

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

Alternative 2: 76.7% accurate, 0.7× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+83}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+22}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-24}:\\ \;\;\;\;x + \frac{1}{\frac{1}{t}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
Derivation
  1. Split input into 4 regimes
  2. if z < -3.5999999999999997e83 or 1.3e44 < z

    1. Initial program 68.9%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around inf 81.6%

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

    if -3.5999999999999997e83 < z < -2.3000000000000002e22

    1. Initial program 82.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 82.3%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Taylor expanded in a around 0 77.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z} + x} \]
    6. Step-by-step derivation
      1. +-commutative77.6%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg77.6%

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

        \[\leadsto \color{blue}{x - \frac{y \cdot t}{z}} \]
      4. associate-/l*77.6%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
    7. Simplified77.6%

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{t}{z}} \]
    10. Simplified77.6%

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

    if -2.3000000000000002e22 < z < -1.10000000000000001e-24

    1. Initial program 100.0%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. add-cube-cbrt99.6%

        \[\leadsto x + \frac{\color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot t} \cdot \sqrt[3]{\left(y - z\right) \cdot t}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot t}}}{a - z} \]
      2. pow399.6%

        \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}{a - z} \]
    3. Applied egg-rr99.6%

      \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}{a - z} \]
    4. Step-by-step derivation
      1. clear-num99.6%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}} \]
      2. inv-pow99.6%

        \[\leadsto x + \color{blue}{{\left(\frac{a - z}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}\right)}^{-1}} \]
      3. unpow399.6%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot t} \cdot \sqrt[3]{\left(y - z\right) \cdot t}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot t}}}\right)}^{-1} \]
      4. add-cube-cbrt99.9%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{\left(y - z\right) \cdot t}}\right)}^{-1} \]
      5. *-commutative99.9%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{t \cdot \left(y - z\right)}}\right)}^{-1} \]
      6. associate-/r*100.0%

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

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - z}{t}}{y - z}\right)}^{-1}} \]
    6. Step-by-step derivation
      1. unpow-1100.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{t}}{y - z}}} \]
    7. Simplified100.0%

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

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

    if -1.10000000000000001e-24 < z < 1.3e44

    1. Initial program 94.9%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 88.8%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Step-by-step derivation
      1. *-commutative88.8%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
      2. clear-num88.7%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      3. un-div-inv89.5%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    6. Applied egg-rr89.5%

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

      \[\leadsto x + \frac{t}{\color{blue}{\frac{a}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+83}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+22}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-24}:\\ \;\;\;\;x + \frac{1}{\frac{1}{t}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+44}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 3: 76.9% accurate, 0.7× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -8.4 \cdot 10^{+83}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-45}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-75}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
Derivation
  1. Split input into 4 regimes
  2. if z < -8.4000000000000001e83 or 1.08e42 < z

    1. Initial program 68.9%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around inf 81.6%

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

    if -8.4000000000000001e83 < z < -5.3999999999999997e-45

    1. Initial program 93.0%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 81.9%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Taylor expanded in a around 0 76.5%

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg76.5%

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

        \[\leadsto \color{blue}{x - \frac{y \cdot t}{z}} \]
      4. associate-/l*76.5%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
    7. Simplified76.5%

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{t}{z}} \]
    10. Simplified76.5%

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

    if -5.3999999999999997e-45 < z < -1.0500000000000001e-75

    1. Initial program 100.0%

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

        \[\leadsto x + \frac{\color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot t} \cdot \sqrt[3]{\left(y - z\right) \cdot t}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot t}}}{a - z} \]
      2. pow399.8%

        \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}{a - z} \]
    3. Applied egg-rr99.8%

      \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}{a - z} \]
    4. Step-by-step derivation
      1. clear-num99.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}} \]
      2. inv-pow99.8%

        \[\leadsto x + \color{blue}{{\left(\frac{a - z}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}\right)}^{-1}} \]
      3. unpow399.8%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot t} \cdot \sqrt[3]{\left(y - z\right) \cdot t}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot t}}}\right)}^{-1} \]
      4. add-cube-cbrt99.8%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{\left(y - z\right) \cdot t}}\right)}^{-1} \]
      5. *-commutative99.8%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{t \cdot \left(y - z\right)}}\right)}^{-1} \]
      6. associate-/r*100.0%

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

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - z}{t}}{y - z}\right)}^{-1}} \]
    6. Step-by-step derivation
      1. unpow-1100.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{t}}{y - z}}} \]
    7. Simplified100.0%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{t}}{y - z}}} \]
    8. Taylor expanded in y around 0 100.0%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    9. Step-by-step derivation
      1. mul-1-neg100.0%

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

        \[\leadsto x + \left(-\color{blue}{\frac{t}{\frac{a - z}{z}}}\right) \]
      3. distribute-neg-frac100.0%

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
    10. Simplified100.0%

      \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
    11. Taylor expanded in a around inf 100.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a} + x} \]
    12. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a}} \]
      2. mul-1-neg100.0%

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

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

        \[\leadsto x + \left(-\color{blue}{z \cdot \frac{t}{a}}\right) \]
      5. sub-neg100.0%

        \[\leadsto \color{blue}{x - z \cdot \frac{t}{a}} \]
    13. Simplified100.0%

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

    if -1.0500000000000001e-75 < z < 1.08e42

    1. Initial program 94.5%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 88.7%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Step-by-step derivation
      1. *-commutative88.7%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
      2. clear-num88.7%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      3. un-div-inv89.5%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    6. Applied egg-rr89.5%

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

      \[\leadsto x + \frac{t}{\color{blue}{\frac{a}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.4 \cdot 10^{+83}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-45}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-75}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 4: 76.8% accurate, 0.7× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+86}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-46}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
Derivation
  1. Split input into 4 regimes
  2. if z < -2.20000000000000003e86 or 7.00000000000000047e42 < z

    1. Initial program 68.9%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around inf 81.6%

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

    if -2.20000000000000003e86 < z < -8.6000000000000007e-46

    1. Initial program 93.0%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 81.9%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Taylor expanded in a around 0 76.5%

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

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(y \cdot t\right)}{z}} \]
      2. neg-mul-176.5%

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

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

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

    if -8.6000000000000007e-46 < z < -2.6e-75

    1. Initial program 100.0%

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

        \[\leadsto x + \frac{\color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot t} \cdot \sqrt[3]{\left(y - z\right) \cdot t}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot t}}}{a - z} \]
      2. pow399.8%

        \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}{a - z} \]
    3. Applied egg-rr99.8%

      \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}{a - z} \]
    4. Step-by-step derivation
      1. clear-num99.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}} \]
      2. inv-pow99.8%

        \[\leadsto x + \color{blue}{{\left(\frac{a - z}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}\right)}^{-1}} \]
      3. unpow399.8%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot t} \cdot \sqrt[3]{\left(y - z\right) \cdot t}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot t}}}\right)}^{-1} \]
      4. add-cube-cbrt99.8%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{\left(y - z\right) \cdot t}}\right)}^{-1} \]
      5. *-commutative99.8%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{t \cdot \left(y - z\right)}}\right)}^{-1} \]
      6. associate-/r*100.0%

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

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - z}{t}}{y - z}\right)}^{-1}} \]
    6. Step-by-step derivation
      1. unpow-1100.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{t}}{y - z}}} \]
    7. Simplified100.0%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{t}}{y - z}}} \]
    8. Taylor expanded in y around 0 100.0%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    9. Step-by-step derivation
      1. mul-1-neg100.0%

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

        \[\leadsto x + \left(-\color{blue}{\frac{t}{\frac{a - z}{z}}}\right) \]
      3. distribute-neg-frac100.0%

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
    10. Simplified100.0%

      \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
    11. Taylor expanded in a around inf 100.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a} + x} \]
    12. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a}} \]
      2. mul-1-neg100.0%

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

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

        \[\leadsto x + \left(-\color{blue}{z \cdot \frac{t}{a}}\right) \]
      5. sub-neg100.0%

        \[\leadsto \color{blue}{x - z \cdot \frac{t}{a}} \]
    13. Simplified100.0%

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

    if -2.6e-75 < z < 7.00000000000000047e42

    1. Initial program 94.5%

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

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

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 88.7%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Step-by-step derivation
      1. *-commutative88.7%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
      2. clear-num88.7%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      3. un-div-inv89.5%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    6. Applied egg-rr89.5%

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

      \[\leadsto x + \frac{t}{\color{blue}{\frac{a}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+86}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-46}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 5: 83.7% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+78} \lor \neg \left(z \leq 7.5 \cdot 10^{+143}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1e78 or 7.49999999999999974e143 < z

    1. Initial program 62.0%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around inf 83.1%

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

    if -3.1e78 < z < 7.49999999999999974e143

    1. Initial program 94.6%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified96.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 87.4%

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

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

Alternative 6: 83.8% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+78} \lor \neg \left(z \leq 1.75 \cdot 10^{+140}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4999999999999999e78 or 1.74999999999999995e140 < z

    1. Initial program 62.0%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around inf 83.1%

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

    if -4.4999999999999999e78 < z < 1.74999999999999995e140

    1. Initial program 94.6%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified96.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 87.4%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Step-by-step derivation
      1. *-commutative87.4%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
      2. clear-num87.4%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      3. un-div-inv87.9%

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

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

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

Alternative 7: 86.0% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+77} \lor \neg \left(z \leq 5.2 \cdot 10^{+139}\right):\\ \;\;\;\;x - t \cdot \frac{z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8999999999999998e77 or 5.20000000000000044e139 < z

    1. Initial program 62.0%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. add-cube-cbrt61.6%

        \[\leadsto x + \frac{\color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot t} \cdot \sqrt[3]{\left(y - z\right) \cdot t}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot t}}}{a - z} \]
      2. pow361.6%

        \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}{a - z} \]
    3. Applied egg-rr61.6%

      \[\leadsto x + \frac{\color{blue}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}{a - z} \]
    4. Step-by-step derivation
      1. clear-num61.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}}} \]
      2. inv-pow61.7%

        \[\leadsto x + \color{blue}{{\left(\frac{a - z}{{\left(\sqrt[3]{\left(y - z\right) \cdot t}\right)}^{3}}\right)}^{-1}} \]
      3. unpow361.6%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{\left(\sqrt[3]{\left(y - z\right) \cdot t} \cdot \sqrt[3]{\left(y - z\right) \cdot t}\right) \cdot \sqrt[3]{\left(y - z\right) \cdot t}}}\right)}^{-1} \]
      4. add-cube-cbrt62.0%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{\left(y - z\right) \cdot t}}\right)}^{-1} \]
      5. *-commutative62.0%

        \[\leadsto x + {\left(\frac{a - z}{\color{blue}{t \cdot \left(y - z\right)}}\right)}^{-1} \]
      6. associate-/r*96.0%

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

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - z}{t}}{y - z}\right)}^{-1}} \]
    6. Step-by-step derivation
      1. unpow-196.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{t}}{y - z}}} \]
    7. Simplified96.0%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - z}{t}}{y - z}}} \]
    8. Taylor expanded in y around 0 62.0%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    9. Step-by-step derivation
      1. mul-1-neg62.0%

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
    10. Simplified94.5%

      \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - z}{z}}} \]
    11. Taylor expanded in x around 0 62.0%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot z}{a - z}} \]
    12. Step-by-step derivation
      1. mul-1-neg62.0%

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

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

        \[\leadsto \color{blue}{x - t \cdot \frac{z}{a - z}} \]
    13. Simplified94.6%

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

    if -3.8999999999999998e77 < z < 5.20000000000000044e139

    1. Initial program 94.6%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified96.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 87.4%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Step-by-step derivation
      1. *-commutative87.4%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
      2. clear-num87.4%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      3. un-div-inv87.9%

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

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

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

Alternative 8: 76.8% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{-28}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+47}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -1.90000000000000005e-28 or 1.95000000000000013e47 < z

    1. Initial program 74.0%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around inf 77.7%

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

    if -1.90000000000000005e-28 < z < 1.95000000000000013e47

    1. Initial program 94.9%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around 0 76.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{-28}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+47}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 9: 76.8% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-35}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+43}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -7.20000000000000038e-35 or 6.6000000000000003e43 < z

    1. Initial program 74.0%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around inf 77.7%

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

    if -7.20000000000000038e-35 < z < 6.6000000000000003e43

    1. Initial program 94.9%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified95.5%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in y around inf 88.8%

      \[\leadsto x + \color{blue}{\frac{y}{a - z}} \cdot t \]
    5. Step-by-step derivation
      1. *-commutative88.8%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a - z}} \]
      2. clear-num88.7%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      3. un-div-inv89.5%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    6. Applied egg-rr89.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-35}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+43}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 10: 62.9% accurate, 1.5× speedup?

\[\begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+113}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+187}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if a < -2.39999999999999983e113 or 1.6500000000000001e187 < a

    1. Initial program 83.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Taylor expanded in t around 0 67.4%

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

    if -2.39999999999999983e113 < a < 1.6500000000000001e187

    1. Initial program 85.2%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified97.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
    4. Taylor expanded in z around inf 60.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.4 \cdot 10^{+113}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+187}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 50.5% accurate, 11.0× speedup?

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

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

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

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} + x \]
    3. fma-def96.5%

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
  4. Taylor expanded in t around 0 48.6%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification48.6%

    \[\leadsto x \]

Developer target: 99.2% accurate, 0.7× speedup?

\[\begin{array}{l} \mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot t\\ \mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{a - z} \cdot t\\ \end{array} \]

Reproduce

?
herbie shell --seed 2023167 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
  :precision binary64

  :herbie-target
  (if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))

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