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

Percentage Accurate: 87.6% → 99.6%
Time: 6.2s
Alternatives: 12
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 12 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.6% 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.6% 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^{-272} \lor \neg \left(t\_0 \leq 0\right):\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) - \frac{x \cdot z}{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ x y) (- 1.0 (/ y z)))))
   (if (or (<= t_0 -5e-272) (not (<= t_0 0.0))) t_0 (- (- z) (/ (* x z) y)))))
double code(double x, double y, double z) {
	double t_0 = (x + y) / (1.0 - (y / z));
	double tmp;
	if ((t_0 <= -5e-272) || !(t_0 <= 0.0)) {
		tmp = t_0;
	} else {
		tmp = -z - ((x * z) / 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) :: t_0
    real(8) :: tmp
    t_0 = (x + y) / (1.0d0 - (y / z))
    if ((t_0 <= (-5d-272)) .or. (.not. (t_0 <= 0.0d0))) then
        tmp = t_0
    else
        tmp = -z - ((x * z) / y)
    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-272) || !(t_0 <= 0.0)) {
		tmp = t_0;
	} else {
		tmp = -z - ((x * z) / y);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + y) / (1.0 - (y / z))
	tmp = 0
	if (t_0 <= -5e-272) or not (t_0 <= 0.0):
		tmp = t_0
	else:
		tmp = -z - ((x * z) / y)
	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-272) || !(t_0 <= 0.0))
		tmp = t_0;
	else
		tmp = Float64(Float64(-z) - Float64(Float64(x * z) / y));
	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-272) || ~((t_0 <= 0.0)))
		tmp = t_0;
	else
		tmp = -z - ((x * z) / y);
	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[Or[LessEqual[t$95$0, -5e-272], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], t$95$0, N[((-z) - N[(N[(x * z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x + y}{1 - \frac{y}{z}}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-272} \lor \neg \left(t\_0 \leq 0\right):\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\left(-z\right) - \frac{x \cdot z}{y}\\


\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))) < -4.99999999999999982e-272 or -0.0 < (/.f64 (+.f64 x y) (-.f64 #s(literal 1 binary64) (/.f64 y z)))

    1. Initial program 99.8%

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

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

    1. Initial program 13.3%

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

      \[\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. associate--l+100.0%

        \[\leadsto \color{blue}{-1 \cdot z + \left(-1 \cdot \frac{x \cdot z}{y} - \frac{{z}^{2}}{y}\right)} \]
      2. associate-*r/100.0%

        \[\leadsto -1 \cdot z + \left(\color{blue}{\frac{-1 \cdot \left(x \cdot z\right)}{y}} - \frac{{z}^{2}}{y}\right) \]
      3. div-sub100.0%

        \[\leadsto -1 \cdot z + \color{blue}{\frac{-1 \cdot \left(x \cdot z\right) - {z}^{2}}{y}} \]
      4. remove-double-neg100.0%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \color{blue}{\left(-\left(-{z}^{2}\right)\right)}}{y} \]
      5. mul-1-neg100.0%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \left(-\color{blue}{-1 \cdot {z}^{2}}\right)}{y} \]
      6. neg-mul-1100.0%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \color{blue}{-1 \cdot \left(-1 \cdot {z}^{2}\right)}}{y} \]
      7. distribute-lft-out--100.0%

        \[\leadsto -1 \cdot z + \frac{\color{blue}{-1 \cdot \left(x \cdot z - -1 \cdot {z}^{2}\right)}}{y} \]
      8. mul-1-neg100.0%

        \[\leadsto -1 \cdot z + \frac{\color{blue}{-\left(x \cdot z - -1 \cdot {z}^{2}\right)}}{y} \]
      9. distribute-neg-frac100.0%

        \[\leadsto -1 \cdot z + \color{blue}{\left(-\frac{x \cdot z - -1 \cdot {z}^{2}}{y}\right)} \]
      10. unsub-neg100.0%

        \[\leadsto \color{blue}{-1 \cdot z - \frac{x \cdot z - -1 \cdot {z}^{2}}{y}} \]
      11. mul-1-neg100.0%

        \[\leadsto \color{blue}{\left(-z\right)} - \frac{x \cdot z - -1 \cdot {z}^{2}}{y} \]
      12. cancel-sign-sub-inv100.0%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{x \cdot z + \left(--1\right) \cdot {z}^{2}}}{y} \]
      13. metadata-eval100.0%

        \[\leadsto \left(-z\right) - \frac{x \cdot z + \color{blue}{1} \cdot {z}^{2}}{y} \]
      14. *-lft-identity100.0%

        \[\leadsto \left(-z\right) - \frac{x \cdot z + \color{blue}{{z}^{2}}}{y} \]
      15. +-commutative100.0%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{{z}^{2} + x \cdot z}}{y} \]
      16. unpow2100.0%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{z \cdot z} + x \cdot z}{y} \]
      17. distribute-rgt-out100.0%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{z \cdot \left(z + x\right)}}{y} \]
    5. Simplified100.0%

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

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

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

Alternative 2: 69.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{y}{z}\\ t_1 := \frac{y}{t\_0}\\ t_2 := \frac{x}{t\_0}\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{+236}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right)}{-y}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-96}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-147}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+22}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- 1.0 (/ y z))) (t_1 (/ y t_0)) (t_2 (/ x t_0)))
   (if (<= y -2.6e+236)
     (- z)
     (if (<= y -5.5e+64)
       (/ (* z (+ x y)) (- y))
       (if (<= y -1.35e-14)
         t_1
         (if (<= y -2.8e-96)
           t_2
           (if (<= y -1.55e-147) (+ x y) (if (<= y 2.1e+22) t_2 t_1))))))))
