- Split input into 3 regimes
if (/ (* (+ (* (* x 1/6) x) (+ 1 (* 1/2 x))) (- (- (* 1/2 x) 1) (* (* x 1/6) x))) (cbrt (* (* (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))))) < 0.9992327618685036
Initial program 0.3
\[\frac{e^{x} - 1}{x}\]
- Using strategy
rm Applied flip3--0.3
\[\leadsto \frac{\color{blue}{\frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{e^{x} \cdot e^{x} + \left(1 \cdot 1 + e^{x} \cdot 1\right)}}}{x}\]
if 0.9992327618685036 < (/ (* (+ (* (* x 1/6) x) (+ 1 (* 1/2 x))) (- (- (* 1/2 x) 1) (* (* x 1/6) x))) (cbrt (* (* (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))))) < 1.00028036142059
Initial program 60.4
\[\frac{e^{x} - 1}{x}\]
Taylor expanded around 0 0.1
\[\leadsto \color{blue}{\frac{1}{2} \cdot x + \left(\frac{1}{6} \cdot {x}^{2} + 1\right)}\]
- Using strategy
rm Applied add-log-exp0.1
\[\leadsto \frac{1}{2} \cdot x + \color{blue}{\log \left(e^{\frac{1}{6} \cdot {x}^{2} + 1}\right)}\]
Applied add-log-exp0.1
\[\leadsto \color{blue}{\log \left(e^{\frac{1}{2} \cdot x}\right)} + \log \left(e^{\frac{1}{6} \cdot {x}^{2} + 1}\right)\]
Applied sum-log0.1
\[\leadsto \color{blue}{\log \left(e^{\frac{1}{2} \cdot x} \cdot e^{\frac{1}{6} \cdot {x}^{2} + 1}\right)}\]
Simplified0.1
\[\leadsto \log \color{blue}{\left(e^{\left(1 + \frac{1}{2} \cdot x\right) + \left(x \cdot x\right) \cdot \frac{1}{6}}\right)}\]
if 1.00028036142059 < (/ (* (+ (* (* x 1/6) x) (+ 1 (* 1/2 x))) (- (- (* 1/2 x) 1) (* (* x 1/6) x))) (cbrt (* (* (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) (- (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)))))
Initial program 0.0
\[\frac{e^{x} - 1}{x}\]
- Using strategy
rm Applied add-sqr-sqrt0.0
\[\leadsto \frac{\color{blue}{\sqrt{e^{x}} \cdot \sqrt{e^{x}}} - 1}{x}\]
Applied difference-of-sqr-10.0
\[\leadsto \frac{\color{blue}{\left(\sqrt{e^{x}} + 1\right) \cdot \left(\sqrt{e^{x}} - 1\right)}}{x}\]
- Recombined 3 regimes into one program.
Final simplification0.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;\frac{\left(x \cdot \left(x \cdot \frac{1}{6}\right) + \left(\frac{1}{2} \cdot x + 1\right)\right) \cdot \left(\left(\frac{1}{2} \cdot x - 1\right) - x \cdot \left(x \cdot \frac{1}{6}\right)\right)}{\sqrt[3]{\left(\frac{1}{2} \cdot x - \left(1 + \frac{1}{6} \cdot {x}^{2}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot x - \left(1 + \frac{1}{6} \cdot {x}^{2}\right)\right) \cdot \left(\frac{1}{2} \cdot x - \left(1 + \frac{1}{6} \cdot {x}^{2}\right)\right)\right)}} \le 0.9992327618685036:\\
\;\;\;\;\frac{\frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{e^{x} \cdot e^{x} + \left(1 + e^{x}\right)}}{x}\\
\mathbf{elif}\;\frac{\left(x \cdot \left(x \cdot \frac{1}{6}\right) + \left(\frac{1}{2} \cdot x + 1\right)\right) \cdot \left(\left(\frac{1}{2} \cdot x - 1\right) - x \cdot \left(x \cdot \frac{1}{6}\right)\right)}{\sqrt[3]{\left(\frac{1}{2} \cdot x - \left(1 + \frac{1}{6} \cdot {x}^{2}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot x - \left(1 + \frac{1}{6} \cdot {x}^{2}\right)\right) \cdot \left(\frac{1}{2} \cdot x - \left(1 + \frac{1}{6} \cdot {x}^{2}\right)\right)\right)}} \le 1.00028036142059:\\
\;\;\;\;\log \left(e^{\left(x \cdot x\right) \cdot \frac{1}{6} + \left(\frac{1}{2} \cdot x + 1\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\sqrt{e^{x}} + 1\right) \cdot \left(\sqrt{e^{x}} - 1\right)}{x}\\
\end{array}\]