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

Percentage Accurate: 88.4% → 99.3%
Time: 5.6s
Alternatives: 11
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 11 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: 88.4% 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.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{-252} \lor \neg \left(t_0 \leq 0\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(\left(-x\right) - z\right)}{y} - z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ x y) (- 1.0 (/ y z)))))
   (if (or (<= t_0 -1e-252) (not (<= t_0 0.0)))
     t_0
     (- (/ (* z (- (- x) z)) y) z))))
double code(double x, double y, double z) {
	double t_0 = (x + y) / (1.0 - (y / z));
	double tmp;
	if ((t_0 <= -1e-252) || !(t_0 <= 0.0)) {
		tmp = t_0;
	} else {
		tmp = ((z * (-x - z)) / 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) :: t_0
    real(8) :: tmp
    t_0 = (x + y) / (1.0d0 - (y / z))
    if ((t_0 <= (-1d-252)) .or. (.not. (t_0 <= 0.0d0))) then
        tmp = t_0
    else
        tmp = ((z * (-x - z)) / y) - z
    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 <= -1e-252) || !(t_0 <= 0.0)) {
		tmp = t_0;
	} else {
		tmp = ((z * (-x - z)) / y) - z;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + y) / (1.0 - (y / z))
	tmp = 0
	if (t_0 <= -1e-252) or not (t_0 <= 0.0):
		tmp = t_0
	else:
		tmp = ((z * (-x - z)) / y) - z
	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 <= -1e-252) || !(t_0 <= 0.0))
		tmp = t_0;
	else
		tmp = Float64(Float64(Float64(z * Float64(Float64(-x) - z)) / y) - z);
	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 <= -1e-252) || ~((t_0 <= 0.0)))
		tmp = t_0;
	else
		tmp = ((z * (-x - z)) / y) - z;
	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, -1e-252], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], t$95$0, N[(N[(N[(z * N[((-x) - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - z), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < -9.99999999999999943e-253 or -0.0 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z)))

    1. Initial program 99.9%

      \[\frac{x + y}{1 - \frac{y}{z}} \]

    if -9.99999999999999943e-253 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < -0.0

    1. Initial program 8.7%

      \[\frac{x + y}{1 - \frac{y}{z}} \]
    2. 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}} \]
    3. 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. +-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z \cdot \left(\left(-x\right) - z\right)}{y} - z} \]
  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 -1 \cdot 10^{-252} \lor \neg \left(\frac{x + y}{1 - \frac{y}{z}} \leq 0\right):\\ \;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(\left(-x\right) - z\right)}{y} - z\\ \end{array} \]

Alternative 2: 99.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{-233} \lor \neg \left(t_0 \leq 0\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{\frac{y}{x + y}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ x y) (- 1.0 (/ y z)))))
   (if (or (<= t_0 -1e-233) (not (<= t_0 0.0))) t_0 (/ (- z) (/ y (+ x y))))))
double code(double x, double y, double z) {
	double t_0 = (x + y) / (1.0 - (y / z));
	double tmp;
	if ((t_0 <= -1e-233) || !(t_0 <= 0.0)) {
		tmp = t_0;
	} else {
		tmp = -z / (y / (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 = (x + y) / (1.0d0 - (y / z))
    if ((t_0 <= (-1d-233)) .or. (.not. (t_0 <= 0.0d0))) then
        tmp = t_0
    else
        tmp = -z / (y / (x + 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 <= -1e-233) || !(t_0 <= 0.0)) {
		tmp = t_0;
	} else {
		tmp = -z / (y / (x + y));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + y) / (1.0 - (y / z))
	tmp = 0
	if (t_0 <= -1e-233) or not (t_0 <= 0.0):
		tmp = t_0
	else:
		tmp = -z / (y / (x + 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 <= -1e-233) || !(t_0 <= 0.0))
		tmp = t_0;
	else
		tmp = Float64(Float64(-z) / Float64(y / Float64(x + 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 <= -1e-233) || ~((t_0 <= 0.0)))
		tmp = t_0;
	else
		tmp = -z / (y / (x + 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, -1e-233], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], t$95$0, N[((-z) / N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < -9.99999999999999958e-234 or -0.0 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z)))

    1. Initial program 99.9%

      \[\frac{x + y}{1 - \frac{y}{z}} \]

    if -9.99999999999999958e-234 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < -0.0

    1. Initial program 11.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{\frac{y}{x + y}}} \]
      4. +-commutative99.9%

        \[\leadsto \frac{-z}{\frac{y}{\color{blue}{y + x}}} \]
    4. Simplified99.9%

      \[\leadsto \color{blue}{\frac{-z}{\frac{y}{y + x}}} \]
  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 -1 \cdot 10^{-233} \lor \neg \left(\frac{x + y}{1 - \frac{y}{z}} \leq 0\right):\\ \;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{\frac{y}{x + y}}\\ \end{array} \]

Alternative 3: 73.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{y}{z}\\ t_1 := \left(-z\right) - z \cdot \frac{x}{y}\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{+144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.1 \cdot 10^{+59}:\\ \;\;\;\;\frac{y}{t_0}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-98}:\\ \;\;\;\;\frac{x}{t_0}\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+57}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- 1.0 (/ y z))) (t_1 (- (- z) (* z (/ x y)))))
   (if (<= y -2.8e+144)
     t_1
     (if (<= y -7.1e+59)
       (/ y t_0)
       (if (<= y 6e-98) (/ x t_0) (if (<= y 6.8e+57) (+ x y) t_1))))))