double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double t_1 = y / t_0;
	double t_2 = x / t_0;
	double tmp;
	if (y <= -2.6e+236) {
		tmp = -z;
	} else if (y <= -5.5e+64) {
		tmp = (z * (x + y)) / -y;
	} else if (y <= -1.35e-14) {
		tmp = t_1;
	} else if (y <= -2.8e-96) {
		tmp = t_2;
	} else if (y <= -1.55e-147) {
		tmp = x + y;
	} else if (y <= 2.1e+22) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_0 = 1.0d0 - (y / z)
    t_1 = y / t_0
    t_2 = x / t_0
    if (y <= (-2.6d+236)) then
        tmp = -z
    else if (y <= (-5.5d+64)) then
        tmp = (z * (x + y)) / -y
    else if (y <= (-1.35d-14)) then
        tmp = t_1
    else if (y <= (-2.8d-96)) then
        tmp = t_2
    else if (y <= (-1.55d-147)) then
        tmp = x + y
    else if (y <= 2.1d+22) then
        tmp = t_2
    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 = y / t_0;
	double t_2 = x / t_0;
	double tmp;
	if (y <= -2.6e+236) {
		tmp = -z;
	} else if (y <= -5.5e+64) {
		tmp = (z * (x + y)) / -y;
	} else if (y <= -1.35e-14) {
		tmp = t_1;
	} else if (y <= -2.8e-96) {
		tmp = t_2;
	} else if (y <= -1.55e-147) {
		tmp = x + y;
	} else if (y <= 2.1e+22) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 1.0 - (y / z)
	t_1 = y / t_0
	t_2 = x / t_0
	tmp = 0
	if y <= -2.6e+236:
		tmp = -z
	elif y <= -5.5e+64:
		tmp = (z * (x + y)) / -y
	elif y <= -1.35e-14:
		tmp = t_1
	elif y <= -2.8e-96:
		tmp = t_2
	elif y <= -1.55e-147:
		tmp = x + y
	elif y <= 2.1e+22:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z)
	t_0 = Float64(1.0 - Float64(y / z))
	t_1 = Float64(y / t_0)
	t_2 = Float64(x / t_0)
	tmp = 0.0
	if (y <= -2.6e+236)
		tmp = Float64(-z);
	elseif (y <= -5.5e+64)
		tmp = Float64(Float64(z * Float64(x + y)) / Float64(-y));
	elseif (y <= -1.35e-14)
		tmp = t_1;
	elseif (y <= -2.8e-96)
		tmp = t_2;
	elseif (y <= -1.55e-147)
		tmp = Float64(x + y);
	elseif (y <= 2.1e+22)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 1.0 - (y / z);
	t_1 = y / t_0;
	t_2 = x / t_0;
	tmp = 0.0;
	if (y <= -2.6e+236)
		tmp = -z;
	elseif (y <= -5.5e+64)
		tmp = (z * (x + y)) / -y;
	elseif (y <= -1.35e-14)
		tmp = t_1;
	elseif (y <= -2.8e-96)
		tmp = t_2;
	elseif (y <= -1.55e-147)
		tmp = x + y;
	elseif (y <= 2.1e+22)
		tmp = t_2;
	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[(y / t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(x / t$95$0), $MachinePrecision]}, If[LessEqual[y, -2.6e+236], (-z), If[LessEqual[y, -5.5e+64], N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[y, -1.35e-14], t$95$1, If[LessEqual[y, -2.8e-96], t$95$2, If[LessEqual[y, -1.55e-147], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.1e+22], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5.5 \cdot 10^{+64}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right)}{-y}\\

\mathbf{elif}\;y \leq -1.35 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.8 \cdot 10^{-96}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.55 \cdot 10^{-147}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq 2.1 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.6e236

    1. Initial program 57.0%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    4. Step-by-step derivation
      1. mul-1-neg88.6%

        \[\leadsto \color{blue}{-z} \]
    5. Simplified88.6%

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

    if -2.6e236 < y < -5.4999999999999996e64

    1. Initial program 67.6%

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

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

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

        \[\leadsto -\frac{z \cdot \color{blue}{\left(y + x\right)}}{y} \]
    5. Simplified82.5%

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

    if -5.4999999999999996e64 < y < -1.3499999999999999e-14 or 2.0999999999999998e22 < y

    1. Initial program 84.5%

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

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

    if -1.3499999999999999e-14 < y < -2.80000000000000015e-96 or -1.5500000000000001e-147 < y < 2.0999999999999998e22

    1. Initial program 99.9%

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

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

    if -2.80000000000000015e-96 < y < -1.5500000000000001e-147

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified86.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+236}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{z \cdot \left(x + y\right)}{-y}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-14}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-96}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-147}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+22}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{y}{z}\\ t_1 := \left(-z\right) \cdot \frac{x + y}{y}\\ t_2 := \frac{x}{t\_0}\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{+62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-15}:\\ \;\;\;\;\frac{y}{t\_0}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-92}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.14 \cdot 10^{-147}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 340:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- 1.0 (/ y z))) (t_1 (* (- z) (/ (+ x y) y))) (t_2 (/ x t_0)))
   (if (<= y -2.2e+62)
     t_1
     (if (<= y -4.4e-15)
       (/ y t_0)
       (if (<= y -1.8e-92)
         t_2
         (if (<= y -1.14e-147) (+ x y) (if (<= y 340.0) t_2 t_1)))))))
