Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, A

Percentage Accurate: 87.9% → 99.8%
Time: 8.3s
Alternatives: 10
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ \frac{x + y}{1 - \frac{y}{z}} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (+ x y) (- 1.0 (/ y z))))
double code(double x, double y, double z) {
	return (x + y) / (1.0 - (y / z));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x + y) / (1.0d0 - (y / z))
end function
public static double code(double x, double y, double z) {
	return (x + y) / (1.0 - (y / z));
}
def code(x, y, z):
	return (x + y) / (1.0 - (y / z))
function code(x, y, z)
	return Float64(Float64(x + y) / Float64(1.0 - Float64(y / z)))
end
function tmp = code(x, y, z)
	tmp = (x + y) / (1.0 - (y / z));
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x + y}{1 - \frac{y}{z}}
\end{array}

Sampling outcomes in binary64 precision:

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

Initial Program: 87.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x + y}{1 - \frac{y}{z}} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (+ x y) (- 1.0 (/ y z))))
double code(double x, double y, double z) {
	return (x + y) / (1.0 - (y / z));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x + y) / (1.0d0 - (y / z))
end function
public static double code(double x, double y, double z) {
	return (x + y) / (1.0 - (y / z));
}
def code(x, y, z):
	return (x + y) / (1.0 - (y / z))
function code(x, y, z)
	return Float64(Float64(x + y) / Float64(1.0 - Float64(y / z)))
end
function tmp = code(x, y, z)
	tmp = (x + y) / (1.0 - (y / z));
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x + y}{1 - \frac{y}{z}}
\end{array}

Alternative 1: 99.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-302}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;\frac{0 - z \cdot \left(x + y\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ x y) (- 1.0 (/ y z)))))
   (if (<= t_0 -5e-302)
     t_0
     (if (<= t_0 0.0) (/ (- 0.0 (* z (+ x y))) y) t_0))))
double code(double x, double y, double z) {
	double t_0 = (x + y) / (1.0 - (y / z));
	double tmp;
	if (t_0 <= -5e-302) {
		tmp = t_0;
	} else if (t_0 <= 0.0) {
		tmp = (0.0 - (z * (x + y))) / y;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x + y) / (1.0d0 - (y / z))
    if (t_0 <= (-5d-302)) then
        tmp = t_0
    else if (t_0 <= 0.0d0) then
        tmp = (0.0d0 - (z * (x + y))) / y
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + y) / (1.0 - (y / z));
	double tmp;
	if (t_0 <= -5e-302) {
		tmp = t_0;
	} else if (t_0 <= 0.0) {
		tmp = (0.0 - (z * (x + y))) / y;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + y) / (1.0 - (y / z))
	tmp = 0
	if t_0 <= -5e-302:
		tmp = t_0
	elif t_0 <= 0.0:
		tmp = (0.0 - (z * (x + y))) / y
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + y) / Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (t_0 <= -5e-302)
		tmp = t_0;
	elseif (t_0 <= 0.0)
		tmp = Float64(Float64(0.0 - Float64(z * Float64(x + y))) / y);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + y) / (1.0 - (y / z));
	tmp = 0.0;
	if (t_0 <= -5e-302)
		tmp = t_0;
	elseif (t_0 <= 0.0)
		tmp = (0.0 - (z * (x + y))) / y;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-302], t$95$0, If[LessEqual[t$95$0, 0.0], N[(N[(0.0 - N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x + y}{1 - \frac{y}{z}}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-302}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{0 - z \cdot \left(x + y\right)}{y}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x y) (-.f64 #s(literal 1 binary64) (/.f64 y z))) < -5.00000000000000033e-302 or 0.0 < (/.f64 (+.f64 x y) (-.f64 #s(literal 1 binary64) (/.f64 y z)))

    1. Initial program 99.9%

      \[\frac{x + y}{1 - \frac{y}{z}} \]
    2. Add Preprocessing

    if -5.00000000000000033e-302 < (/.f64 (+.f64 x y) (-.f64 #s(literal 1 binary64) (/.f64 y z))) < 0.0

    1. Initial program 6.1%

      \[\frac{x + y}{1 - \frac{y}{z}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(x + y\right)}{y}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \left(z \cdot \left(x + y\right)\right)}{\color{blue}{y}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(z \cdot \left(x + y\right)\right)\right), \color{blue}{y}\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(z \cdot \left(x + y\right)\right)\right), y\right) \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)\right), y\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(-1 \cdot \left(x + y\right)\right)\right), y\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(-1 \cdot \left(x + y\right)\right)\right), y\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(x + y\right)\right)\right)\right), y\right) \]
      8. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(0 - \left(x + y\right)\right)\right), y\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(0, \left(x + y\right)\right)\right), y\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(0, \left(y + x\right)\right)\right), y\right) \]
      11. +-lowering-+.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(y, x\right)\right)\right), y\right) \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(0 - \left(y + x\right)\right)}{y}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + y}{1 - \frac{y}{z}} \leq -5 \cdot 10^{-302}:\\ \;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{elif}\;\frac{x + y}{1 - \frac{y}{z}} \leq 0:\\ \;\;\;\;\frac{0 - z \cdot \left(x + y\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 74.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\ t_1 := 1 - \frac{y}{z}\\ \mathbf{if}\;y \leq -4.6 \cdot 10^{-54}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \frac{1}{t\_1}\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{+44}:\\ \;\;\;\;\frac{y}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* z (- -1.0 (/ x y)))) (t_1 (- 1.0 (/ y z))))
   (if (<= y -4.6e-54)
     t_0
     (if (<= y -2e-296)
       (+ x y)
       (if (<= y 8.2e-38)
         (* x (/ 1.0 t_1))
         (if (<= y 2.75e+44) (/ y t_1) t_0))))))