double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double t_1 = -z - (z * (x / y));
	double tmp;
	if (y <= -2.8e+144) {
		tmp = t_1;
	} else if (y <= -7.1e+59) {
		tmp = y / t_0;
	} else if (y <= 6e-98) {
		tmp = x / t_0;
	} else if (y <= 6.8e+57) {
		tmp = x + y;
	} 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 - (z * (x / y))
    if (y <= (-2.8d+144)) then
        tmp = t_1
    else if (y <= (-7.1d+59)) then
        tmp = y / t_0
    else if (y <= 6d-98) then
        tmp = x / t_0
    else if (y <= 6.8d+57) then
        tmp = x + y
    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 - (z * (x / y));
	double tmp;
	if (y <= -2.8e+144) {
		tmp = t_1;
	} else if (y <= -7.1e+59) {
		tmp = y / t_0;
	} else if (y <= 6e-98) {
		tmp = x / t_0;
	} else if (y <= 6.8e+57) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 1.0 - (y / z)
	t_1 = -z - (z * (x / y))
	tmp = 0
	if y <= -2.8e+144:
		tmp = t_1
	elif y <= -7.1e+59:
		tmp = y / t_0
	elif y <= 6e-98:
		tmp = x / t_0
	elif y <= 6.8e+57:
		tmp = x + y
	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(z * Float64(x / y)))
	tmp = 0.0
	if (y <= -2.8e+144)
		tmp = t_1;
	elseif (y <= -7.1e+59)
		tmp = Float64(y / t_0);
	elseif (y <= 6e-98)
		tmp = Float64(x / t_0);
	elseif (y <= 6.8e+57)
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 1.0 - (y / z);
	t_1 = -z - (z * (x / y));
	tmp = 0.0;
	if (y <= -2.8e+144)
		tmp = t_1;
	elseif (y <= -7.1e+59)
		tmp = y / t_0;
	elseif (y <= 6e-98)
		tmp = x / t_0;
	elseif (y <= 6.8e+57)
		tmp = x + y;
	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[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e+144], t$95$1, If[LessEqual[y, -7.1e+59], N[(y / t$95$0), $MachinePrecision], If[LessEqual[y, 6e-98], N[(x / t$95$0), $MachinePrecision], If[LessEqual[y, 6.8e+57], N[(x + y), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.1 \cdot 10^{+59}:\\
\;\;\;\;\frac{y}{t_0}\\

\mathbf{elif}\;y \leq 6 \cdot 10^{-98}:\\
\;\;\;\;\frac{x}{t_0}\\

\mathbf{elif}\;y \leq 6.8 \cdot 10^{+57}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.80000000000000007e144 or 6.79999999999999984e57 < y

    1. Initial program 63.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y}} \]
    3. Step-by-step derivation
      1. associate--l+77.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y}} + -1 \cdot z \]
      13. mul-1-neg77.2%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y} - z} \]
    4. Simplified77.2%

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

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

        \[\leadsto \color{blue}{\left(-\frac{x \cdot z}{y}\right)} - z \]
      2. *-commutative79.1%

        \[\leadsto \left(-\frac{\color{blue}{z \cdot x}}{y}\right) - z \]
      3. associate-*r/83.8%

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

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

        \[\leadsto z \cdot \color{blue}{\frac{-x}{y}} - z \]
    7. Simplified83.8%

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

    if -2.80000000000000007e144 < y < -7.10000000000000003e59

    1. Initial program 92.8%

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

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

    if -7.10000000000000003e59 < y < 6e-98

    1. Initial program 99.2%

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

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

    if 6e-98 < y < 6.79999999999999984e57

    1. Initial program 95.2%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified68.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+144}:\\ \;\;\;\;\left(-z\right) - z \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -7.1 \cdot 10^{+59}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-98}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+57}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) - z \cdot \frac{x}{y}\\ \end{array} \]