double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double t_1 = -z * ((x + y) / y);
	double t_2 = x / t_0;
	double tmp;
	if (y <= -2.2e+62) {
		tmp = t_1;
	} else if (y <= -4.4e-15) {
		tmp = y / t_0;
	} else if (y <= -1.8e-92) {
		tmp = t_2;
	} else if (y <= -1.14e-147) {
		tmp = x + y;
	} else if (y <= 340.0) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_0 = 1.0d0 - (y / z)
    t_1 = -z * ((x + y) / y)
    t_2 = x / t_0
    if (y <= (-2.2d+62)) then
        tmp = t_1
    else if (y <= (-4.4d-15)) then
        tmp = y / t_0
    else if (y <= (-1.8d-92)) then
        tmp = t_2
    else if (y <= (-1.14d-147)) then
        tmp = x + y
    else if (y <= 340.0d0) then
        tmp = t_2
    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 * ((x + y) / y);
	double t_2 = x / t_0;
	double tmp;
	if (y <= -2.2e+62) {
		tmp = t_1;
	} else if (y <= -4.4e-15) {
		tmp = y / t_0;
	} else if (y <= -1.8e-92) {
		tmp = t_2;
	} else if (y <= -1.14e-147) {
		tmp = x + y;
	} else if (y <= 340.0) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 1.0 - (y / z)
	t_1 = -z * ((x + y) / y)
	t_2 = x / t_0
	tmp = 0
	if y <= -2.2e+62:
		tmp = t_1
	elif y <= -4.4e-15:
		tmp = y / t_0
	elif y <= -1.8e-92:
		tmp = t_2
	elif y <= -1.14e-147:
		tmp = x + y
	elif y <= 340.0:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z)
	t_0 = Float64(1.0 - Float64(y / z))
	t_1 = Float64(Float64(-z) * Float64(Float64(x + y) / y))
	t_2 = Float64(x / t_0)
	tmp = 0.0
	if (y <= -2.2e+62)
		tmp = t_1;
	elseif (y <= -4.4e-15)
		tmp = Float64(y / t_0);
	elseif (y <= -1.8e-92)
		tmp = t_2;
	elseif (y <= -1.14e-147)
		tmp = Float64(x + y);
	elseif (y <= 340.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 1.0 - (y / z);
	t_1 = -z * ((x + y) / y);
	t_2 = x / t_0;
	tmp = 0.0;
	if (y <= -2.2e+62)
		tmp = t_1;
	elseif (y <= -4.4e-15)
		tmp = y / t_0;
	elseif (y <= -1.8e-92)
		tmp = t_2;
	elseif (y <= -1.14e-147)
		tmp = x + y;
	elseif (y <= 340.0)
		tmp = t_2;
	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[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / t$95$0), $MachinePrecision]}, If[LessEqual[y, -2.2e+62], t$95$1, If[LessEqual[y, -4.4e-15], N[(y / t$95$0), $MachinePrecision], If[LessEqual[y, -1.8e-92], t$95$2, If[LessEqual[y, -1.14e-147], N[(x + y), $MachinePrecision], If[LessEqual[y, 340.0], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.4 \cdot 10^{-15}:\\
\;\;\;\;\frac{y}{t\_0}\\

\mathbf{elif}\;y \leq -1.8 \cdot 10^{-92}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.14 \cdot 10^{-147}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq 340:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.20000000000000015e62 or 340 < y

    1. Initial program 72.6%

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

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

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

        \[\leadsto -\color{blue}{z \cdot \frac{x + y}{y}} \]
      3. distribute-rgt-neg-in77.9%

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

        \[\leadsto z \cdot \color{blue}{\frac{x + y}{-y}} \]
      5. +-commutative77.9%

        \[\leadsto z \cdot \frac{\color{blue}{y + x}}{-y} \]
    5. Simplified77.9%

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

    if -2.20000000000000015e62 < y < -4.39999999999999971e-15

    1. Initial program 99.7%

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

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

    if -4.39999999999999971e-15 < y < -1.80000000000000008e-92 or -1.14e-147 < y < 340

    1. Initial program 99.9%

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

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

    if -1.80000000000000008e-92 < y < -1.14e-147

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified79.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+62}:\\ \;\;\;\;\left(-z\right) \cdot \frac{x + y}{y}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-15}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq -1.14 \cdot 10^{-147}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 340:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \frac{x + y}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 75.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{y}{z}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+62}:\\ \;\;\;\;\left(-z\right) \cdot \frac{x + y}{y}\\ \mathbf{elif}\;y \leq -4.3 \cdot 10^{-14}:\\ \;\;\;\;\frac{y}{t\_0}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-94}:\\ \;\;\;\;x \cdot \frac{-1}{\frac{y}{z} + -1}\\ \mathbf{elif}\;y \leq -1.24 \cdot 10^{-147}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2500:\\ \;\;\;\;\frac{x}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- 1.0 (/ y z))))
   (if (<= y -1.4e+62)
     (* (- z) (/ (+ x y) y))
     (if (<= y -4.3e-14)
       (/ y t_0)
       (if (<= y -9.5e-94)
         (* x (/ -1.0 (+ (/ y z) -1.0)))
         (if (<= y -1.24e-147)
           (+ x y)
           (if (<= y 2500.0) (/ x t_0) (* z (- -1.0 (/ x y))))))))))