double code(double x, double y, double z) {
	double t_0 = z * (-1.0 - (x / y));
	double t_1 = 1.0 - (y / z);
	double tmp;
	if (y <= -4.6e-54) {
		tmp = t_0;
	} else if (y <= -2e-296) {
		tmp = x + y;
	} else if (y <= 8.2e-38) {
		tmp = x * (1.0 / t_1);
	} else if (y <= 2.75e+44) {
		tmp = y / t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = z * ((-1.0d0) - (x / y))
    t_1 = 1.0d0 - (y / z)
    if (y <= (-4.6d-54)) then
        tmp = t_0
    else if (y <= (-2d-296)) then
        tmp = x + y
    else if (y <= 8.2d-38) then
        tmp = x * (1.0d0 / t_1)
    else if (y <= 2.75d+44) then
        tmp = y / t_1
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = z * (-1.0 - (x / y));
	double t_1 = 1.0 - (y / z);
	double tmp;
	if (y <= -4.6e-54) {
		tmp = t_0;
	} else if (y <= -2e-296) {
		tmp = x + y;
	} else if (y <= 8.2e-38) {
		tmp = x * (1.0 / t_1);
	} else if (y <= 2.75e+44) {
		tmp = y / t_1;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = z * (-1.0 - (x / y))
	t_1 = 1.0 - (y / z)
	tmp = 0
	if y <= -4.6e-54:
		tmp = t_0
	elif y <= -2e-296:
		tmp = x + y
	elif y <= 8.2e-38:
		tmp = x * (1.0 / t_1)
	elif y <= 2.75e+44:
		tmp = y / t_1
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(z * Float64(-1.0 - Float64(x / y)))
	t_1 = Float64(1.0 - Float64(y / z))
	tmp = 0.0
	if (y <= -4.6e-54)
		tmp = t_0;
	elseif (y <= -2e-296)
		tmp = Float64(x + y);
	elseif (y <= 8.2e-38)
		tmp = Float64(x * Float64(1.0 / t_1));
	elseif (y <= 2.75e+44)
		tmp = Float64(y / t_1);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = z * (-1.0 - (x / y));
	t_1 = 1.0 - (y / z);
	tmp = 0.0;
	if (y <= -4.6e-54)
		tmp = t_0;
	elseif (y <= -2e-296)
		tmp = x + y;
	elseif (y <= 8.2e-38)
		tmp = x * (1.0 / t_1);
	elseif (y <= 2.75e+44)
		tmp = y / t_1;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e-54], t$95$0, If[LessEqual[y, -2e-296], N[(x + y), $MachinePrecision], If[LessEqual[y, 8.2e-38], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e+44], N[(y / t$95$1), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\
t_1 := 1 - \frac{y}{z}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{-54}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{-38}:\\
\;\;\;\;x \cdot \frac{1}{t\_1}\\

\mathbf{elif}\;y \leq 2.75 \cdot 10^{+44}:\\
\;\;\;\;\frac{y}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.5999999999999998e-54 or 2.75e44 < y

    1. Initial program 75.6%

      \[\frac{x + y}{1 - \frac{y}{z}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y}} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(-1 \cdot z + \left(\mathsf{neg}\left(\frac{x \cdot z}{y}\right)\right)\right) + \left(\mathsf{neg}\left(\frac{{z}^{2}}{\color{blue}{y}}\right)\right) \]
      3. unsub-negN/A

        \[\leadsto \left(-1 \cdot z - \frac{x \cdot z}{y}\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{{z}^{2}}{y}}\right)\right) \]
      4. associate-+l-N/A

        \[\leadsto -1 \cdot z - \color{blue}{\left(\frac{x \cdot z}{y} - \left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)\right)} \]
      5. distribute-frac-negN/A

        \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{\mathsf{neg}\left({z}^{2}\right)}{\color{blue}{y}}\right) \]
      6. mul-1-negN/A

        \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{-1 \cdot {z}^{2}}{y}\right) \]
      7. div-subN/A

        \[\leadsto -1 \cdot z - \frac{x \cdot z - -1 \cdot {z}^{2}}{\color{blue}{y}} \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-1 \cdot z\right), \color{blue}{\left(\frac{x \cdot z - -1 \cdot {z}^{2}}{y}\right)}\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(z\right)\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(0 - z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z - -1 \cdot {z}^{2}\right), \color{blue}{y}\right)\right) \]
      13. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + \left(\mathsf{neg}\left(-1\right)\right) \cdot {z}^{2}\right), y\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + 1 \cdot {z}^{2}\right), y\right)\right) \]
      15. *-lft-identityN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + {z}^{2}\right), y\right)\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left({z}^{2} + x \cdot z\right), y\right)\right) \]
      17. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot z + x \cdot z\right), y\right)\right) \]
      18. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot \left(z + x\right)\right), y\right)\right) \]
      19. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z + x\right)\right), y\right)\right) \]
      20. +-lowering-+.f6471.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(z, x\right)\right), y\right)\right) \]
    5. Simplified71.8%

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

      \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(1 + \frac{x}{y}\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(z \cdot \left(1 + \frac{x}{y}\right)\right) \]
      2. distribute-rgt-neg-inN/A

        \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(1 + \frac{x}{y}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(1 + \frac{x}{y}\right)\right)\right)}\right) \]
      4. distribute-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(1\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(-1 + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{y}}\right)\right)\right)\right) \]
      6. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(-1 - \color{blue}{\frac{x}{y}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(-1, \color{blue}{\left(\frac{x}{y}\right)}\right)\right) \]
      8. /-lowering-/.f6474.4%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    8. Simplified74.4%

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

    if -4.5999999999999998e-54 < y < -2e-296

    1. Initial program 99.9%

      \[\frac{x + y}{1 - \frac{y}{z}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto y + \color{blue}{x} \]
      2. +-lowering-+.f6482.1%

        \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
    5. Simplified82.1%

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

    if -2e-296 < y < 8.1999999999999996e-38

    1. Initial program 99.9%

      \[\frac{x + y}{1 - \frac{y}{z}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \left(x + y\right) \cdot \color{blue}{\frac{1}{1 - \frac{y}{z}}} \]
      2. flip3--N/A

        \[\leadsto \left(x + y\right) \cdot \frac{1}{\frac{{1}^{3} - {\left(\frac{y}{z}\right)}^{3}}{\color{blue}{1 \cdot 1 + \left(\frac{y}{z} \cdot \frac{y}{z} + 1 \cdot \frac{y}{z}\right)}}} \]
      3. clear-numN/A

        \[\leadsto \left(x + y\right) \cdot \frac{1 \cdot 1 + \left(\frac{y}{z} \cdot \frac{y}{z} + 1 \cdot \frac{y}{z}\right)}{\color{blue}{{1}^{3} - {\left(\frac{y}{z}\right)}^{3}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{1 \cdot 1 + \left(\frac{y}{z} \cdot \frac{y}{z} + 1 \cdot \frac{y}{z}\right)}{{1}^{3} - {\left(\frac{y}{z}\right)}^{3}} \cdot \color{blue}{\left(x + y\right)} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1 \cdot 1 + \left(\frac{y}{z} \cdot \frac{y}{z} + 1 \cdot \frac{y}{z}\right)}{{1}^{3} - {\left(\frac{y}{z}\right)}^{3}}\right), \color{blue}{\left(x + y\right)}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\frac{{1}^{3} - {\left(\frac{y}{z}\right)}^{3}}{1 \cdot 1 + \left(\frac{y}{z} \cdot \frac{y}{z} + 1 \cdot \frac{y}{z}\right)}}\right), \left(\color{blue}{x} + y\right)\right) \]
      7. flip3--N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{1 - \frac{y}{z}}\right), \left(x + y\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(1 - \frac{y}{z}\right)\right), \left(\color{blue}{x} + y\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \left(\frac{y}{z}\right)\right)\right), \left(x + y\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right), \left(x + y\right)\right) \]
      11. +-lowering-+.f6499.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{y}\right)\right) \]
    4. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{1}{1 - \frac{y}{z}} \cdot \left(x + y\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right), \color{blue}{x}\right) \]
    6. Step-by-step derivation
      1. Simplified84.6%

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

      if 8.1999999999999996e-38 < y < 2.75e44

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{y}{1 - \frac{y}{z}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(1 - \frac{y}{z}\right)}\right) \]
        2. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        3. /-lowering-/.f6473.2%

          \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      5. Simplified73.2%

        \[\leadsto \color{blue}{\frac{y}{1 - \frac{y}{z}}} \]
    7. Recombined 4 regimes into one program.
    8. Final simplification78.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{-54}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \frac{1}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{+44}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 74.7% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{y}{z}\\ t_1 := z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-44}:\\ \;\;\;\;\frac{x}{t\_0}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+46}:\\ \;\;\;\;\frac{y}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (- 1.0 (/ y z))) (t_1 (* z (- -1.0 (/ x y)))))
       (if (<= y -6.5e-55)
         t_1
         (if (<= y -2e-296)
           (+ x y)
           (if (<= y 2.2e-44) (/ x t_0) (if (<= y 3e+46) (/ y t_0) t_1))))))
    double code(double x, double y, double z) {
    	double t_0 = 1.0 - (y / z);
    	double t_1 = z * (-1.0 - (x / y));
    	double tmp;
    	if (y <= -6.5e-55) {
    		tmp = t_1;
    	} else if (y <= -2e-296) {
    		tmp = x + y;
    	} else if (y <= 2.2e-44) {
    		tmp = x / t_0;
    	} else if (y <= 3e+46) {
    		tmp = y / t_0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: tmp
        t_0 = 1.0d0 - (y / z)
        t_1 = z * ((-1.0d0) - (x / y))
        if (y <= (-6.5d-55)) then
            tmp = t_1
        else if (y <= (-2d-296)) then
            tmp = x + y
        else if (y <= 2.2d-44) then
            tmp = x / t_0
        else if (y <= 3d+46) then
            tmp = y / t_0
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = 1.0 - (y / z);
    	double t_1 = z * (-1.0 - (x / y));
    	double tmp;
    	if (y <= -6.5e-55) {
    		tmp = t_1;
    	} else if (y <= -2e-296) {
    		tmp = x + y;
    	} else if (y <= 2.2e-44) {
    		tmp = x / t_0;
    	} else if (y <= 3e+46) {
    		tmp = y / t_0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = 1.0 - (y / z)
    	t_1 = z * (-1.0 - (x / y))
    	tmp = 0
    	if y <= -6.5e-55:
    		tmp = t_1
    	elif y <= -2e-296:
    		tmp = x + y
    	elif y <= 2.2e-44:
    		tmp = x / t_0
    	elif y <= 3e+46:
    		tmp = y / t_0
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(1.0 - Float64(y / z))
    	t_1 = Float64(z * Float64(-1.0 - Float64(x / y)))
    	tmp = 0.0
    	if (y <= -6.5e-55)
    		tmp = t_1;
    	elseif (y <= -2e-296)
    		tmp = Float64(x + y);
    	elseif (y <= 2.2e-44)
    		tmp = Float64(x / t_0);
    	elseif (y <= 3e+46)
    		tmp = Float64(y / t_0);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = 1.0 - (y / z);
    	t_1 = z * (-1.0 - (x / y));
    	tmp = 0.0;
    	if (y <= -6.5e-55)
    		tmp = t_1;
    	elseif (y <= -2e-296)
    		tmp = x + y;
    	elseif (y <= 2.2e-44)
    		tmp = x / t_0;
    	elseif (y <= 3e+46)
    		tmp = y / t_0;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e-55], t$95$1, If[LessEqual[y, -2e-296], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.2e-44], N[(x / t$95$0), $MachinePrecision], If[LessEqual[y, 3e+46], N[(y / t$95$0), $MachinePrecision], t$95$1]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 1 - \frac{y}{z}\\
    t_1 := z \cdot \left(-1 - \frac{x}{y}\right)\\
    \mathbf{if}\;y \leq -6.5 \cdot 10^{-55}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;y \leq 2.2 \cdot 10^{-44}:\\
    \;\;\;\;\frac{x}{t\_0}\\
    
    \mathbf{elif}\;y \leq 3 \cdot 10^{+46}:\\
    \;\;\;\;\frac{y}{t\_0}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if y < -6.50000000000000006e-55 or 3.00000000000000023e46 < y

      1. Initial program 75.6%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y}} \]
      4. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto \left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)} \]
        2. mul-1-negN/A

          \[\leadsto \left(-1 \cdot z + \left(\mathsf{neg}\left(\frac{x \cdot z}{y}\right)\right)\right) + \left(\mathsf{neg}\left(\frac{{z}^{2}}{\color{blue}{y}}\right)\right) \]
        3. unsub-negN/A

          \[\leadsto \left(-1 \cdot z - \frac{x \cdot z}{y}\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{{z}^{2}}{y}}\right)\right) \]
        4. associate-+l-N/A

          \[\leadsto -1 \cdot z - \color{blue}{\left(\frac{x \cdot z}{y} - \left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)\right)} \]
        5. distribute-frac-negN/A

          \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{\mathsf{neg}\left({z}^{2}\right)}{\color{blue}{y}}\right) \]
        6. mul-1-negN/A

          \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{-1 \cdot {z}^{2}}{y}\right) \]
        7. div-subN/A

          \[\leadsto -1 \cdot z - \frac{x \cdot z - -1 \cdot {z}^{2}}{\color{blue}{y}} \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\left(-1 \cdot z\right), \color{blue}{\left(\frac{x \cdot z - -1 \cdot {z}^{2}}{y}\right)}\right) \]
        9. mul-1-negN/A

          \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(z\right)\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        10. neg-sub0N/A

          \[\leadsto \mathsf{\_.f64}\left(\left(0 - z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z - -1 \cdot {z}^{2}\right), \color{blue}{y}\right)\right) \]
        13. cancel-sign-sub-invN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + \left(\mathsf{neg}\left(-1\right)\right) \cdot {z}^{2}\right), y\right)\right) \]
        14. metadata-evalN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + 1 \cdot {z}^{2}\right), y\right)\right) \]
        15. *-lft-identityN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + {z}^{2}\right), y\right)\right) \]
        16. +-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left({z}^{2} + x \cdot z\right), y\right)\right) \]
        17. unpow2N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot z + x \cdot z\right), y\right)\right) \]
        18. distribute-rgt-outN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot \left(z + x\right)\right), y\right)\right) \]
        19. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z + x\right)\right), y\right)\right) \]
        20. +-lowering-+.f6471.8%

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(z, x\right)\right), y\right)\right) \]
      5. Simplified71.8%

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

        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(1 + \frac{x}{y}\right)\right)} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(z \cdot \left(1 + \frac{x}{y}\right)\right) \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(1 + \frac{x}{y}\right)\right)\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(1 + \frac{x}{y}\right)\right)\right)}\right) \]
        4. distribute-neg-inN/A

          \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(1\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)}\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(z, \left(-1 + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{y}}\right)\right)\right)\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(z, \left(-1 - \color{blue}{\frac{x}{y}}\right)\right) \]
        7. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(-1, \color{blue}{\left(\frac{x}{y}\right)}\right)\right) \]
        8. /-lowering-/.f6474.4%

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
      8. Simplified74.4%

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

      if -6.50000000000000006e-55 < y < -2e-296

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto y + \color{blue}{x} \]
        2. +-lowering-+.f6482.1%

          \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
      5. Simplified82.1%

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

      if -2e-296 < y < 2.20000000000000012e-44

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{x}{1 - \frac{y}{z}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 - \frac{y}{z}\right)}\right) \]
        2. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        3. /-lowering-/.f6484.6%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      5. Simplified84.6%

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

      if 2.20000000000000012e-44 < y < 3.00000000000000023e46

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{y}{1 - \frac{y}{z}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(1 - \frac{y}{z}\right)}\right) \]
        2. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        3. /-lowering-/.f6473.2%

          \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      5. Simplified73.2%

        \[\leadsto \color{blue}{\frac{y}{1 - \frac{y}{z}}} \]
    3. Recombined 4 regimes into one program.
    4. Final simplification78.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{-55}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-44}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+46}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 74.7% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -1.15 \cdot 10^{-53}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-296}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (* z (- -1.0 (/ x y)))))
       (if (<= y -1.15e-53)
         t_0
         (if (<= y -2.9e-296)
           (+ x y)
           (if (<= y 2.6e-38) (/ x (- 1.0 (/ y z))) t_0)))))
    double code(double x, double y, double z) {
    	double t_0 = z * (-1.0 - (x / y));
    	double tmp;
    	if (y <= -1.15e-53) {
    		tmp = t_0;
    	} else if (y <= -2.9e-296) {
    		tmp = x + y;
    	} else if (y <= 2.6e-38) {
    		tmp = x / (1.0 - (y / z));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: tmp
        t_0 = z * ((-1.0d0) - (x / y))
        if (y <= (-1.15d-53)) then
            tmp = t_0
        else if (y <= (-2.9d-296)) then
            tmp = x + y
        else if (y <= 2.6d-38) then
            tmp = x / (1.0d0 - (y / z))
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = z * (-1.0 - (x / y));
    	double tmp;
    	if (y <= -1.15e-53) {
    		tmp = t_0;
    	} else if (y <= -2.9e-296) {
    		tmp = x + y;
    	} else if (y <= 2.6e-38) {
    		tmp = x / (1.0 - (y / z));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = z * (-1.0 - (x / y))
    	tmp = 0
    	if y <= -1.15e-53:
    		tmp = t_0
    	elif y <= -2.9e-296:
    		tmp = x + y
    	elif y <= 2.6e-38:
    		tmp = x / (1.0 - (y / z))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(z * Float64(-1.0 - Float64(x / y)))
    	tmp = 0.0
    	if (y <= -1.15e-53)
    		tmp = t_0;
    	elseif (y <= -2.9e-296)
    		tmp = Float64(x + y);
    	elseif (y <= 2.6e-38)
    		tmp = Float64(x / Float64(1.0 - Float64(y / z)));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = z * (-1.0 - (x / y));
    	tmp = 0.0;
    	if (y <= -1.15e-53)
    		tmp = t_0;
    	elseif (y <= -2.9e-296)
    		tmp = x + y;
    	elseif (y <= 2.6e-38)
    		tmp = x / (1.0 - (y / z));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e-53], t$95$0, If[LessEqual[y, -2.9e-296], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.6e-38], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\
    \mathbf{if}\;y \leq -1.15 \cdot 10^{-53}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;y \leq -2.9 \cdot 10^{-296}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;y \leq 2.6 \cdot 10^{-38}:\\
    \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -1.1500000000000001e-53 or 2.60000000000000011e-38 < y

      1. Initial program 78.7%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y}} \]
      4. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto \left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)} \]
        2. mul-1-negN/A

          \[\leadsto \left(-1 \cdot z + \left(\mathsf{neg}\left(\frac{x \cdot z}{y}\right)\right)\right) + \left(\mathsf{neg}\left(\frac{{z}^{2}}{\color{blue}{y}}\right)\right) \]
        3. unsub-negN/A

          \[\leadsto \left(-1 \cdot z - \frac{x \cdot z}{y}\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{{z}^{2}}{y}}\right)\right) \]
        4. associate-+l-N/A

          \[\leadsto -1 \cdot z - \color{blue}{\left(\frac{x \cdot z}{y} - \left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)\right)} \]
        5. distribute-frac-negN/A

          \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{\mathsf{neg}\left({z}^{2}\right)}{\color{blue}{y}}\right) \]
        6. mul-1-negN/A

          \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{-1 \cdot {z}^{2}}{y}\right) \]
        7. div-subN/A

          \[\leadsto -1 \cdot z - \frac{x \cdot z - -1 \cdot {z}^{2}}{\color{blue}{y}} \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\left(-1 \cdot z\right), \color{blue}{\left(\frac{x \cdot z - -1 \cdot {z}^{2}}{y}\right)}\right) \]
        9. mul-1-negN/A

          \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(z\right)\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        10. neg-sub0N/A

          \[\leadsto \mathsf{\_.f64}\left(\left(0 - z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z - -1 \cdot {z}^{2}\right), \color{blue}{y}\right)\right) \]
        13. cancel-sign-sub-invN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + \left(\mathsf{neg}\left(-1\right)\right) \cdot {z}^{2}\right), y\right)\right) \]
        14. metadata-evalN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + 1 \cdot {z}^{2}\right), y\right)\right) \]
        15. *-lft-identityN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + {z}^{2}\right), y\right)\right) \]
        16. +-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left({z}^{2} + x \cdot z\right), y\right)\right) \]
        17. unpow2N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot z + x \cdot z\right), y\right)\right) \]
        18. distribute-rgt-outN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot \left(z + x\right)\right), y\right)\right) \]
        19. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z + x\right)\right), y\right)\right) \]
        20. +-lowering-+.f6468.4%

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(z, x\right)\right), y\right)\right) \]
      5. Simplified68.4%

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

        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(1 + \frac{x}{y}\right)\right)} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(z \cdot \left(1 + \frac{x}{y}\right)\right) \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(1 + \frac{x}{y}\right)\right)\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(1 + \frac{x}{y}\right)\right)\right)}\right) \]
        4. distribute-neg-inN/A

          \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(1\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)}\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(z, \left(-1 + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{y}}\right)\right)\right)\right) \]
        6. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(z, \left(-1 - \color{blue}{\frac{x}{y}}\right)\right) \]
        7. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(-1, \color{blue}{\left(\frac{x}{y}\right)}\right)\right) \]
        8. /-lowering-/.f6470.8%

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
      8. Simplified70.8%

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

      if -1.1500000000000001e-53 < y < -2.89999999999999983e-296

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto y + \color{blue}{x} \]
        2. +-lowering-+.f6482.1%

          \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
      5. Simplified82.1%

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

      if -2.89999999999999983e-296 < y < 2.60000000000000011e-38

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{x}{1 - \frac{y}{z}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 - \frac{y}{z}\right)}\right) \]
        2. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        3. /-lowering-/.f6484.6%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      5. Simplified84.6%

        \[\leadsto \color{blue}{\frac{x}{1 - \frac{y}{z}}} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification76.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-53}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-296}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 68.4% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+81}:\\ \;\;\;\;0 - z\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+32}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+78}:\\ \;\;\;\;\frac{x \cdot \left(0 - z\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;0 - z\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= y -9.2e+81)
       (- 0.0 z)
       (if (<= y 6e+32)
         (+ x y)
         (if (<= y 2.6e+78) (/ (* x (- 0.0 z)) y) (- 0.0 z)))))
    double code(double x, double y, double z) {
    	double tmp;
    	if (y <= -9.2e+81) {
    		tmp = 0.0 - z;
    	} else if (y <= 6e+32) {
    		tmp = x + y;
    	} else if (y <= 2.6e+78) {
    		tmp = (x * (0.0 - z)) / y;
    	} else {
    		tmp = 0.0 - z;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: tmp
        if (y <= (-9.2d+81)) then
            tmp = 0.0d0 - z
        else if (y <= 6d+32) then
            tmp = x + y
        else if (y <= 2.6d+78) then
            tmp = (x * (0.0d0 - z)) / y
        else
            tmp = 0.0d0 - z
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if (y <= -9.2e+81) {
    		tmp = 0.0 - z;
    	} else if (y <= 6e+32) {
    		tmp = x + y;
    	} else if (y <= 2.6e+78) {
    		tmp = (x * (0.0 - z)) / y;
    	} else {
    		tmp = 0.0 - z;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if y <= -9.2e+81:
    		tmp = 0.0 - z
    	elif y <= 6e+32:
    		tmp = x + y
    	elif y <= 2.6e+78:
    		tmp = (x * (0.0 - z)) / y
    	else:
    		tmp = 0.0 - z
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (y <= -9.2e+81)
    		tmp = Float64(0.0 - z);
    	elseif (y <= 6e+32)
    		tmp = Float64(x + y);
    	elseif (y <= 2.6e+78)
    		tmp = Float64(Float64(x * Float64(0.0 - z)) / y);
    	else
    		tmp = Float64(0.0 - z);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if (y <= -9.2e+81)
    		tmp = 0.0 - z;
    	elseif (y <= 6e+32)
    		tmp = x + y;
    	elseif (y <= 2.6e+78)
    		tmp = (x * (0.0 - z)) / y;
    	else
    		tmp = 0.0 - z;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[y, -9.2e+81], N[(0.0 - z), $MachinePrecision], If[LessEqual[y, 6e+32], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.6e+78], N[(N[(x * N[(0.0 - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(0.0 - z), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -9.2 \cdot 10^{+81}:\\
    \;\;\;\;0 - z\\
    
    \mathbf{elif}\;y \leq 6 \cdot 10^{+32}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;y \leq 2.6 \cdot 10^{+78}:\\
    \;\;\;\;\frac{x \cdot \left(0 - z\right)}{y}\\
    
    \mathbf{else}:\\
    \;\;\;\;0 - z\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -9.1999999999999995e81 or 2.6e78 < y

      1. Initial program 68.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \color{blue}{-1 \cdot z} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(z\right) \]
        2. neg-sub0N/A

          \[\leadsto 0 - \color{blue}{z} \]
        3. --lowering--.f6464.2%

          \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{z}\right) \]
      5. Simplified64.2%

        \[\leadsto \color{blue}{0 - z} \]
      6. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \mathsf{neg}\left(z\right) \]
        2. neg-lowering-neg.f6464.2%

          \[\leadsto \mathsf{neg.f64}\left(z\right) \]
      7. Applied egg-rr64.2%

        \[\leadsto \color{blue}{-z} \]

      if -9.1999999999999995e81 < y < 6e32

      1. Initial program 99.3%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto y + \color{blue}{x} \]
        2. +-lowering-+.f6468.2%

          \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
      5. Simplified68.2%

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

      if 6e32 < y < 2.6e78

      1. Initial program 92.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \color{blue}{\left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y}} \]
      4. Step-by-step derivation
        1. sub-negN/A

          \[\leadsto \left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)} \]
        2. mul-1-negN/A

          \[\leadsto \left(-1 \cdot z + \left(\mathsf{neg}\left(\frac{x \cdot z}{y}\right)\right)\right) + \left(\mathsf{neg}\left(\frac{{z}^{2}}{\color{blue}{y}}\right)\right) \]
        3. unsub-negN/A

          \[\leadsto \left(-1 \cdot z - \frac{x \cdot z}{y}\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{{z}^{2}}{y}}\right)\right) \]
        4. associate-+l-N/A

          \[\leadsto -1 \cdot z - \color{blue}{\left(\frac{x \cdot z}{y} - \left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)\right)} \]
        5. distribute-frac-negN/A

          \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{\mathsf{neg}\left({z}^{2}\right)}{\color{blue}{y}}\right) \]
        6. mul-1-negN/A

          \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{-1 \cdot {z}^{2}}{y}\right) \]
        7. div-subN/A

          \[\leadsto -1 \cdot z - \frac{x \cdot z - -1 \cdot {z}^{2}}{\color{blue}{y}} \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\left(-1 \cdot z\right), \color{blue}{\left(\frac{x \cdot z - -1 \cdot {z}^{2}}{y}\right)}\right) \]
        9. mul-1-negN/A

          \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(z\right)\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        10. neg-sub0N/A

          \[\leadsto \mathsf{\_.f64}\left(\left(0 - z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        11. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
        12. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z - -1 \cdot {z}^{2}\right), \color{blue}{y}\right)\right) \]
        13. cancel-sign-sub-invN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + \left(\mathsf{neg}\left(-1\right)\right) \cdot {z}^{2}\right), y\right)\right) \]
        14. metadata-evalN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + 1 \cdot {z}^{2}\right), y\right)\right) \]
        15. *-lft-identityN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + {z}^{2}\right), y\right)\right) \]
        16. +-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left({z}^{2} + x \cdot z\right), y\right)\right) \]
        17. unpow2N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot z + x \cdot z\right), y\right)\right) \]
        18. distribute-rgt-outN/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot \left(z + x\right)\right), y\right)\right) \]
        19. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z + x\right)\right), y\right)\right) \]
        20. +-lowering-+.f6471.7%

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(z, x\right)\right), y\right)\right) \]
      5. Simplified71.7%

        \[\leadsto \color{blue}{\left(0 - z\right) - \frac{z \cdot \left(z + x\right)}{y}} \]
      6. Taylor expanded in x around inf

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{y}} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot z}{y}\right) \]
        2. neg-sub0N/A

          \[\leadsto 0 - \color{blue}{\frac{x \cdot z}{y}} \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{x \cdot z}{y}\right)}\right) \]
        4. associate-/l*N/A

          \[\leadsto \mathsf{\_.f64}\left(0, \left(x \cdot \color{blue}{\frac{z}{y}}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{z}{y}\right)}\right)\right) \]
        6. /-lowering-/.f6465.0%

          \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
      8. Simplified65.0%

        \[\leadsto \color{blue}{0 - x \cdot \frac{z}{y}} \]
      9. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{z}{y}\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot z}{y}\right) \]
        3. distribute-neg-fracN/A

          \[\leadsto \frac{\mathsf{neg}\left(x \cdot z\right)}{\color{blue}{y}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x \cdot z\right)\right), \color{blue}{y}\right) \]
      10. Applied egg-rr66.8%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+81}:\\ \;\;\;\;0 - z\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+32}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+78}:\\ \;\;\;\;\frac{x \cdot \left(0 - z\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;0 - z\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 58.7% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-54}:\\ \;\;\;\;0 - z\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+83}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;0 - z\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= y -8e-54)
       (- 0.0 z)
       (if (<= y 5.8e-30) x (if (<= y 1.4e+83) y (- 0.0 z)))))
    double code(double x, double y, double z) {
    	double tmp;
    	if (y <= -8e-54) {
    		tmp = 0.0 - z;
    	} else if (y <= 5.8e-30) {
    		tmp = x;
    	} else if (y <= 1.4e+83) {
    		tmp = y;
    	} else {
    		tmp = 0.0 - z;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: tmp
        if (y <= (-8d-54)) then
            tmp = 0.0d0 - z
        else if (y <= 5.8d-30) then
            tmp = x
        else if (y <= 1.4d+83) then
            tmp = y
        else
            tmp = 0.0d0 - z
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if (y <= -8e-54) {
    		tmp = 0.0 - z;
    	} else if (y <= 5.8e-30) {
    		tmp = x;
    	} else if (y <= 1.4e+83) {
    		tmp = y;
    	} else {
    		tmp = 0.0 - z;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if y <= -8e-54:
    		tmp = 0.0 - z
    	elif y <= 5.8e-30:
    		tmp = x
    	elif y <= 1.4e+83:
    		tmp = y
    	else:
    		tmp = 0.0 - z
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (y <= -8e-54)
    		tmp = Float64(0.0 - z);
    	elseif (y <= 5.8e-30)
    		tmp = x;
    	elseif (y <= 1.4e+83)
    		tmp = y;
    	else
    		tmp = Float64(0.0 - z);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if (y <= -8e-54)
    		tmp = 0.0 - z;
    	elseif (y <= 5.8e-30)
    		tmp = x;
    	elseif (y <= 1.4e+83)
    		tmp = y;
    	else
    		tmp = 0.0 - z;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[y, -8e-54], N[(0.0 - z), $MachinePrecision], If[LessEqual[y, 5.8e-30], x, If[LessEqual[y, 1.4e+83], y, N[(0.0 - z), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -8 \cdot 10^{-54}:\\
    \;\;\;\;0 - z\\
    
    \mathbf{elif}\;y \leq 5.8 \cdot 10^{-30}:\\
    \;\;\;\;x\\
    
    \mathbf{elif}\;y \leq 1.4 \cdot 10^{+83}:\\
    \;\;\;\;y\\
    
    \mathbf{else}:\\
    \;\;\;\;0 - z\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -8.0000000000000002e-54 or 1.4e83 < y

      1. Initial program 74.1%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \color{blue}{-1 \cdot z} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(z\right) \]
        2. neg-sub0N/A

          \[\leadsto 0 - \color{blue}{z} \]
        3. --lowering--.f6459.1%

          \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{z}\right) \]
      5. Simplified59.1%

        \[\leadsto \color{blue}{0 - z} \]
      6. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \mathsf{neg}\left(z\right) \]
        2. neg-lowering-neg.f6459.1%

          \[\leadsto \mathsf{neg.f64}\left(z\right) \]
      7. Applied egg-rr59.1%

        \[\leadsto \color{blue}{-z} \]

      if -8.0000000000000002e-54 < y < 5.79999999999999978e-30

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{x} \]
      4. Step-by-step derivation
        1. Simplified62.1%

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

        if 5.79999999999999978e-30 < y < 1.4e83

        1. Initial program 96.4%

          \[\frac{x + y}{1 - \frac{y}{z}} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y}{1 - \frac{y}{z}}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(1 - \frac{y}{z}\right)}\right) \]
          2. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
          3. /-lowering-/.f6455.1%

            \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
        5. Simplified55.1%

          \[\leadsto \color{blue}{\frac{y}{1 - \frac{y}{z}}} \]
        6. Taylor expanded in y around 0

          \[\leadsto \color{blue}{y} \]
        7. Step-by-step derivation
          1. Simplified41.6%

            \[\leadsto \color{blue}{y} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification58.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-54}:\\ \;\;\;\;0 - z\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-30}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+83}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;0 - z\\ \end{array} \]
        10. Add Preprocessing

        Alternative 7: 72.0% accurate, 0.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{-38}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-83}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= z -4.1e-38)
           (+ x y)
           (if (<= z 2.6e-83) (* z (- -1.0 (/ x y))) (+ x y))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (z <= -4.1e-38) {
        		tmp = x + y;
        	} else if (z <= 2.6e-83) {
        		tmp = z * (-1.0 - (x / y));
        	} else {
        		tmp = x + y;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if (z <= (-4.1d-38)) then
                tmp = x + y
            else if (z <= 2.6d-83) then
                tmp = z * ((-1.0d0) - (x / y))
            else
                tmp = x + y
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (z <= -4.1e-38) {
        		tmp = x + y;
        	} else if (z <= 2.6e-83) {
        		tmp = z * (-1.0 - (x / y));
        	} else {
        		tmp = x + y;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if z <= -4.1e-38:
        		tmp = x + y
        	elif z <= 2.6e-83:
        		tmp = z * (-1.0 - (x / y))
        	else:
        		tmp = x + y
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (z <= -4.1e-38)
        		tmp = Float64(x + y);
        	elseif (z <= 2.6e-83)
        		tmp = Float64(z * Float64(-1.0 - Float64(x / y)));
        	else
        		tmp = Float64(x + y);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (z <= -4.1e-38)
        		tmp = x + y;
        	elseif (z <= 2.6e-83)
        		tmp = z * (-1.0 - (x / y));
        	else
        		tmp = x + y;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[z, -4.1e-38], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.6e-83], N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -4.1 \cdot 10^{-38}:\\
        \;\;\;\;x + y\\
        
        \mathbf{elif}\;z \leq 2.6 \cdot 10^{-83}:\\
        \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x + y\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -4.0999999999999998e-38 or 2.60000000000000009e-83 < z

          1. Initial program 99.3%

            \[\frac{x + y}{1 - \frac{y}{z}} \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

            \[\leadsto \color{blue}{x + y} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto y + \color{blue}{x} \]
            2. +-lowering-+.f6473.9%

              \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
          5. Simplified73.9%

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

          if -4.0999999999999998e-38 < z < 2.60000000000000009e-83

          1. Initial program 74.1%

            \[\frac{x + y}{1 - \frac{y}{z}} \]
          2. Add Preprocessing
          3. Taylor expanded in y around inf

            \[\leadsto \color{blue}{\left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y}} \]
          4. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto \left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)} \]
            2. mul-1-negN/A

              \[\leadsto \left(-1 \cdot z + \left(\mathsf{neg}\left(\frac{x \cdot z}{y}\right)\right)\right) + \left(\mathsf{neg}\left(\frac{{z}^{2}}{\color{blue}{y}}\right)\right) \]
            3. unsub-negN/A

              \[\leadsto \left(-1 \cdot z - \frac{x \cdot z}{y}\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{{z}^{2}}{y}}\right)\right) \]
            4. associate-+l-N/A

              \[\leadsto -1 \cdot z - \color{blue}{\left(\frac{x \cdot z}{y} - \left(\mathsf{neg}\left(\frac{{z}^{2}}{y}\right)\right)\right)} \]
            5. distribute-frac-negN/A

              \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{\mathsf{neg}\left({z}^{2}\right)}{\color{blue}{y}}\right) \]
            6. mul-1-negN/A

              \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} - \frac{-1 \cdot {z}^{2}}{y}\right) \]
            7. div-subN/A

              \[\leadsto -1 \cdot z - \frac{x \cdot z - -1 \cdot {z}^{2}}{\color{blue}{y}} \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(\left(-1 \cdot z\right), \color{blue}{\left(\frac{x \cdot z - -1 \cdot {z}^{2}}{y}\right)}\right) \]
            9. mul-1-negN/A

              \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(z\right)\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
            10. neg-sub0N/A

              \[\leadsto \mathsf{\_.f64}\left(\left(0 - z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
            11. --lowering--.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \left(\frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y}\right)\right) \]
            12. /-lowering-/.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z - -1 \cdot {z}^{2}\right), \color{blue}{y}\right)\right) \]
            13. cancel-sign-sub-invN/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + \left(\mathsf{neg}\left(-1\right)\right) \cdot {z}^{2}\right), y\right)\right) \]
            14. metadata-evalN/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + 1 \cdot {z}^{2}\right), y\right)\right) \]
            15. *-lft-identityN/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(x \cdot z + {z}^{2}\right), y\right)\right) \]
            16. +-commutativeN/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left({z}^{2} + x \cdot z\right), y\right)\right) \]
            17. unpow2N/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot z + x \cdot z\right), y\right)\right) \]
            18. distribute-rgt-outN/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\left(z \cdot \left(z + x\right)\right), y\right)\right) \]
            19. *-lowering-*.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z + x\right)\right), y\right)\right) \]
            20. +-lowering-+.f6477.6%

              \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, z\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(z, x\right)\right), y\right)\right) \]
          5. Simplified77.6%

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

            \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(1 + \frac{x}{y}\right)\right)} \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{neg}\left(z \cdot \left(1 + \frac{x}{y}\right)\right) \]
            2. distribute-rgt-neg-inN/A

              \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(1 + \frac{x}{y}\right)\right)\right)} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\mathsf{neg}\left(\left(1 + \frac{x}{y}\right)\right)\right)}\right) \]
            4. distribute-neg-inN/A

              \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(1\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)}\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(z, \left(-1 + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{y}}\right)\right)\right)\right) \]
            6. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(z, \left(-1 - \color{blue}{\frac{x}{y}}\right)\right) \]
            7. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(-1, \color{blue}{\left(\frac{x}{y}\right)}\right)\right) \]
            8. /-lowering-/.f6474.1%

              \[\leadsto \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
          8. Simplified74.1%

            \[\leadsto \color{blue}{z \cdot \left(-1 - \frac{x}{y}\right)} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification74.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{-38}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-83}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
        5. Add Preprocessing

        Alternative 8: 69.0% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+83}:\\ \;\;\;\;0 - z\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+84}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;0 - z\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -1.3e+83) (- 0.0 z) (if (<= y 1.35e+84) (+ x y) (- 0.0 z))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -1.3e+83) {
        		tmp = 0.0 - z;
        	} else if (y <= 1.35e+84) {
        		tmp = x + y;
        	} else {
        		tmp = 0.0 - z;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if (y <= (-1.3d+83)) then
                tmp = 0.0d0 - z
            else if (y <= 1.35d+84) then
                tmp = x + y
            else
                tmp = 0.0d0 - z
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -1.3e+83) {
        		tmp = 0.0 - z;
        	} else if (y <= 1.35e+84) {
        		tmp = x + y;
        	} else {
        		tmp = 0.0 - z;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if y <= -1.3e+83:
        		tmp = 0.0 - z
        	elif y <= 1.35e+84:
        		tmp = x + y
        	else:
        		tmp = 0.0 - z
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -1.3e+83)
        		tmp = Float64(0.0 - z);
        	elseif (y <= 1.35e+84)
        		tmp = Float64(x + y);
        	else
        		tmp = Float64(0.0 - z);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (y <= -1.3e+83)
        		tmp = 0.0 - z;
        	elseif (y <= 1.35e+84)
        		tmp = x + y;
        	else
        		tmp = 0.0 - z;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -1.3e+83], N[(0.0 - z), $MachinePrecision], If[LessEqual[y, 1.35e+84], N[(x + y), $MachinePrecision], N[(0.0 - z), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -1.3 \cdot 10^{+83}:\\
        \;\;\;\;0 - z\\
        
        \mathbf{elif}\;y \leq 1.35 \cdot 10^{+84}:\\
        \;\;\;\;x + y\\
        
        \mathbf{else}:\\
        \;\;\;\;0 - z\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -1.3000000000000001e83 or 1.35e84 < y

          1. Initial program 68.6%

            \[\frac{x + y}{1 - \frac{y}{z}} \]
          2. Add Preprocessing
          3. Taylor expanded in y around inf

            \[\leadsto \color{blue}{-1 \cdot z} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{neg}\left(z\right) \]
            2. neg-sub0N/A

              \[\leadsto 0 - \color{blue}{z} \]
            3. --lowering--.f6464.9%

              \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{z}\right) \]
          5. Simplified64.9%

            \[\leadsto \color{blue}{0 - z} \]
          6. Step-by-step derivation
            1. sub0-negN/A

              \[\leadsto \mathsf{neg}\left(z\right) \]
            2. neg-lowering-neg.f6464.9%

              \[\leadsto \mathsf{neg.f64}\left(z\right) \]
          7. Applied egg-rr64.9%

            \[\leadsto \color{blue}{-z} \]

          if -1.3000000000000001e83 < y < 1.35e84

          1. Initial program 98.7%

            \[\frac{x + y}{1 - \frac{y}{z}} \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

            \[\leadsto \color{blue}{x + y} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto y + \color{blue}{x} \]
            2. +-lowering-+.f6465.2%

              \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
          5. Simplified65.2%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+83}:\\ \;\;\;\;0 - z\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+84}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;0 - z\\ \end{array} \]
        5. Add Preprocessing

        Alternative 9: 37.8% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.1 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
        (FPCore (x y z) :precision binary64 (if (<= y 2.1e-24) x y))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= 2.1e-24) {
        		tmp = x;
        	} else {
        		tmp = y;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if (y <= 2.1d-24) then
                tmp = x
            else
                tmp = y
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (y <= 2.1e-24) {
        		tmp = x;
        	} else {
        		tmp = y;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if y <= 2.1e-24:
        		tmp = x
        	else:
        		tmp = y
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= 2.1e-24)
        		tmp = x;
        	else
        		tmp = y;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (y <= 2.1e-24)
        		tmp = x;
        	else
        		tmp = y;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[y, 2.1e-24], x, y]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq 2.1 \cdot 10^{-24}:\\
        \;\;\;\;x\\
        
        \mathbf{else}:\\
        \;\;\;\;y\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < 2.0999999999999999e-24

          1. Initial program 92.2%

            \[\frac{x + y}{1 - \frac{y}{z}} \]
          2. Add Preprocessing
          3. Taylor expanded in y around 0

            \[\leadsto \color{blue}{x} \]
          4. Step-by-step derivation
            1. Simplified44.6%

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

            if 2.0999999999999999e-24 < y

            1. Initial program 78.1%

              \[\frac{x + y}{1 - \frac{y}{z}} \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \color{blue}{\frac{y}{1 - \frac{y}{z}}} \]
            4. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(1 - \frac{y}{z}\right)}\right) \]
              2. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
              3. /-lowering-/.f6461.3%

                \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
            5. Simplified61.3%

              \[\leadsto \color{blue}{\frac{y}{1 - \frac{y}{z}}} \]
            6. Taylor expanded in y around 0

              \[\leadsto \color{blue}{y} \]
            7. Step-by-step derivation
              1. Simplified29.8%

                \[\leadsto \color{blue}{y} \]
            8. Recombined 2 regimes into one program.
            9. Add Preprocessing

            Alternative 10: 35.7% accurate, 9.0× speedup?

            \[\begin{array}{l} \\ x \end{array} \]
            (FPCore (x y z) :precision binary64 x)
            double code(double x, double y, double z) {
            	return x;
            }
            
            real(8) function code(x, y, z)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                code = x
            end function
            
            public static double code(double x, double y, double z) {
            	return x;
            }
            
            def code(x, y, z):
            	return x
            
            function code(x, y, z)
            	return x
            end
            
            function tmp = code(x, y, z)
            	tmp = x;
            end
            
            code[x_, y_, z_] := x
            
            \begin{array}{l}
            
            \\
            x
            \end{array}
            
            Derivation
            1. Initial program 88.1%

              \[\frac{x + y}{1 - \frac{y}{z}} \]
            2. Add Preprocessing
            3. Taylor expanded in y around 0

              \[\leadsto \color{blue}{x} \]
            4. Step-by-step derivation
              1. Simplified33.3%

                \[\leadsto \color{blue}{x} \]
              2. Add Preprocessing

              Developer Target 1: 93.9% accurate, 0.5× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y + x}{-y} \cdot z\\ \mathbf{if}\;y < -3.7429310762689856 \cdot 10^{+171}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y < 3.5534662456086734 \cdot 10^{+168}:\\ \;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (let* ((t_0 (* (/ (+ y x) (- y)) z)))
                 (if (< y -3.7429310762689856e+171)
                   t_0
                   (if (< y 3.5534662456086734e+168) (/ (+ x y) (- 1.0 (/ y z))) t_0))))
              double code(double x, double y, double z) {
              	double t_0 = ((y + x) / -y) * z;
              	double tmp;
              	if (y < -3.7429310762689856e+171) {
              		tmp = t_0;
              	} else if (y < 3.5534662456086734e+168) {
              		tmp = (x + y) / (1.0 - (y / z));
              	} else {
              		tmp = t_0;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8) :: t_0
                  real(8) :: tmp
                  t_0 = ((y + x) / -y) * z
                  if (y < (-3.7429310762689856d+171)) then
                      tmp = t_0
                  else if (y < 3.5534662456086734d+168) then
                      tmp = (x + y) / (1.0d0 - (y / z))
                  else
                      tmp = t_0
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z) {
              	double t_0 = ((y + x) / -y) * z;
              	double tmp;
              	if (y < -3.7429310762689856e+171) {
              		tmp = t_0;
              	} else if (y < 3.5534662456086734e+168) {
              		tmp = (x + y) / (1.0 - (y / z));
              	} else {
              		tmp = t_0;
              	}
              	return tmp;
              }
              
              def code(x, y, z):
              	t_0 = ((y + x) / -y) * z
              	tmp = 0
              	if y < -3.7429310762689856e+171:
              		tmp = t_0
              	elif y < 3.5534662456086734e+168:
              		tmp = (x + y) / (1.0 - (y / z))
              	else:
              		tmp = t_0
              	return tmp
              
              function code(x, y, z)
              	t_0 = Float64(Float64(Float64(y + x) / Float64(-y)) * z)
              	tmp = 0.0
              	if (y < -3.7429310762689856e+171)
              		tmp = t_0;
              	elseif (y < 3.5534662456086734e+168)
              		tmp = Float64(Float64(x + y) / Float64(1.0 - Float64(y / z)));
              	else
              		tmp = t_0;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z)
              	t_0 = ((y + x) / -y) * z;
              	tmp = 0.0;
              	if (y < -3.7429310762689856e+171)
              		tmp = t_0;
              	elseif (y < 3.5534662456086734e+168)
              		tmp = (x + y) / (1.0 - (y / z));
              	else
              		tmp = t_0;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y + x), $MachinePrecision] / (-y)), $MachinePrecision] * z), $MachinePrecision]}, If[Less[y, -3.7429310762689856e+171], t$95$0, If[Less[y, 3.5534662456086734e+168], N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \frac{y + x}{-y} \cdot z\\
              \mathbf{if}\;y < -3.7429310762689856 \cdot 10^{+171}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;y < 3.5534662456086734 \cdot 10^{+168}:\\
              \;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_0\\
              
              
              \end{array}
              \end{array}
              

              Reproduce

              ?
              herbie shell --seed 2024161 
              (FPCore (x y z)
                :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, A"
                :precision binary64
              
                :alt
                (! :herbie-platform default (if (< y -3742931076268985600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* (/ (+ y x) (- y)) z) (if (< y 3553466245608673400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ x y) (- 1 (/ y z))) (* (/ (+ y x) (- y)) z))))
              
                (/ (+ x y) (- 1.0 (/ y z))))