- Split input into 2 regimes
if (- (/ (+ x 4) y) (* (/ x y) z)) < -7.976499578513606e-38 or 1101515097364688.0 < (- (/ (+ x 4) y) (* (/ x y) z))
Initial program 0.1
\[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
if -7.976499578513606e-38 < (- (/ (+ x 4) y) (* (/ x y) z)) < 1101515097364688.0
Initial program 4.2
\[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
- Using strategy
rm Applied associate-*l/0.1
\[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right|\]
Applied sub-div0.1
\[\leadsto \left|\color{blue}{\frac{\left(x + 4\right) - x \cdot z}{y}}\right|\]
Taylor expanded around 0 0.1
\[\leadsto \left|\color{blue}{\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right) - \frac{x \cdot z}{y}}\right|\]
Simplified0.1
\[\leadsto \left|\color{blue}{\left(\frac{x}{y} + \frac{4}{y}\right) - x \cdot \frac{z}{y}}\right|\]
- Recombined 2 regimes into one program.
Final simplification0.1
\[\leadsto \begin{array}{l}
\mathbf{if}\;\frac{4 + x}{y} - \frac{x}{y} \cdot z \le -7.976499578513606 \cdot 10^{-38}:\\
\;\;\;\;\left|\frac{4 + x}{y} - \frac{x}{y} \cdot z\right|\\
\mathbf{elif}\;\frac{4 + x}{y} - \frac{x}{y} \cdot z \le 1101515097364688.0:\\
\;\;\;\;\left|\left(\frac{x}{y} + \frac{4}{y}\right) - x \cdot \frac{z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{4 + x}{y} - \frac{x}{y} \cdot z\right|\\
\end{array}\]