double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double tmp;
	if (y <= -1.4e+62) {
		tmp = -z * ((x + y) / y);
	} else if (y <= -4.3e-14) {
		tmp = y / t_0;
	} else if (y <= -9.5e-94) {
		tmp = x * (-1.0 / ((y / z) + -1.0));
	} else if (y <= -1.24e-147) {
		tmp = x + y;
	} else if (y <= 2500.0) {
		tmp = x / t_0;
	} else {
		tmp = z * (-1.0 - (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) :: t_0
    real(8) :: tmp
    t_0 = 1.0d0 - (y / z)
    if (y <= (-1.4d+62)) then
        tmp = -z * ((x + y) / y)
    else if (y <= (-4.3d-14)) then
        tmp = y / t_0
    else if (y <= (-9.5d-94)) then
        tmp = x * ((-1.0d0) / ((y / z) + (-1.0d0)))
    else if (y <= (-1.24d-147)) then
        tmp = x + y
    else if (y <= 2500.0d0) then
        tmp = x / t_0
    else
        tmp = z * ((-1.0d0) - (x / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double tmp;
	if (y <= -1.4e+62) {
		tmp = -z * ((x + y) / y);
	} else if (y <= -4.3e-14) {
		tmp = y / t_0;
	} else if (y <= -9.5e-94) {
		tmp = x * (-1.0 / ((y / z) + -1.0));
	} else if (y <= -1.24e-147) {
		tmp = x + y;
	} else if (y <= 2500.0) {
		tmp = x / t_0;
	} else {
		tmp = z * (-1.0 - (x / y));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 1.0 - (y / z)
	tmp = 0
	if y <= -1.4e+62:
		tmp = -z * ((x + y) / y)
	elif y <= -4.3e-14:
		tmp = y / t_0
	elif y <= -9.5e-94:
		tmp = x * (-1.0 / ((y / z) + -1.0))
	elif y <= -1.24e-147:
		tmp = x + y
	elif y <= 2500.0:
		tmp = x / t_0
	else:
		tmp = z * (-1.0 - (x / y))
	return tmp
function code(x, y, z)
	t_0 = Float64(1.0 - Float64(y / z))
	tmp = 0.0
	if (y <= -1.4e+62)
		tmp = Float64(Float64(-z) * Float64(Float64(x + y) / y));
	elseif (y <= -4.3e-14)
		tmp = Float64(y / t_0);
	elseif (y <= -9.5e-94)
		tmp = Float64(x * Float64(-1.0 / Float64(Float64(y / z) + -1.0)));
	elseif (y <= -1.24e-147)
		tmp = Float64(x + y);
	elseif (y <= 2500.0)
		tmp = Float64(x / t_0);
	else
		tmp = Float64(z * Float64(-1.0 - Float64(x / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 1.0 - (y / z);
	tmp = 0.0;
	if (y <= -1.4e+62)
		tmp = -z * ((x + y) / y);
	elseif (y <= -4.3e-14)
		tmp = y / t_0;
	elseif (y <= -9.5e-94)
		tmp = x * (-1.0 / ((y / z) + -1.0));
	elseif (y <= -1.24e-147)
		tmp = x + y;
	elseif (y <= 2500.0)
		tmp = x / t_0;
	else
		tmp = z * (-1.0 - (x / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+62], N[((-z) * N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.3e-14], N[(y / t$95$0), $MachinePrecision], If[LessEqual[y, -9.5e-94], N[(x * N[(-1.0 / N[(N[(y / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.24e-147], N[(x + y), $MachinePrecision], If[LessEqual[y, 2500.0], N[(x / t$95$0), $MachinePrecision], N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 1 - \frac{y}{z}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+62}:\\
\;\;\;\;\left(-z\right) \cdot \frac{x + y}{y}\\

\mathbf{elif}\;y \leq -4.3 \cdot 10^{-14}:\\
\;\;\;\;\frac{y}{t\_0}\\

\mathbf{elif}\;y \leq -9.5 \cdot 10^{-94}:\\
\;\;\;\;x \cdot \frac{-1}{\frac{y}{z} + -1}\\

\mathbf{elif}\;y \leq -1.24 \cdot 10^{-147}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq 2500:\\
\;\;\;\;\frac{x}{t\_0}\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.40000000000000007e62

    1. Initial program 63.9%

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

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

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

        \[\leadsto -\color{blue}{z \cdot \frac{x + y}{y}} \]
      3. distribute-rgt-neg-in89.0%

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

        \[\leadsto z \cdot \color{blue}{\frac{x + y}{-y}} \]
      5. +-commutative89.0%

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

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

    if -1.40000000000000007e62 < y < -4.29999999999999998e-14

    1. Initial program 99.7%

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

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

    if -4.29999999999999998e-14 < y < -9.4999999999999997e-94

    1. Initial program 99.6%

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

      \[\leadsto \color{blue}{\frac{x}{1 - \frac{y}{z}}} \]
    4. Step-by-step derivation
      1. div-inv69.5%

        \[\leadsto \color{blue}{x \cdot \frac{1}{1 - \frac{y}{z}}} \]
      2. *-commutative69.5%

        \[\leadsto \color{blue}{\frac{1}{1 - \frac{y}{z}} \cdot x} \]
      3. frac-2neg69.5%

        \[\leadsto \color{blue}{\frac{-1}{-\left(1 - \frac{y}{z}\right)}} \cdot x \]
      4. metadata-eval69.5%

        \[\leadsto \frac{\color{blue}{-1}}{-\left(1 - \frac{y}{z}\right)} \cdot x \]
      5. sub-neg69.5%

        \[\leadsto \frac{-1}{-\color{blue}{\left(1 + \left(-\frac{y}{z}\right)\right)}} \cdot x \]
      6. distribute-neg-in69.5%

        \[\leadsto \frac{-1}{\color{blue}{\left(-1\right) + \left(-\left(-\frac{y}{z}\right)\right)}} \cdot x \]
      7. metadata-eval69.5%

        \[\leadsto \frac{-1}{\color{blue}{-1} + \left(-\left(-\frac{y}{z}\right)\right)} \cdot x \]
      8. distribute-neg-frac69.5%

        \[\leadsto \frac{-1}{-1 + \left(-\color{blue}{\frac{-y}{z}}\right)} \cdot x \]
      9. distribute-frac-neg269.5%

        \[\leadsto \frac{-1}{-1 + \color{blue}{\frac{-y}{-z}}} \cdot x \]
      10. frac-2neg69.5%

        \[\leadsto \frac{-1}{-1 + \color{blue}{\frac{y}{z}}} \cdot x \]
    5. Applied egg-rr69.5%

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

    if -9.4999999999999997e-94 < y < -1.2400000000000001e-147

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified79.4%

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

    if -1.2400000000000001e-147 < y < 2500

    1. Initial program 99.9%

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

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

    if 2500 < y

    1. Initial program 80.6%

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

      \[\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. associate--l+60.9%

        \[\leadsto \color{blue}{-1 \cdot z + \left(-1 \cdot \frac{x \cdot z}{y} - \frac{{z}^{2}}{y}\right)} \]
      2. associate-*r/60.9%

        \[\leadsto -1 \cdot z + \left(\color{blue}{\frac{-1 \cdot \left(x \cdot z\right)}{y}} - \frac{{z}^{2}}{y}\right) \]
      3. div-sub60.9%

        \[\leadsto -1 \cdot z + \color{blue}{\frac{-1 \cdot \left(x \cdot z\right) - {z}^{2}}{y}} \]
      4. remove-double-neg60.9%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \color{blue}{\left(-\left(-{z}^{2}\right)\right)}}{y} \]
      5. mul-1-neg60.9%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \left(-\color{blue}{-1 \cdot {z}^{2}}\right)}{y} \]
      6. neg-mul-160.9%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \color{blue}{-1 \cdot \left(-1 \cdot {z}^{2}\right)}}{y} \]
      7. distribute-lft-out--60.9%

        \[\leadsto -1 \cdot z + \frac{\color{blue}{-1 \cdot \left(x \cdot z - -1 \cdot {z}^{2}\right)}}{y} \]
      8. mul-1-neg60.9%

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

        \[\leadsto -1 \cdot z + \color{blue}{\left(-\frac{x \cdot z - -1 \cdot {z}^{2}}{y}\right)} \]
      10. unsub-neg60.9%

        \[\leadsto \color{blue}{-1 \cdot z - \frac{x \cdot z - -1 \cdot {z}^{2}}{y}} \]
      11. mul-1-neg60.9%

        \[\leadsto \color{blue}{\left(-z\right)} - \frac{x \cdot z - -1 \cdot {z}^{2}}{y} \]
      12. cancel-sign-sub-inv60.9%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{x \cdot z + \left(--1\right) \cdot {z}^{2}}}{y} \]
      13. metadata-eval60.9%

        \[\leadsto \left(-z\right) - \frac{x \cdot z + \color{blue}{1} \cdot {z}^{2}}{y} \]
      14. *-lft-identity60.9%

        \[\leadsto \left(-z\right) - \frac{x \cdot z + \color{blue}{{z}^{2}}}{y} \]
      15. +-commutative60.9%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{{z}^{2} + x \cdot z}}{y} \]
      16. unpow260.9%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{z \cdot z} + x \cdot z}{y} \]
      17. distribute-rgt-out61.1%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{z \cdot \left(z + x\right)}}{y} \]
    5. Simplified61.1%

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot z\right) \cdot \left(1 + \frac{x}{y}\right)} \]
      2. mul-1-neg67.7%

        \[\leadsto \color{blue}{\left(-z\right)} \cdot \left(1 + \frac{x}{y}\right) \]
    8. Simplified67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+62}:\\ \;\;\;\;\left(-z\right) \cdot \frac{x + y}{y}\\ \mathbf{elif}\;y \leq -4.3 \cdot 10^{-14}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-94}:\\ \;\;\;\;x \cdot \frac{-1}{\frac{y}{z} + -1}\\ \mathbf{elif}\;y \leq -1.24 \cdot 10^{-147}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2500:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 75.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{y}{z}\\ t_1 := \frac{x}{t\_0}\\ \mathbf{if}\;y \leq -1.8 \cdot 10^{+63}:\\ \;\;\;\;\left(-z\right) \cdot \frac{x + y}{y}\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{t\_0}\\ \mathbf{elif}\;y \leq -1.36 \cdot 10^{-92}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-147}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 700:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- 1.0 (/ y z))) (t_1 (/ x t_0)))
   (if (<= y -1.8e+63)
     (* (- z) (/ (+ x y) y))
     (if (<= y -3.5e-12)
       (/ y t_0)
       (if (<= y -1.36e-92)
         t_1
         (if (<= y -1.22e-147)
           (+ x y)
           (if (<= y 700.0) t_1 (* z (- -1.0 (/ x y))))))))))