Alternative 4: 68.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{y}{z}\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{+174}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -1.36 \cdot 10^{+57}:\\ \;\;\;\;\frac{y}{t_0}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-97}:\\ \;\;\;\;\frac{x}{t_0}\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{+120}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (- 1.0 (/ y z))))
   (if (<= y -2.2e+174)
     (- z)
     (if (<= y -1.36e+57)
       (/ y t_0)
       (if (<= y 8.5e-97) (/ x t_0) (if (<= y 9.6e+120) (+ x y) (- z)))))))
double code(double x, double y, double z) {
	double t_0 = 1.0 - (y / z);
	double tmp;
	if (y <= -2.2e+174) {
		tmp = -z;
	} else if (y <= -1.36e+57) {
		tmp = y / t_0;
	} else if (y <= 8.5e-97) {
		tmp = x / t_0;
	} else if (y <= 9.6e+120) {
		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) :: t_0
    real(8) :: tmp
    t_0 = 1.0d0 - (y / z)
    if (y <= (-2.2d+174)) then
        tmp = -z
    else if (y <= (-1.36d+57)) then
        tmp = y / t_0
    else if (y <= 8.5d-97) then
        tmp = x / t_0
    else if (y <= 9.6d+120) then
        tmp = x + y
    else
        tmp = -z
    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 <= -2.2e+174) {
		tmp = -z;
	} else if (y <= -1.36e+57) {
		tmp = y / t_0;
	} else if (y <= 8.5e-97) {
		tmp = x / t_0;
	} else if (y <= 9.6e+120) {
		tmp = x + y;
	} else {
		tmp = -z;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 1.0 - (y / z)
	tmp = 0
	if y <= -2.2e+174:
		tmp = -z
	elif y <= -1.36e+57:
		tmp = y / t_0
	elif y <= 8.5e-97:
		tmp = x / t_0
	elif y <= 9.6e+120:
		tmp = x + y
	else:
		tmp = -z
	return tmp
function code(x, y, z)
	t_0 = Float64(1.0 - Float64(y / z))
	tmp = 0.0
	if (y <= -2.2e+174)
		tmp = Float64(-z);
	elseif (y <= -1.36e+57)
		tmp = Float64(y / t_0);
	elseif (y <= 8.5e-97)
		tmp = Float64(x / t_0);
	elseif (y <= 9.6e+120)
		tmp = Float64(x + y);
	else
		tmp = Float64(-z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 1.0 - (y / z);
	tmp = 0.0;
	if (y <= -2.2e+174)
		tmp = -z;
	elseif (y <= -1.36e+57)
		tmp = y / t_0;
	elseif (y <= 8.5e-97)
		tmp = x / t_0;
	elseif (y <= 9.6e+120)
		tmp = x + y;
	else
		tmp = -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+174], (-z), If[LessEqual[y, -1.36e+57], N[(y / t$95$0), $MachinePrecision], If[LessEqual[y, 8.5e-97], N[(x / t$95$0), $MachinePrecision], If[LessEqual[y, 9.6e+120], N[(x + y), $MachinePrecision], (-z)]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.36 \cdot 10^{+57}:\\
\;\;\;\;\frac{y}{t_0}\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-97}:\\
\;\;\;\;\frac{x}{t_0}\\

\mathbf{elif}\;y \leq 9.6 \cdot 10^{+120}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.2000000000000002e174 or 9.60000000000000004e120 < y

    1. Initial program 60.5%

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

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

        \[\leadsto \color{blue}{-z} \]
    4. Simplified74.6%

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

    if -2.2000000000000002e174 < y < -1.36e57

    1. Initial program 85.2%

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

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

    if -1.36e57 < y < 8.5000000000000002e-97

    1. Initial program 99.2%

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

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

    if 8.5000000000000002e-97 < y < 9.60000000000000004e120

    1. Initial program 90.6%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified61.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+174}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq -1.36 \cdot 10^{+57}:\\ \;\;\;\;\frac{y}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-97}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{+120}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \]

