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}
\]
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? 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 Initial program 97.7%
\[x + y \cdot \frac{z - t}{z - a}
\]
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 Split input into 3 regimes if z < -2.40000000000000002e-200 or 7.00000000000000026e-68 < z Initial program 98.9%
\[x + y \cdot \frac{z - t}{z - a}
\]
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 Initial program 93.3%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in t around inf 88.9%
\[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z - a}\right)}
\]
Step-by-step derivation neg-mul-188.9%
\[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)}
\]
distribute-neg-frac88.9%
\[\leadsto x + y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Simplified88.9%
\[\leadsto x + y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Step-by-step derivation distribute-frac-neg88.9%
\[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)}
\]
distribute-rgt-neg-out88.9%
\[\leadsto x + \color{blue}{\left(-y \cdot \frac{t}{z - a}\right)}
\]
add-sqr-sqrt44.4%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a}\right)
\]
sqrt-unprod45.8%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t \cdot t}}}{z - a}\right)
\]
sqr-neg45.8%
\[\leadsto x + \left(-y \cdot \frac{\sqrt{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}}{z - a}\right)
\]
sqrt-unprod12.3%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}\right)
\]
add-sqr-sqrt28.4%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{-t}}{z - a}\right)
\]
sub-neg28.4%
\[\leadsto \color{blue}{x - y \cdot \frac{-t}{z - a}}
\]
add-sqr-sqrt12.3%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}
\]
sqrt-unprod45.8%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a}
\]
sqr-neg45.8%
\[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a}
\]
sqrt-unprod44.4%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a}
\]
add-sqr-sqrt88.9%
\[\leadsto x - y \cdot \frac{\color{blue}{t}}{z - a}
\]
Applied egg-rr 88.9%
\[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}}
\]
Taylor expanded in x around 0 60.0%
\[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z - a}}
\]
Step-by-step derivation mul-1-neg60.0%
\[\leadsto \color{blue}{-\frac{y \cdot t}{z - a}}
\]
associate-*r/59.9%
\[\leadsto -\color{blue}{y \cdot \frac{t}{z - a}}
\]
distribute-rgt-neg-in59.9%
\[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z - a}\right)}
\]
distribute-neg-frac59.9%
\[\leadsto y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Simplified59.9%
\[\leadsto \color{blue}{y \cdot \frac{-t}{z - a}}
\]
Taylor expanded in z around 0 55.4%
\[\leadsto y \cdot \color{blue}{\frac{t}{a}}
\]
if 5.49999999999999952e-228 < z < 7.00000000000000057e-104 Initial program 96.5%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in x around inf 51.1%
\[\leadsto \color{blue}{x}
\]
Recombined 3 regimes into one program. 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 Split input into 2 regimes if z < -8.0000000000000003e-27 or 1.89999999999999994e-67 < z Initial program 99.2%
\[x + y \cdot \frac{z - t}{z - a}
\]
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 Initial program 95.8%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around 0 76.6%
\[\leadsto \color{blue}{\frac{y \cdot t}{a} + x}
\]
Step-by-step derivation associate-/l*78.7%
\[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x
\]
Simplified78.7%
\[\leadsto \color{blue}{\frac{y}{\frac{a}{t}} + x}
\]
Recombined 2 regimes into one program. 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 Split input into 3 regimes if z < -4.79999999999999957e-7 Initial program 100.0%
\[x + y \cdot \frac{z - t}{z - a}
\]
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 Initial program 96.0%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around 0 76.9%
\[\leadsto \color{blue}{\frac{y \cdot t}{a} + x}
\]
Step-by-step derivation associate-/l*79.0%
\[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x
\]
Simplified79.0%
\[\leadsto \color{blue}{\frac{y}{\frac{a}{t}} + x}
\]
if 1.89999999999999994e-67 < z Initial program 98.5%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in t around 0 81.3%
\[\leadsto x + y \cdot \color{blue}{\frac{z}{z - a}}
\]
Recombined 3 regimes into one program. 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 Split input into 3 regimes if z < -2.80000000000000019e-7 Initial program 100.0%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in a around 0 79.3%
\[\leadsto \color{blue}{x + \frac{\left(z - t\right) \cdot y}{z}}
\]
Step-by-step derivation +-commutative79.3%
\[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{z} + x}
\]
*-commutative79.3%
\[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{z} + x
\]
associate-/l*89.5%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x
\]
Simplified89.5%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x}
\]
if -2.80000000000000019e-7 < z < 8.50000000000000026e-68 Initial program 96.0%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around 0 76.9%
\[\leadsto \color{blue}{\frac{y \cdot t}{a} + x}
\]
Step-by-step derivation associate-/l*79.0%
\[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x
\]
Simplified79.0%
\[\leadsto \color{blue}{\frac{y}{\frac{a}{t}} + x}
\]
if 8.50000000000000026e-68 < z Initial program 98.5%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in t around 0 81.3%
\[\leadsto x + y \cdot \color{blue}{\frac{z}{z - a}}
\]
Recombined 3 regimes into one program. 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 Split input into 3 regimes if z < -1.3599999999999999e84 Initial program 100.0%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in a around 0 79.7%
\[\leadsto \color{blue}{x + \frac{\left(z - t\right) \cdot y}{z}}
\]
Step-by-step derivation +-commutative79.7%
\[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{z} + x}
\]
*-commutative79.7%
\[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{z} + x
\]
associate-/l*94.1%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x
\]
Simplified94.1%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x}
\]
if -1.3599999999999999e84 < z < 3.80000000000000012e-16 Initial program 96.2%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in t around inf 88.5%
\[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z - a}\right)}
\]
Step-by-step derivation neg-mul-188.5%
\[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)}
\]
distribute-neg-frac88.5%
\[\leadsto x + y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Simplified88.5%
\[\leadsto x + y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Step-by-step derivation distribute-frac-neg88.5%
\[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)}
\]
distribute-rgt-neg-out88.5%
\[\leadsto x + \color{blue}{\left(-y \cdot \frac{t}{z - a}\right)}
\]
add-sqr-sqrt42.8%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a}\right)
\]
sqrt-unprod54.9%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t \cdot t}}}{z - a}\right)
\]
sqr-neg54.9%
\[\leadsto x + \left(-y \cdot \frac{\sqrt{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}}{z - a}\right)
\]
sqrt-unprod20.9%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}\right)
\]
add-sqr-sqrt44.8%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{-t}}{z - a}\right)
\]
sub-neg44.8%
\[\leadsto \color{blue}{x - y \cdot \frac{-t}{z - a}}
\]
add-sqr-sqrt20.9%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}
\]
sqrt-unprod54.9%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a}
\]
sqr-neg54.9%
\[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a}
\]
sqrt-unprod42.8%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a}
\]
add-sqr-sqrt88.5%
\[\leadsto x - y \cdot \frac{\color{blue}{t}}{z - a}
\]
Applied egg-rr 88.5%
\[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}}
\]
if 3.80000000000000012e-16 < z Initial program 99.9%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in t around 0 87.1%
\[\leadsto x + y \cdot \color{blue}{\frac{z}{z - a}}
\]
Recombined 3 regimes into one program. 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 Split input into 3 regimes if t < -1.25000000000000006e148 or 5.9999999999999999e203 < t Initial program 94.4%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in t around inf 84.0%
\[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z - a}\right)}
\]
Step-by-step derivation neg-mul-184.0%
\[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)}
\]
distribute-neg-frac84.0%
\[\leadsto x + y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Simplified84.0%
\[\leadsto x + y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Step-by-step derivation distribute-frac-neg84.0%
\[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)}
\]
distribute-rgt-neg-out84.0%
\[\leadsto x + \color{blue}{\left(-y \cdot \frac{t}{z - a}\right)}
\]
add-sqr-sqrt30.5%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a}\right)
\]
sqrt-unprod7.6%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t \cdot t}}}{z - a}\right)
\]
sqr-neg7.6%
\[\leadsto x + \left(-y \cdot \frac{\sqrt{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}}{z - a}\right)
\]
sqrt-unprod8.6%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}\right)
\]
add-sqr-sqrt18.0%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{-t}}{z - a}\right)
\]
sub-neg18.0%
\[\leadsto \color{blue}{x - y \cdot \frac{-t}{z - a}}
\]
add-sqr-sqrt8.6%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}
\]
sqrt-unprod7.6%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a}
\]
sqr-neg7.6%
\[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a}
\]
sqrt-unprod30.5%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a}
\]
add-sqr-sqrt84.0%
\[\leadsto x - y \cdot \frac{\color{blue}{t}}{z - a}
\]
Applied egg-rr 84.0%
\[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}}
\]
Taylor expanded in x around 0 56.7%
\[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z - a}}
\]
Step-by-step derivation mul-1-neg56.7%
\[\leadsto \color{blue}{-\frac{y \cdot t}{z - a}}
\]
associate-*r/63.8%
\[\leadsto -\color{blue}{y \cdot \frac{t}{z - a}}
\]
distribute-rgt-neg-in63.8%
\[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z - a}\right)}
\]
distribute-neg-frac63.8%
\[\leadsto y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Simplified63.8%
\[\leadsto \color{blue}{y \cdot \frac{-t}{z - a}}
\]
Taylor expanded in z around 0 44.4%
\[\leadsto y \cdot \color{blue}{\frac{t}{a}}
\]
if -1.25000000000000006e148 < t < 7.99999999999999926e187 Initial program 98.5%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around inf 65.5%
\[\leadsto \color{blue}{y + x}
\]
if 7.99999999999999926e187 < t < 5.9999999999999999e203 Initial program 100.0%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in a around 0 99.8%
\[\leadsto \color{blue}{x + \frac{\left(z - t\right) \cdot y}{z}}
\]
Step-by-step derivation +-commutative99.8%
\[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{z} + x}
\]
*-commutative99.8%
\[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{z} + x
\]
associate-/l*100.0%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x
\]
Simplified100.0%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x}
\]
Taylor expanded in y around inf 86.2%
\[\leadsto \color{blue}{\left(1 - \frac{t}{z}\right) \cdot y}
\]
Taylor expanded in t around inf 86.0%
\[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z}}
\]
Step-by-step derivation mul-1-neg86.0%
\[\leadsto \color{blue}{-\frac{y \cdot t}{z}}
\]
*-commutative86.0%
\[\leadsto -\frac{\color{blue}{t \cdot y}}{z}
\]
associate-*r/86.2%
\[\leadsto -\color{blue}{t \cdot \frac{y}{z}}
\]
distribute-rgt-neg-in86.2%
\[\leadsto \color{blue}{t \cdot \left(-\frac{y}{z}\right)}
\]
distribute-neg-frac86.2%
\[\leadsto t \cdot \color{blue}{\frac{-y}{z}}
\]
Simplified86.2%
\[\leadsto \color{blue}{t \cdot \frac{-y}{z}}
\]
Recombined 3 regimes into one program. 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 Split input into 3 regimes if t < -6.7999999999999998e145 or 2.39999999999999985e187 < t < 4.8000000000000003e290 Initial program 96.2%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in t around inf 85.8%
\[\leadsto x + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z - a}\right)}
\]
Step-by-step derivation neg-mul-185.8%
\[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)}
\]
distribute-neg-frac85.8%
\[\leadsto x + y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Simplified85.8%
\[\leadsto x + y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Step-by-step derivation distribute-frac-neg85.8%
\[\leadsto x + y \cdot \color{blue}{\left(-\frac{t}{z - a}\right)}
\]
distribute-rgt-neg-out85.8%
\[\leadsto x + \color{blue}{\left(-y \cdot \frac{t}{z - a}\right)}
\]
add-sqr-sqrt32.2%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a}\right)
\]
sqrt-unprod13.0%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{t \cdot t}}}{z - a}\right)
\]
sqr-neg13.0%
\[\leadsto x + \left(-y \cdot \frac{\sqrt{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}}{z - a}\right)
\]
sqrt-unprod8.6%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}\right)
\]
add-sqr-sqrt16.4%
\[\leadsto x + \left(-y \cdot \frac{\color{blue}{-t}}{z - a}\right)
\]
sub-neg16.4%
\[\leadsto \color{blue}{x - y \cdot \frac{-t}{z - a}}
\]
add-sqr-sqrt8.6%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a}
\]
sqrt-unprod13.0%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a}
\]
sqr-neg13.0%
\[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a}
\]
sqrt-unprod32.2%
\[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a}
\]
add-sqr-sqrt85.8%
\[\leadsto x - y \cdot \frac{\color{blue}{t}}{z - a}
\]
Applied egg-rr 85.8%
\[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}}
\]
Taylor expanded in x around 0 60.1%
\[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z - a}}
\]
Step-by-step derivation mul-1-neg60.1%
\[\leadsto \color{blue}{-\frac{y \cdot t}{z - a}}
\]
associate-*r/67.3%
\[\leadsto -\color{blue}{y \cdot \frac{t}{z - a}}
\]
distribute-rgt-neg-in67.3%
\[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z - a}\right)}
\]
distribute-neg-frac67.3%
\[\leadsto y \cdot \color{blue}{\frac{-t}{z - a}}
\]
Simplified67.3%
\[\leadsto \color{blue}{y \cdot \frac{-t}{z - a}}
\]
Taylor expanded in z around 0 49.7%
\[\leadsto y \cdot \color{blue}{\frac{t}{a}}
\]
if -6.7999999999999998e145 < t < 2.39999999999999985e187 Initial program 98.5%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around inf 65.5%
\[\leadsto \color{blue}{y + x}
\]
if 4.8000000000000003e290 < t Initial program 86.4%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in a around 0 59.2%
\[\leadsto \color{blue}{x + \frac{\left(z - t\right) \cdot y}{z}}
\]
Step-by-step derivation +-commutative59.2%
\[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{z} + x}
\]
*-commutative59.2%
\[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{z} + x
\]
associate-/l*72.0%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x
\]
Simplified72.0%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x}
\]
Taylor expanded in y around inf 58.0%
\[\leadsto \color{blue}{\left(1 - \frac{t}{z}\right) \cdot y}
\]
Taylor expanded in t around inf 58.0%
\[\leadsto \color{blue}{\left(-1 \cdot \frac{t}{z}\right)} \cdot y
\]
Step-by-step derivation neg-mul-158.0%
\[\leadsto \color{blue}{\left(-\frac{t}{z}\right)} \cdot y
\]
distribute-neg-frac58.0%
\[\leadsto \color{blue}{\frac{-t}{z}} \cdot y
\]
Simplified58.0%
\[\leadsto \color{blue}{\frac{-t}{z}} \cdot y
\]
Recombined 3 regimes into one program. 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 Split input into 2 regimes if y < -4.0000000000000002e148 or 2.7000000000000001e153 < y Initial program 97.0%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in a around 0 34.3%
\[\leadsto \color{blue}{x + \frac{\left(z - t\right) \cdot y}{z}}
\]
Step-by-step derivation +-commutative34.3%
\[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{z} + x}
\]
*-commutative34.3%
\[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{z} + x
\]
associate-/l*52.3%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x
\]
Simplified52.3%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x}
\]
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 Initial program 97.9%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around inf 65.7%
\[\leadsto \color{blue}{y + x}
\]
Recombined 2 regimes into one program. 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 Split input into 2 regimes if z < -3.2499999999999998e-6 or 1.7999999999999999e-22 < z Initial program 99.9%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around inf 75.8%
\[\leadsto \color{blue}{y + x}
\]
if -3.2499999999999998e-6 < z < 1.7999999999999999e-22 Initial program 95.6%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around 0 76.3%
\[\leadsto x + y \cdot \color{blue}{\frac{t}{a}}
\]
Recombined 2 regimes into one program. 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 Split input into 2 regimes if z < -2.9e-5 or 3.00000000000000012e-26 < z Initial program 99.9%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around inf 75.3%
\[\leadsto \color{blue}{y + x}
\]
if -2.9e-5 < z < 3.00000000000000012e-26 Initial program 95.5%
\[x + y \cdot \frac{z - t}{z - a}
\]
Step-by-step derivation *-commutative95.5%
\[\leadsto x + \color{blue}{\frac{z - t}{z - a} \cdot y}
\]
associate-*l/94.8%
\[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{z - a}}
\]
associate-/l*96.2%
\[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}}
\]
Applied egg-rr 96.2%
\[\leadsto x + \color{blue}{\frac{z - t}{\frac{z - a}{y}}}
\]
Taylor expanded in z around 0 74.0%
\[\leadsto x + \color{blue}{\frac{y \cdot t}{a}}
\]
Step-by-step derivation *-commutative74.0%
\[\leadsto x + \frac{\color{blue}{t \cdot y}}{a}
\]
associate-*r/76.4%
\[\leadsto x + \color{blue}{t \cdot \frac{y}{a}}
\]
Simplified76.4%
\[\leadsto x + \color{blue}{t \cdot \frac{y}{a}}
\]
Recombined 2 regimes into one program. 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 Split input into 2 regimes if z < -3.10000000000000014e-5 or 1.49999999999999991e-18 < z Initial program 99.9%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around inf 75.8%
\[\leadsto \color{blue}{y + x}
\]
if -3.10000000000000014e-5 < z < 1.49999999999999991e-18 Initial program 95.6%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around 0 73.7%
\[\leadsto \color{blue}{\frac{y \cdot t}{a} + x}
\]
Step-by-step derivation associate-/l*76.3%
\[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x
\]
Simplified76.3%
\[\leadsto \color{blue}{\frac{y}{\frac{a}{t}} + x}
\]
Recombined 2 regimes into one program. 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 Split input into 2 regimes if z < -2.4000000000000001e-11 or 4.80000000000000026e-54 < z Initial program 99.2%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in z around inf 73.5%
\[\leadsto \color{blue}{y + x}
\]
if -2.4000000000000001e-11 < z < 4.80000000000000026e-54 Initial program 96.0%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in x around inf 45.5%
\[\leadsto \color{blue}{x}
\]
Recombined 2 regimes into one program. 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 Split input into 2 regimes if x < -2.55000000000000018e-139 or 9.50000000000000056e-112 < x Initial program 98.8%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in x around inf 62.7%
\[\leadsto \color{blue}{x}
\]
if -2.55000000000000018e-139 < x < 9.50000000000000056e-112 Initial program 95.3%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in a around 0 46.4%
\[\leadsto \color{blue}{x + \frac{\left(z - t\right) \cdot y}{z}}
\]
Step-by-step derivation +-commutative46.4%
\[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{z} + x}
\]
*-commutative46.4%
\[\leadsto \frac{\color{blue}{y \cdot \left(z - t\right)}}{z} + x
\]
associate-/l*51.0%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x
\]
Simplified51.0%
\[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}} + x}
\]
Taylor expanded in y around inf 46.5%
\[\leadsto \color{blue}{\left(1 - \frac{t}{z}\right) \cdot y}
\]
Taylor expanded in t around 0 34.2%
\[\leadsto \color{blue}{y}
\]
Recombined 2 regimes into one program. 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 Initial program 97.7%
\[x + y \cdot \frac{z - t}{z - a}
\]
Taylor expanded in x around inf 47.6%
\[\leadsto \color{blue}{x}
\]
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)))))