double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double t_1 = x / t_0;
	double tmp;
	if (y <= -1.8e+63) {
		tmp = -z * ((x + y) / y);
	} else if (y <= -3.5e-12) {
		tmp = y / t_0;
	} else if (y <= -1.36e-92) {
		tmp = t_1;
	} else if (y <= -1.22e-147) {
		tmp = x + y;
	} else if (y <= 700.0) {
		tmp = t_1;
	} else {
		tmp = z * (-1.0 - (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) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = 1.0d0 - (y / z)
    t_1 = x / t_0
    if (y <= (-1.8d+63)) then
        tmp = -z * ((x + y) / y)
    else if (y <= (-3.5d-12)) then
        tmp = y / t_0
    else if (y <= (-1.36d-92)) then
        tmp = t_1
    else if (y <= (-1.22d-147)) then
        tmp = x + y
    else if (y <= 700.0d0) then
        tmp = t_1
    else
        tmp = z * ((-1.0d0) - (x / y))
    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 = x / t_0;
	double tmp;
	if (y <= -1.8e+63) {
		tmp = -z * ((x + y) / y);
	} else if (y <= -3.5e-12) {
		tmp = y / t_0;
	} else if (y <= -1.36e-92) {
		tmp = t_1;
	} else if (y <= -1.22e-147) {
		tmp = x + y;
	} else if (y <= 700.0) {
		tmp = t_1;
	} else {
		tmp = z * (-1.0 - (x / y));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 1.0 - (y / z)
	t_1 = x / t_0
	tmp = 0
	if y <= -1.8e+63:
		tmp = -z * ((x + y) / y)
	elif y <= -3.5e-12:
		tmp = y / t_0
	elif y <= -1.36e-92:
		tmp = t_1
	elif y <= -1.22e-147:
		tmp = x + y
	elif y <= 700.0:
		tmp = t_1
	else:
		tmp = z * (-1.0 - (x / y))
	return tmp
function code(x, y, z)
	t_0 = Float64(1.0 - Float64(y / z))
	t_1 = Float64(x / t_0)
	tmp = 0.0
	if (y <= -1.8e+63)
		tmp = Float64(Float64(-z) * Float64(Float64(x + y) / y));
	elseif (y <= -3.5e-12)
		tmp = Float64(y / t_0);
	elseif (y <= -1.36e-92)
		tmp = t_1;
	elseif (y <= -1.22e-147)
		tmp = Float64(x + y);
	elseif (y <= 700.0)
		tmp = t_1;
	else
		tmp = Float64(z * Float64(-1.0 - Float64(x / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 1.0 - (y / z);
	t_1 = x / t_0;
	tmp = 0.0;
	if (y <= -1.8e+63)
		tmp = -z * ((x + y) / y);
	elseif (y <= -3.5e-12)
		tmp = y / t_0;
	elseif (y <= -1.36e-92)
		tmp = t_1;
	elseif (y <= -1.22e-147)
		tmp = x + y;
	elseif (y <= 700.0)
		tmp = t_1;
	else
		tmp = z * (-1.0 - (x / y));
	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[(x / t$95$0), $MachinePrecision]}, If[LessEqual[y, -1.8e+63], N[((-z) * N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.5e-12], N[(y / t$95$0), $MachinePrecision], If[LessEqual[y, -1.36e-92], t$95$1, If[LessEqual[y, -1.22e-147], N[(x + y), $MachinePrecision], If[LessEqual[y, 700.0], t$95$1, N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{y}{t\_0}\\

\mathbf{elif}\;y \leq -1.36 \cdot 10^{-92}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.22 \cdot 10^{-147}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq 700:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.79999999999999999e63

    1. Initial program 63.9%

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

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

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

        \[\leadsto -\color{blue}{z \cdot \frac{x + y}{y}} \]
      3. distribute-rgt-neg-in89.0%

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

        \[\leadsto z \cdot \color{blue}{\frac{x + y}{-y}} \]
      5. +-commutative89.0%

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

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

    if -1.79999999999999999e63 < y < -3.5e-12

    1. Initial program 99.7%

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

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

    if -3.5e-12 < y < -1.36e-92 or -1.21999999999999995e-147 < y < 700

    1. Initial program 99.9%

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

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

    if -1.36e-92 < y < -1.21999999999999995e-147

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified79.4%

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

    if 700 < y

    1. Initial program 80.6%

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

      \[\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. associate--l+60.9%

        \[\leadsto \color{blue}{-1 \cdot z + \left(-1 \cdot \frac{x \cdot z}{y} - \frac{{z}^{2}}{y}\right)} \]
      2. associate-*r/60.9%

        \[\leadsto -1 \cdot z + \left(\color{blue}{\frac{-1 \cdot \left(x \cdot z\right)}{y}} - \frac{{z}^{2}}{y}\right) \]
      3. div-sub60.9%

        \[\leadsto -1 \cdot z + \color{blue}{\frac{-1 \cdot \left(x \cdot z\right) - {z}^{2}}{y}} \]
      4. remove-double-neg60.9%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \color{blue}{\left(-\left(-{z}^{2}\right)\right)}}{y} \]
      5. mul-1-neg60.9%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \left(-\color{blue}{-1 \cdot {z}^{2}}\right)}{y} \]
      6. neg-mul-160.9%

        \[\leadsto -1 \cdot z + \frac{-1 \cdot \left(x \cdot z\right) - \color{blue}{-1 \cdot \left(-1 \cdot {z}^{2}\right)}}{y} \]
      7. distribute-lft-out--60.9%

        \[\leadsto -1 \cdot z + \frac{\color{blue}{-1 \cdot \left(x \cdot z - -1 \cdot {z}^{2}\right)}}{y} \]
      8. mul-1-neg60.9%

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

        \[\leadsto -1 \cdot z + \color{blue}{\left(-\frac{x \cdot z - -1 \cdot {z}^{2}}{y}\right)} \]
      10. unsub-neg60.9%

        \[\leadsto \color{blue}{-1 \cdot z - \frac{x \cdot z - -1 \cdot {z}^{2}}{y}} \]
      11. mul-1-neg60.9%

        \[\leadsto \color{blue}{\left(-z\right)} - \frac{x \cdot z - -1 \cdot {z}^{2}}{y} \]
      12. cancel-sign-sub-inv60.9%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{x \cdot z + \left(--1\right) \cdot {z}^{2}}}{y} \]
      13. metadata-eval60.9%

        \[\leadsto \left(-z\right) - \frac{x \cdot z + \color{blue}{1} \cdot {z}^{2}}{y} \]
      14. *-lft-identity60.9%

        \[\leadsto \left(-z\right) - \frac{x \cdot z + \color{blue}{{z}^{2}}}{y} \]
      15. +-commutative60.9%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{{z}^{2} + x \cdot z}}{y} \]
      16. unpow260.9%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{z \cdot z} + x \cdot z}{y} \]
      17. distribute-rgt-out61.1%

        \[\leadsto \left(-z\right) - \frac{\color{blue}{z \cdot \left(z + x\right)}}{y} \]
    5. Simplified61.1%

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot z\right) \cdot \left(1 + \frac{x}{y}\right)} \]
      2. mul-1-neg67.7%

        \[\leadsto \color{blue}{\left(-z\right)} \cdot \left(1 + \frac{x}{y}\right) \]
    8. Simplified67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+63}:\\ \;\;\;\;\left(-z\right) \cdot \frac{x + y}{y}\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq -1.36 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-147}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 700:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 66.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+52}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-148}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-177}:\\ \;\;\;\;\frac{z}{y} \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+69}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -1.25e+52)
   (- z)
   (if (<= y -4.2e-148)
     (+ x y)
     (if (<= y -1.3e-177)
       (* (/ z y) (- x))
       (if (<= y 5.8e+69) (+ x y) (- z))))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.25e+52) {
		tmp = -z;
	} else if (y <= -4.2e-148) {
		tmp = x + y;
	} else if (y <= -1.3e-177) {
		tmp = (z / y) * -x;
	} else if (y <= 5.8e+69) {
		tmp = x + y;
	} else {
		tmp = -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.25d+52)) then
        tmp = -z
    else if (y <= (-4.2d-148)) then
        tmp = x + y
    else if (y <= (-1.3d-177)) then
        tmp = (z / y) * -x
    else if (y <= 5.8d+69) then
        tmp = x + y
    else
        tmp = -z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.25e+52) {
		tmp = -z;
	} else if (y <= -4.2e-148) {
		tmp = x + y;
	} else if (y <= -1.3e-177) {
		tmp = (z / y) * -x;
	} else if (y <= 5.8e+69) {
		tmp = x + y;
	} else {
		tmp = -z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -1.25e+52:
		tmp = -z
	elif y <= -4.2e-148:
		tmp = x + y
	elif y <= -1.3e-177:
		tmp = (z / y) * -x
	elif y <= 5.8e+69:
		tmp = x + y
	else:
		tmp = -z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -1.25e+52)
		tmp = Float64(-z);
	elseif (y <= -4.2e-148)
		tmp = Float64(x + y);
	elseif (y <= -1.3e-177)
		tmp = Float64(Float64(z / y) * Float64(-x));
	elseif (y <= 5.8e+69)
		tmp = Float64(x + y);
	else
		tmp = Float64(-z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -1.25e+52)
		tmp = -z;
	elseif (y <= -4.2e-148)
		tmp = x + y;
	elseif (y <= -1.3e-177)
		tmp = (z / y) * -x;
	elseif (y <= 5.8e+69)
		tmp = x + y;
	else
		tmp = -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -1.25e+52], (-z), If[LessEqual[y, -4.2e-148], N[(x + y), $MachinePrecision], If[LessEqual[y, -1.3e-177], N[(N[(z / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[y, 5.8e+69], N[(x + y), $MachinePrecision], (-z)]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+52}:\\
\;\;\;\;-z\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-148}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{-177}:\\
\;\;\;\;\frac{z}{y} \cdot \left(-x\right)\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+69}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;-z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.25e52 or 5.7999999999999997e69 < y

    1. Initial program 70.1%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    4. Step-by-step derivation
      1. mul-1-neg67.1%

        \[\leadsto \color{blue}{-z} \]
    5. Simplified67.1%

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

    if -1.25e52 < y < -4.2e-148 or -1.3e-177 < y < 5.7999999999999997e69

    1. Initial program 99.2%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative73.9%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified73.9%

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

    if -4.2e-148 < y < -1.3e-177

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\frac{x}{1 - \frac{y}{z}}} \]
    4. Taylor expanded in y around inf 80.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{y}} \]
    5. Step-by-step derivation
      1. mul-1-neg80.1%

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

        \[\leadsto -\color{blue}{x \cdot \frac{z}{y}} \]
      3. distribute-rgt-neg-in80.1%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{z}{y}\right)} \]
      4. distribute-neg-frac280.1%

        \[\leadsto x \cdot \color{blue}{\frac{z}{-y}} \]
    6. Simplified80.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+52}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-148}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-177}:\\ \;\;\;\;\frac{z}{y} \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+69}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{y}{z}\\ \mathbf{if}\;y \leq -3.3 \cdot 10^{+64}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-6} \lor \neg \left(y \leq 4.2 \cdot 10^{+22}\right):\\ \;\;\;\;\frac{y}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t\_0}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- 1.0 (/ y z))))
   (if (<= y -3.3e+64)
     (- z)
     (if (or (<= y -8.5e-6) (not (<= y 4.2e+22))) (/ y t_0) (/ x t_0)))))