Alternative 5: 69.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-134} \lor \neg \left(z \leq 1.5 \cdot 10^{+97}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.00000000000000032e-134 or 1.4999999999999999e97 < z

    1. Initial program 95.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified78.7%

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

    if -8.00000000000000032e-134 < z < 1.4999999999999999e97

    1. Initial program 76.9%

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

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

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{y}{x + y}}} \]
      3. distribute-neg-frac75.2%

        \[\leadsto \color{blue}{\frac{-z}{\frac{y}{x + y}}} \]
      4. +-commutative75.2%

        \[\leadsto \frac{-z}{\frac{y}{\color{blue}{y + x}}} \]
    4. Simplified75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-134} \lor \neg \left(z \leq 1.5 \cdot 10^{+97}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{\frac{y}{x + y}}\\ \end{array} \]

Alternative 6: 68.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-134}:\\ \;\;\;\;\left(x + y\right) \cdot \left(1 + \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+97}:\\ \;\;\;\;\frac{-z}{\frac{y}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -8.5e-134)
   (* (+ x y) (+ 1.0 (/ y z)))
   (if (<= z 1.36e+97) (/ (- z) (/ y (+ x y))) (+ x y))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -8.5e-134) {
		tmp = (x + y) * (1.0 + (y / z));
	} else if (z <= 1.36e+97) {
		tmp = -z / (y / (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 <= (-8.5d-134)) then
        tmp = (x + y) * (1.0d0 + (y / z))
    else if (z <= 1.36d+97) then
        tmp = -z / (y / (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 <= -8.5e-134) {
		tmp = (x + y) * (1.0 + (y / z));
	} else if (z <= 1.36e+97) {
		tmp = -z / (y / (x + y));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -8.5e-134:
		tmp = (x + y) * (1.0 + (y / z))
	elif z <= 1.36e+97:
		tmp = -z / (y / (x + y))
	else:
		tmp = x + y
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -8.5e-134)
		tmp = Float64(Float64(x + y) * Float64(1.0 + Float64(y / z)));
	elseif (z <= 1.36e+97)
		tmp = Float64(Float64(-z) / Float64(y / Float64(x + y)));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -8.5e-134)
		tmp = (x + y) * (1.0 + (y / z));
	elseif (z <= 1.36e+97)
		tmp = -z / (y / (x + y));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -8.5e-134], N[(N[(x + y), $MachinePrecision] * N[(1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e+97], N[((-z) / N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.36 \cdot 10^{+97}:\\
\;\;\;\;\frac{-z}{\frac{y}{x + y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.50000000000000015e-134

    1. Initial program 94.3%

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

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

        \[\leadsto \color{blue}{\left(x + y\right) + \frac{y \cdot \left(x + y\right)}{z}} \]
      2. *-lft-identity66.6%

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

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

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

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

        \[\leadsto \color{blue}{\left(y + x\right)} \cdot \left(1 + \frac{y}{z}\right) \]
    4. Simplified73.2%

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

    if -8.50000000000000015e-134 < z < 1.36e97

    1. Initial program 76.9%

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

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

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{y}{x + y}}} \]
      3. distribute-neg-frac75.2%

        \[\leadsto \color{blue}{\frac{-z}{\frac{y}{x + y}}} \]
      4. +-commutative75.2%

        \[\leadsto \frac{-z}{\frac{y}{\color{blue}{y + x}}} \]
    4. Simplified75.2%

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

    if 1.36e97 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified92.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-134}:\\ \;\;\;\;\left(x + y\right) \cdot \left(1 + \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{+97}:\\ \;\;\;\;\frac{-z}{\frac{y}{x + y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 67.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+67}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-97}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+122}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -7.2e+67)
   (- z)
   (if (<= y 2.7e-97)
     (/ x (- 1.0 (/ y z)))
     (if (<= y 4.8e+122) (+ x y) (- z)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -7.2e+67) {
		tmp = -z;
	} else if (y <= 2.7e-97) {
		tmp = x / (1.0 - (y / z));
	} else if (y <= 4.8e+122) {
		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 <= (-7.2d+67)) then
        tmp = -z
    else if (y <= 2.7d-97) then
        tmp = x / (1.0d0 - (y / z))
    else if (y <= 4.8d+122) 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 <= -7.2e+67) {
		tmp = -z;
	} else if (y <= 2.7e-97) {
		tmp = x / (1.0 - (y / z));
	} else if (y <= 4.8e+122) {
		tmp = x + y;
	} else {
		tmp = -z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -7.2e+67:
		tmp = -z
	elif y <= 2.7e-97:
		tmp = x / (1.0 - (y / z))
	elif y <= 4.8e+122:
		tmp = x + y
	else:
		tmp = -z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -7.2e+67)
		tmp = Float64(-z);
	elseif (y <= 2.7e-97)
		tmp = Float64(x / Float64(1.0 - Float64(y / z)));
	elseif (y <= 4.8e+122)
		tmp = Float64(x + y);
	else
		tmp = Float64(-z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -7.2e+67)
		tmp = -z;
	elseif (y <= 2.7e-97)
		tmp = x / (1.0 - (y / z));
	elseif (y <= 4.8e+122)
		tmp = x + y;
	else
		tmp = -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -7.2e+67], (-z), If[LessEqual[y, 2.7e-97], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+122], N[(x + y), $MachinePrecision], (-z)]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-97}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+122}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.1999999999999998e67 or 4.8000000000000004e122 < y

    1. Initial program 66.4%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    3. Step-by-step derivation
      1. mul-1-neg69.5%

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

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

    if -7.1999999999999998e67 < y < 2.69999999999999985e-97

    1. Initial program 99.2%

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

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

    if 2.69999999999999985e-97 < y < 4.8000000000000004e122

    1. Initial program 90.6%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified61.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+67}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-97}:\\ \;\;\;\;\frac{x}{1 - \frac{y}{z}}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+122}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \]

