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

Percentage Accurate: 98.0% → 98.0%
Time: 9.3s
Alternatives: 15
Speedup: 11.0×

Specification

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

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 15 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.0% accurate, 1.0× speedup?

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

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Final simplification97.7%

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

Alternative 2: 60.6% accurate, 0.8× speedup?

\[\begin{array}{l} t_1 := y \cdot \frac{t}{a}\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{-200}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-228}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-104}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if z < -2.40000000000000002e-200 or 7.00000000000000026e-68 < z

    1. Initial program 98.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 66.4%

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

    if -2.40000000000000002e-200 < z < 5.49999999999999952e-228 or 7.00000000000000057e-104 < z < 7.00000000000000026e-68

    1. Initial program 93.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around inf 88.9%

      \[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z - a}\right)} \]
    3. Step-by-step derivation
      1. neg-mul-188.9%

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      2. distribute-neg-frac88.9%

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

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

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      2. distribute-rgt-neg-out88.9%

        \[\leadsto x + \color{blue}{\left(-y \cdot \frac{t}{z - a}\right)} \]
      3. add-sqr-sqrt44.4%

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

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

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

        \[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}\right) \]
      7. add-sqr-sqrt28.4%

        \[\leadsto x + \left(-y \cdot \frac{\color{blue}{-t}}{z - a}\right) \]
      8. sub-neg28.4%

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

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a} \]
      10. sqrt-unprod45.8%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a} \]
      11. sqr-neg45.8%

        \[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a} \]
      12. sqrt-unprod44.4%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a} \]
      13. add-sqr-sqrt88.9%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z - a}} \]
    8. Step-by-step derivation
      1. mul-1-neg60.0%

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

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

        \[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z - a}\right)} \]
      4. distribute-neg-frac59.9%

        \[\leadsto y \cdot \color{blue}{\frac{-t}{z - a}} \]
    9. Simplified59.9%

      \[\leadsto \color{blue}{y \cdot \frac{-t}{z - a}} \]
    10. Taylor expanded in z around 0 55.4%

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

    if 5.49999999999999952e-228 < z < 7.00000000000000057e-104

    1. Initial program 96.5%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in x around inf 51.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-200}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-228}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-104}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-68}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 82.5% accurate, 0.8× speedup?

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

    1. Initial program 99.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 82.8%

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

    if -8.0000000000000003e-27 < z < 1.89999999999999994e-67

    1. Initial program 95.8%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 76.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified78.7%

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

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

Alternative 4: 82.7% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-7}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-67}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if z < -4.79999999999999957e-7

    1. Initial program 100.0%

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

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

    if -4.79999999999999957e-7 < z < 1.89999999999999994e-67

    1. Initial program 96.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 76.9%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified79.0%

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

    if 1.89999999999999994e-67 < z

    1. Initial program 98.5%

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

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

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

Alternative 5: 82.7% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-68}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if z < -2.80000000000000019e-7

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 79.3%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified89.5%

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

    if -2.80000000000000019e-7 < z < 8.50000000000000026e-68

    1. Initial program 96.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 76.9%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified79.0%

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

    if 8.50000000000000026e-68 < z

    1. Initial program 98.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-7}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-68}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 6: 86.8% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -1.36 \cdot 10^{+84}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-16}:\\ \;\;\;\;x - y \cdot \frac{t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3599999999999999e84

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 79.7%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified94.1%

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

    if -1.3599999999999999e84 < z < 3.80000000000000012e-16

    1. Initial program 96.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around inf 88.5%

      \[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z - a}\right)} \]
    3. Step-by-step derivation
      1. neg-mul-188.5%

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

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

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

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

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

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

        \[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t \cdot t}}}{z - a}\right) \]
      5. sqr-neg54.9%

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

        \[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}\right) \]
      7. add-sqr-sqrt44.8%

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

        \[\leadsto \color{blue}{x - y \cdot \frac{-t}{z - a}} \]
      9. add-sqr-sqrt20.9%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a} \]
      10. sqrt-unprod54.9%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a} \]
      11. sqr-neg54.9%

        \[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a} \]
      12. sqrt-unprod42.8%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a} \]
      13. add-sqr-sqrt88.5%

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

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

    if 3.80000000000000012e-16 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 87.1%

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

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