double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double tmp;
	if (y <= -3.3e+64) {
		tmp = -z;
	} else if ((y <= -8.5e-6) || !(y <= 4.2e+22)) {
		tmp = y / t_0;
	} else {
		tmp = x / 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 = 1.0d0 - (y / z)
    if (y <= (-3.3d+64)) then
        tmp = -z
    else if ((y <= (-8.5d-6)) .or. (.not. (y <= 4.2d+22))) then
        tmp = y / t_0
    else
        tmp = x / t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double tmp;
	if (y <= -3.3e+64) {
		tmp = -z;
	} else if ((y <= -8.5e-6) || !(y <= 4.2e+22)) {
		tmp = y / t_0;
	} else {
		tmp = x / t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 1.0 - (y / z)
	tmp = 0
	if y <= -3.3e+64:
		tmp = -z
	elif (y <= -8.5e-6) or not (y <= 4.2e+22):
		tmp = y / t_0
	else:
		tmp = x / t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(1.0 - Float64(y / z))
	tmp = 0.0
	if (y <= -3.3e+64)
		tmp = Float64(-z);
	elseif ((y <= -8.5e-6) || !(y <= 4.2e+22))
		tmp = Float64(y / t_0);
	else
		tmp = Float64(x / t_0);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 1.0 - (y / z);
	tmp = 0.0;
	if (y <= -3.3e+64)
		tmp = -z;
	elseif ((y <= -8.5e-6) || ~((y <= 4.2e+22)))
		tmp = y / t_0;
	else
		tmp = x / t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.3e+64], (-z), If[Or[LessEqual[y, -8.5e-6], N[Not[LessEqual[y, 4.2e+22]], $MachinePrecision]], N[(y / t$95$0), $MachinePrecision], N[(x / t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 1 - \frac{y}{z}\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{+64}:\\
\;\;\;\;-z\\

\mathbf{elif}\;y \leq -8.5 \cdot 10^{-6} \lor \neg \left(y \leq 4.2 \cdot 10^{+22}\right):\\
\;\;\;\;\frac{y}{t\_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.29999999999999988e64

    1. Initial program 63.9%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    4. Step-by-step derivation
      1. mul-1-neg70.8%

        \[\leadsto \color{blue}{-z} \]
    5. Simplified70.8%

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

    if -3.29999999999999988e64 < y < -8.4999999999999999e-6 or 4.1999999999999996e22 < y

    1. Initial program 83.6%

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

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

    if -8.4999999999999999e-6 < y < 4.1999999999999996e22

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{+64}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-6} \lor \neg \left(y \leq 4.2 \cdot 10^{+22}\right):\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 68.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{+22} \lor \neg \left(y \leq 5.6 \cdot 10^{+22}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= y -6.4e+22) (not (<= y 5.6e+22))) (- z) (/ x (- 1.0 (/ y z)))))
double code(double x, double y, double z) {
	double tmp;
	if ((y <= -6.4e+22) || !(y <= 5.6e+22)) {
		tmp = -z;
	} else {
		tmp = x / (1.0 - (y / 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 <= (-6.4d+22)) .or. (.not. (y <= 5.6d+22))) then
        tmp = -z
    else
        tmp = x / (1.0d0 - (y / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((y <= -6.4e+22) || !(y <= 5.6e+22)) {
		tmp = -z;
	} else {
		tmp = x / (1.0 - (y / z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (y <= -6.4e+22) or not (y <= 5.6e+22):
		tmp = -z
	else:
		tmp = x / (1.0 - (y / z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((y <= -6.4e+22) || !(y <= 5.6e+22))
		tmp = Float64(-z);
	else
		tmp = Float64(x / Float64(1.0 - Float64(y / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((y <= -6.4e+22) || ~((y <= 5.6e+22)))
		tmp = -z;
	else
		tmp = x / (1.0 - (y / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[y, -6.4e+22], N[Not[LessEqual[y, 5.6e+22]], $MachinePrecision]], (-z), N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+22} \lor \neg \left(y \leq 5.6 \cdot 10^{+22}\right):\\
\;\;\;\;-z\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.4e22 or 5.6e22 < y

    1. Initial program 74.1%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    4. Step-by-step derivation
      1. mul-1-neg62.9%

        \[\leadsto \color{blue}{-z} \]
    5. Simplified62.9%

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

    if -6.4e22 < y < 5.6e22

    1. Initial program 99.9%

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

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

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

Alternative 9: 56.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+45}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-118}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 21000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -1.9e+45)
   (- z)
   (if (<= y -4.7e-118) y (if (<= y 21000.0) x (- z)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.9e+45) {
		tmp = -z;
	} else if (y <= -4.7e-118) {
		tmp = y;
	} else if (y <= 21000.0) {
		tmp = x;
	} else {
		tmp = -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.9d+45)) then
        tmp = -z
    else if (y <= (-4.7d-118)) then
        tmp = y
    else if (y <= 21000.0d0) then
        tmp = x
    else
        tmp = -z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.9e+45) {
		tmp = -z;
	} else if (y <= -4.7e-118) {
		tmp = y;
	} else if (y <= 21000.0) {
		tmp = x;
	} else {
		tmp = -z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -1.9e+45:
		tmp = -z
	elif y <= -4.7e-118:
		tmp = y
	elif y <= 21000.0:
		tmp = x
	else:
		tmp = -z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -1.9e+45)
		tmp = Float64(-z);
	elseif (y <= -4.7e-118)
		tmp = y;
	elseif (y <= 21000.0)
		tmp = x;
	else
		tmp = Float64(-z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -1.9e+45)
		tmp = -z;
	elseif (y <= -4.7e-118)
		tmp = y;
	elseif (y <= 21000.0)
		tmp = x;
	else
		tmp = -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -1.9e+45], (-z), If[LessEqual[y, -4.7e-118], y, If[LessEqual[y, 21000.0], x, (-z)]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+45}:\\
\;\;\;\;-z\\

\mathbf{elif}\;y \leq -4.7 \cdot 10^{-118}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 21000:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;-z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.9000000000000001e45 or 21000 < y

    1. Initial program 73.5%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    4. Step-by-step derivation
      1. mul-1-neg63.4%

        \[\leadsto \color{blue}{-z} \]
    5. Simplified63.4%

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

    if -1.9000000000000001e45 < y < -4.69999999999999991e-118

    1. Initial program 99.7%

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

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

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

    if -4.69999999999999991e-118 < y < 21000

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 10: 67.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+52} \lor \neg \left(y \leq 5.9 \cdot 10^{+69}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= y -1.55e+52) (not (<= y 5.9e+69))) (- z) (+ x y)))
double code(double x, double y, double z) {
	double tmp;
	if ((y <= -1.55e+52) || !(y <= 5.9e+69)) {
		tmp = -z;
	} 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 ((y <= (-1.55d+52)) .or. (.not. (y <= 5.9d+69))) then
        tmp = -z
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((y <= -1.55e+52) || !(y <= 5.9e+69)) {
		tmp = -z;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (y <= -1.55e+52) or not (y <= 5.9e+69):
		tmp = -z
	else:
		tmp = x + y
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((y <= -1.55e+52) || !(y <= 5.9e+69))
		tmp = Float64(-z);
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((y <= -1.55e+52) || ~((y <= 5.9e+69)))
		tmp = -z;
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.55e+52], N[Not[LessEqual[y, 5.9e+69]], $MachinePrecision]], (-z), N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+52} \lor \neg \left(y \leq 5.9 \cdot 10^{+69}\right):\\
\;\;\;\;-z\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.55e52 or 5.90000000000000004e69 < y

    1. Initial program 70.1%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    4. Step-by-step derivation
      1. mul-1-neg67.1%

        \[\leadsto \color{blue}{-z} \]
    5. Simplified67.1%

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

    if -1.55e52 < y < 5.90000000000000004e69

    1. Initial program 99.3%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified71.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+52} \lor \neg \left(y \leq 5.9 \cdot 10^{+69}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 36.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{-118}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -3.8e-118) y (if (<= y 1.16e+42) x y)))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -3.8e-118) {
		tmp = y;
	} else if (y <= 1.16e+42) {
		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 <= (-3.8d-118)) then
        tmp = y
    else if (y <= 1.16d+42) 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 <= -3.8e-118) {
		tmp = y;
	} else if (y <= 1.16e+42) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -3.8e-118:
		tmp = y
	elif y <= 1.16e+42:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -3.8e-118)
		tmp = y;
	elseif (y <= 1.16e+42)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -3.8e-118)
		tmp = y;
	elseif (y <= 1.16e+42)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -3.8e-118], y, If[LessEqual[y, 1.16e+42], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-118}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 1.16 \cdot 10^{+42}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.8000000000000001e-118 or 1.15999999999999995e42 < y

    1. Initial program 78.0%

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

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

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

    if -3.8000000000000001e-118 < y < 1.15999999999999995e42

    1. Initial program 99.1%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 34.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 87.0%

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

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

Developer target: 93.2% 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 2024097 
(FPCore (x y z)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, A"
  :precision binary64

  :alt
  (if (< y -3.7429310762689856e+171) (* (/ (+ y x) (- y)) z) (if (< y 3.5534662456086734e+168) (/ (+ x y) (- 1.0 (/ y z))) (* (/ (+ y x) (- y)) z)))

  (/ (+ x y) (- 1.0 (/ y z))))