Alternative 8: 56.7% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{+120}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.1e62 or 2.5999999999999999e120 < y

    1. Initial program 66.4%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    3. Step-by-step derivation
      1. mul-1-neg69.5%

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

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

    if -2.1e62 < y < 5.6e9

    1. Initial program 99.3%

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

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

    if 5.6e9 < y < 2.5999999999999999e120

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification60.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+62}:\\ \;\;\;\;-z\\ \mathbf{elif}\;y \leq 5600000000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+120}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \]

Alternative 9: 67.5% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+76} \lor \neg \left(y \leq 4.3 \cdot 10^{+120}\right):\\
\;\;\;\;-z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8000000000000001e76 or 4.3000000000000002e120 < y

    1. Initial program 66.4%

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

      \[\leadsto \color{blue}{-1 \cdot z} \]
    3. Step-by-step derivation
      1. mul-1-neg69.5%

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

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

    if -1.8000000000000001e76 < y < 4.3000000000000002e120

    1. Initial program 96.8%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified69.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+76} \lor \neg \left(y \leq 4.3 \cdot 10^{+120}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 10: 40.4% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.6 \cdot 10^{-154}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.4 \cdot 10^{-67}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.60000000000000019e-154 or 2.4e-67 < x

    1. Initial program 86.2%

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

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

    if -7.60000000000000019e-154 < x < 2.4e-67

    1. Initial program 90.7%

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

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

        \[\leadsto \color{blue}{\left(x + y\right) + \frac{y \cdot \left(x + y\right)}{z}} \]
      2. *-lft-identity47.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(y + x\right)} \cdot \left(1 + \frac{y}{z}\right) \]
    4. Simplified49.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.6 \cdot 10^{-154}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-67}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 34.6% 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.4%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification38.2%

    \[\leadsto x \]

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

  :herbie-target
  (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))))