Alternative 7: 60.2% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := y \cdot \frac{t}{a}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+187}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+203}:\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if t < -1.25000000000000006e148 or 5.9999999999999999e203 < t

    1. Initial program 94.4%

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

      \[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z - a}\right)} \]
    3. Step-by-step derivation
      1. neg-mul-184.0%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      2. distribute-rgt-neg-out84.0%

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

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

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

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

        \[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}\right) \]
      7. add-sqr-sqrt18.0%

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

        \[\leadsto \color{blue}{x - y \cdot \frac{-t}{z - a}} \]
      9. add-sqr-sqrt8.6%

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

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a} \]
      11. sqr-neg7.6%

        \[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a} \]
      12. sqrt-unprod30.5%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a} \]
      13. add-sqr-sqrt84.0%

        \[\leadsto x - y \cdot \frac{\color{blue}{t}}{z - a} \]
    6. Applied egg-rr84.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z - a}} \]
    8. Step-by-step derivation
      1. mul-1-neg56.7%

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{z - a}} \]
      3. distribute-rgt-neg-in63.8%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z - a}\right)} \]
      4. distribute-neg-frac63.8%

        \[\leadsto y \cdot \color{blue}{\frac{-t}{z - a}} \]
    9. Simplified63.8%

      \[\leadsto \color{blue}{y \cdot \frac{-t}{z - a}} \]
    10. Taylor expanded in z around 0 44.4%

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

    if -1.25000000000000006e148 < t < 7.99999999999999926e187

    1. Initial program 98.5%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 65.5%

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

    if 7.99999999999999926e187 < t < 5.9999999999999999e203

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 99.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg86.0%

        \[\leadsto \color{blue}{-\frac{y \cdot t}{z}} \]
      2. *-commutative86.0%

        \[\leadsto -\frac{\color{blue}{t \cdot y}}{z} \]
      3. associate-*r/86.2%

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
      4. distribute-rgt-neg-in86.2%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{z}\right)} \]
      5. distribute-neg-frac86.2%

        \[\leadsto t \cdot \color{blue}{\frac{-y}{z}} \]
    8. Simplified86.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+148}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+187}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+203}:\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 8: 60.1% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := y \cdot \frac{t}{a}\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{+145}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+187}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+290}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if t < -6.7999999999999998e145 or 2.39999999999999985e187 < t < 4.8000000000000003e290

    1. Initial program 96.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around inf 85.8%

      \[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z - a}\right)} \]
    3. Step-by-step derivation
      1. neg-mul-185.8%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)} \]
      2. distribute-rgt-neg-out85.8%

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

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

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

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

        \[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}\right) \]
      7. add-sqr-sqrt16.4%

        \[\leadsto x + \left(-y \cdot \frac{\color{blue}{-t}}{z - a}\right) \]
      8. sub-neg16.4%

        \[\leadsto \color{blue}{x - y \cdot \frac{-t}{z - a}} \]
      9. add-sqr-sqrt8.6%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a} \]
      10. sqrt-unprod13.0%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a} \]
      11. sqr-neg13.0%

        \[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a} \]
      12. sqrt-unprod32.2%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a} \]
      13. add-sqr-sqrt85.8%

        \[\leadsto x - y \cdot \frac{\color{blue}{t}}{z - a} \]
    6. Applied egg-rr85.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z - a}} \]
    8. Step-by-step derivation
      1. mul-1-neg60.1%

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{z - a}} \]
      3. distribute-rgt-neg-in67.3%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z - a}\right)} \]
      4. distribute-neg-frac67.3%

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

      \[\leadsto \color{blue}{y \cdot \frac{-t}{z - a}} \]
    10. Taylor expanded in z around 0 49.7%

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

    if -6.7999999999999998e145 < t < 2.39999999999999985e187

    1. Initial program 98.5%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 65.5%

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

    if 4.8000000000000003e290 < t

    1. Initial program 86.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 59.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{z}\right)} \cdot y \]
    7. Step-by-step derivation
      1. neg-mul-158.0%

        \[\leadsto \color{blue}{\left(-\frac{t}{z}\right)} \cdot y \]
      2. distribute-neg-frac58.0%

        \[\leadsto \color{blue}{\frac{-t}{z}} \cdot y \]
    8. Simplified58.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+145}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+187}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+290}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \end{array} \]

Alternative 9: 63.5% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+148} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if y < -4.0000000000000002e148 or 2.7000000000000001e153 < y

    1. Initial program 97.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 34.3%

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

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

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

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

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

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

    if -4.0000000000000002e148 < y < 2.7000000000000001e153

    1. Initial program 97.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 65.7%

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

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

Alternative 10: 77.2% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -3.25 \cdot 10^{-6} \lor \neg \left(z \leq 1.8 \cdot 10^{-22}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2499999999999998e-6 or 1.7999999999999999e-22 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 75.8%

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

    if -3.2499999999999998e-6 < z < 1.7999999999999999e-22

    1. Initial program 95.6%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 76.3%

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

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

Alternative 11: 77.3% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-5}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-26}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -2.9e-5 or 3.00000000000000012e-26 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 75.3%

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

    if -2.9e-5 < z < 3.00000000000000012e-26

    1. Initial program 95.5%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. *-commutative95.5%

        \[\leadsto x + \color{blue}{\frac{z - t}{z - a} \cdot y} \]
      2. associate-*l/94.8%

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{t \cdot y}}{a} \]
      2. associate-*r/76.4%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    6. Simplified76.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-5}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-26}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 12: 77.4% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{-5}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-18}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -3.10000000000000014e-5 or 1.49999999999999991e-18 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 75.8%

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

    if -3.10000000000000014e-5 < z < 1.49999999999999991e-18

    1. Initial program 95.6%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 73.7%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified76.3%

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

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

Alternative 13: 63.4% accurate, 1.5× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-11}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-54}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4000000000000001e-11 or 4.80000000000000026e-54 < z

    1. Initial program 99.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 73.5%

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

    if -2.4000000000000001e-11 < z < 4.80000000000000026e-54

    1. Initial program 96.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in x around inf 45.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{-11}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-54}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 14: 53.6% accurate, 2.1× speedup?

\[\begin{array}{l} \mathbf{if}\;x \leq -2.55 \cdot 10^{-139}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-112}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x < -2.55000000000000018e-139 or 9.50000000000000056e-112 < x

    1. Initial program 98.8%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in x around inf 62.7%

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

    if -2.55000000000000018e-139 < x < 9.50000000000000056e-112

    1. Initial program 95.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 46.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.55 \cdot 10^{-139}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-112}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 50.6% accurate, 11.0× speedup?

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

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Taylor expanded in x around inf 47.6%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification47.6%

    \[\leadsto x \]

Developer target: 98.1% accurate, 1.0× speedup?

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

Reproduce

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

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

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