Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A

Percentage Accurate: 89.0% → 98.5%
Time: 13.4s
Alternatives: 12
Speedup: 0.7×

Specification

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

\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\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: 89.0% accurate, 1.0× speedup?

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

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

Alternative 1: 98.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+47} \lor \neg \left(z \leq 6 \cdot 10^{+83}\right):\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -1.4e+47) (not (<= z 6e+83)))
   (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0))
   (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.4e+47) || !(z <= 6e+83)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-1.4d+47)) .or. (.not. (z <= 6d+83))) then
        tmp = (x + (y / (t - (x / z)))) / (x + 1.0d0)
    else
        tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.4e+47) || !(z <= 6e+83)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.4e+47) or not (z <= 6e+83):
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0)
	else:
		tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.4e+47) || !(z <= 6e+83))
		tmp = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -1.4e+47) || ~((z <= 6e+83)))
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	else
		tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.4e+47], N[Not[LessEqual[z, 6e+83]], $MachinePrecision]], N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+47} \lor \neg \left(z \leq 6 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.39999999999999994e47 or 5.9999999999999999e83 < z

    1. Initial program 73.1%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative73.1%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified73.1%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 73.1%

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

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

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

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

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

    if -1.39999999999999994e47 < z < 5.9999999999999999e83

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

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

Alternative 2: 68.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -29000000:\\
\;\;\;\;1 + \frac{-1}{x}\\

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

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\
\;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2.9e7

    1. Initial program 91.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative91.5%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified91.5%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 100.0%

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{x + 1}} \]
    8. Taylor expanded in x around inf 100.0%

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

    if -2.9e7 < x < -7.00000000000000029e-173

    1. Initial program 90.3%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative90.3%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified90.3%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 56.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{y}{x} \cdot \frac{z}{\color{blue}{x + 1}} \]
    10. Simplified49.9%

      \[\leadsto \color{blue}{1 - \frac{y}{x} \cdot \frac{z}{x + 1}} \]
    11. Taylor expanded in x around 0 54.5%

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

    if -7.00000000000000029e-173 < x < 4.19999999999999985e-122

    1. Initial program 80.2%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative80.2%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified80.2%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 81.6%

      \[\leadsto \frac{x + \color{blue}{\frac{y}{t}}}{x + 1} \]
    6. Taylor expanded in y around inf 68.8%

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

    if 4.19999999999999985e-122 < x < 2.9e-47

    1. Initial program 100.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 75.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{y}{x} \cdot \frac{z}{\color{blue}{x + 1}} \]
    10. Simplified75.9%

      \[\leadsto \color{blue}{1 - \frac{y}{x} \cdot \frac{z}{x + 1}} \]
    11. Taylor expanded in x around 0 75.9%

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

    if 2.9e-47 < x

    1. Initial program 90.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative90.4%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 78.6%

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative78.6%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified78.6%

      \[\leadsto \color{blue}{\frac{x}{x + 1}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification77.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -29000000:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{z \cdot y}{x}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-122}:\\ \;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-47}:\\ \;\;\;\;1 - z \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 68.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -12500000000:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;x \leq -6.3 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{z \cdot y}{x}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{\frac{y}{t}}{x + 1}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-47}:\\ \;\;\;\;1 - z \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -12500000000.0)
   (+ 1.0 (/ -1.0 x))
   (if (<= x -6.3e-173)
     (- 1.0 (/ (* z y) x))
     (if (<= x 3.5e-125)
       (/ (/ y t) (+ x 1.0))
       (if (<= x 1.35e-47) (- 1.0 (* z (/ y x))) (/ x (+ x 1.0)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -12500000000.0) {
		tmp = 1.0 + (-1.0 / x);
	} else if (x <= -6.3e-173) {
		tmp = 1.0 - ((z * y) / x);
	} else if (x <= 3.5e-125) {
		tmp = (y / t) / (x + 1.0);
	} else if (x <= 1.35e-47) {
		tmp = 1.0 - (z * (y / x));
	} else {
		tmp = x / (x + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-12500000000.0d0)) then
        tmp = 1.0d0 + ((-1.0d0) / x)
    else if (x <= (-6.3d-173)) then
        tmp = 1.0d0 - ((z * y) / x)
    else if (x <= 3.5d-125) then
        tmp = (y / t) / (x + 1.0d0)
    else if (x <= 1.35d-47) then
        tmp = 1.0d0 - (z * (y / x))
    else
        tmp = x / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -12500000000.0) {
		tmp = 1.0 + (-1.0 / x);
	} else if (x <= -6.3e-173) {
		tmp = 1.0 - ((z * y) / x);
	} else if (x <= 3.5e-125) {
		tmp = (y / t) / (x + 1.0);
	} else if (x <= 1.35e-47) {
		tmp = 1.0 - (z * (y / x));
	} else {
		tmp = x / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -12500000000.0:
		tmp = 1.0 + (-1.0 / x)
	elif x <= -6.3e-173:
		tmp = 1.0 - ((z * y) / x)
	elif x <= 3.5e-125:
		tmp = (y / t) / (x + 1.0)
	elif x <= 1.35e-47:
		tmp = 1.0 - (z * (y / x))
	else:
		tmp = x / (x + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -12500000000.0)
		tmp = Float64(1.0 + Float64(-1.0 / x));
	elseif (x <= -6.3e-173)
		tmp = Float64(1.0 - Float64(Float64(z * y) / x));
	elseif (x <= 3.5e-125)
		tmp = Float64(Float64(y / t) / Float64(x + 1.0));
	elseif (x <= 1.35e-47)
		tmp = Float64(1.0 - Float64(z * Float64(y / x)));
	else
		tmp = Float64(x / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -12500000000.0)
		tmp = 1.0 + (-1.0 / x);
	elseif (x <= -6.3e-173)
		tmp = 1.0 - ((z * y) / x);
	elseif (x <= 3.5e-125)
		tmp = (y / t) / (x + 1.0);
	elseif (x <= 1.35e-47)
		tmp = 1.0 - (z * (y / x));
	else
		tmp = x / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -12500000000.0], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.3e-173], N[(1.0 - N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-125], N[(N[(y / t), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e-47], N[(1.0 - N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -12500000000:\\
\;\;\;\;1 + \frac{-1}{x}\\

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

\mathbf{elif}\;x \leq 3.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{\frac{y}{t}}{x + 1}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.25e10

    1. Initial program 91.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative91.5%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified91.5%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 100.0%

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x}{x + 1}} \]
    8. Taylor expanded in x around inf 100.0%

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

    if -1.25e10 < x < -6.29999999999999968e-173

    1. Initial program 90.3%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative90.3%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified90.3%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 56.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{y}{x} \cdot \frac{z}{\color{blue}{x + 1}} \]
    10. Simplified49.9%

      \[\leadsto \color{blue}{1 - \frac{y}{x} \cdot \frac{z}{x + 1}} \]
    11. Taylor expanded in x around 0 54.5%

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

    if -6.29999999999999968e-173 < x < 3.49999999999999998e-125

    1. Initial program 80.2%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative80.2%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified80.2%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 81.6%

      \[\leadsto \frac{x + \color{blue}{\frac{y}{t}}}{x + 1} \]
    6. Taylor expanded in y around inf 68.8%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{t}}{1 + x}} \]
      2. +-commutative68.8%

        \[\leadsto \frac{\frac{y}{t}}{\color{blue}{x + 1}} \]
    8. Simplified68.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{t}}{x + 1}} \]

    if 3.49999999999999998e-125 < x < 1.3499999999999999e-47

    1. Initial program 100.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 75.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{y}{x} \cdot \frac{z}{\color{blue}{x + 1}} \]
    10. Simplified75.9%

      \[\leadsto \color{blue}{1 - \frac{y}{x} \cdot \frac{z}{x + 1}} \]
    11. Taylor expanded in x around 0 75.9%

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

    if 1.3499999999999999e-47 < x

    1. Initial program 90.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative90.4%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified90.4%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 78.6%

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative78.6%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified78.6%

      \[\leadsto \color{blue}{\frac{x}{x + 1}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification77.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -12500000000:\\ \;\;\;\;1 + \frac{-1}{x}\\ \mathbf{elif}\;x \leq -6.3 \cdot 10^{-173}:\\ \;\;\;\;1 - \frac{z \cdot y}{x}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{\frac{y}{t}}{x + 1}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{-47}:\\ \;\;\;\;1 - z \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-27} \lor \neg \left(t \leq 1.15 \cdot 10^{-157}\right):\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \left(x - y \cdot \frac{z}{x}\right)}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -2.3e-27) (not (<= t 1.15e-157)))
   (/ (+ x (/ y t)) (+ x 1.0))
   (/ (+ 1.0 (- x (* y (/ z x)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -2.3e-27) || !(t <= 1.15e-157)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else {
		tmp = (1.0 + (x - (y * (z / x)))) / (x + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((t <= (-2.3d-27)) .or. (.not. (t <= 1.15d-157))) then
        tmp = (x + (y / t)) / (x + 1.0d0)
    else
        tmp = (1.0d0 + (x - (y * (z / x)))) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -2.3e-27) || !(t <= 1.15e-157)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else {
		tmp = (1.0 + (x - (y * (z / x)))) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -2.3e-27) or not (t <= 1.15e-157):
		tmp = (x + (y / t)) / (x + 1.0)
	else:
		tmp = (1.0 + (x - (y * (z / x)))) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -2.3e-27) || !(t <= 1.15e-157))
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(1.0 + Float64(x - Float64(y * Float64(z / x)))) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((t <= -2.3e-27) || ~((t <= 1.15e-157)))
		tmp = (x + (y / t)) / (x + 1.0);
	else
		tmp = (1.0 + (x - (y * (z / x)))) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.3e-27], N[Not[LessEqual[t, 1.15e-157]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-27} \lor \neg \left(t \leq 1.15 \cdot 10^{-157}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.2999999999999999e-27 or 1.14999999999999994e-157 < t

    1. Initial program 84.2%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative84.2%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified84.2%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 85.1%

      \[\leadsto \frac{x + \color{blue}{\frac{y}{t}}}{x + 1} \]

    if -2.2999999999999999e-27 < t < 1.14999999999999994e-157

    1. Initial program 95.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative95.7%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified95.7%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 78.4%

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

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

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

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

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

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

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

Alternative 5: 90.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-219} \lor \neg \left(z \leq 1.65 \cdot 10^{-233}\right):\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1 - y \cdot \frac{z}{x}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -1.6e-219) (not (<= z 1.65e-233)))
   (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0))
   (- 1.0 (* y (/ z x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.6e-219) || !(z <= 1.65e-233)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = 1.0 - (y * (z / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-1.6d-219)) .or. (.not. (z <= 1.65d-233))) then
        tmp = (x + (y / (t - (x / z)))) / (x + 1.0d0)
    else
        tmp = 1.0d0 - (y * (z / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.6e-219) || !(z <= 1.65e-233)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = 1.0 - (y * (z / x));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.6e-219) or not (z <= 1.65e-233):
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0)
	else:
		tmp = 1.0 - (y * (z / x))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.6e-219) || !(z <= 1.65e-233))
		tmp = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0));
	else
		tmp = Float64(1.0 - Float64(y * Float64(z / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -1.6e-219) || ~((z <= 1.65e-233)))
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	else
		tmp = 1.0 - (y * (z / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.6e-219], N[Not[LessEqual[z, 1.65e-233]], $MachinePrecision]], N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.59999999999999999e-219 or 1.65e-233 < z

    1. Initial program 86.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative86.6%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified86.6%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 86.6%

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

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

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

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

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

    if -1.59999999999999999e-219 < z < 1.65e-233

    1. Initial program 100.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 91.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{y}{x} \cdot \frac{z}{1 + x}} \]
      4. +-commutative85.7%

        \[\leadsto 1 - \frac{y}{x} \cdot \frac{z}{\color{blue}{x + 1}} \]
    10. Simplified85.7%

      \[\leadsto \color{blue}{1 - \frac{y}{x} \cdot \frac{z}{x + 1}} \]
    11. Taylor expanded in x around 0 91.6%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot z}{x}} \]
    12. Step-by-step derivation
      1. associate-/l*91.6%

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

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

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

Alternative 6: 90.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{-161} \lor \neg \left(y \leq 4.9 \cdot 10^{-42}\right):\\ \;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= y -5.5e-161) (not (<= y 4.9e-42)))
   (/ (+ x (/ y (- t (/ x z)))) (+ x 1.0))
   (/ (+ x (/ x (- x (* z t)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -5.5e-161) || !(y <= 4.9e-42)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((y <= (-5.5d-161)) .or. (.not. (y <= 4.9d-42))) then
        tmp = (x + (y / (t - (x / z)))) / (x + 1.0d0)
    else
        tmp = (x + (x / (x - (z * t)))) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -5.5e-161) || !(y <= 4.9e-42)) {
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	} else {
		tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -5.5e-161) or not (y <= 4.9e-42):
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0)
	else:
		tmp = (x + (x / (x - (z * t)))) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((y <= -5.5e-161) || !(y <= 4.9e-42))
		tmp = Float64(Float64(x + Float64(y / Float64(t - Float64(x / z)))) / Float64(x + 1.0));
	else
		tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((y <= -5.5e-161) || ~((y <= 4.9e-42)))
		tmp = (x + (y / (t - (x / z)))) / (x + 1.0);
	else
		tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.5e-161], N[Not[LessEqual[y, 4.9e-42]], $MachinePrecision]], N[(N[(x + N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-161} \lor \neg \left(y \leq 4.9 \cdot 10^{-42}\right):\\
\;\;\;\;\frac{x + \frac{y}{t - \frac{x}{z}}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.5e-161 or 4.9e-42 < y

    1. Initial program 83.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative83.6%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified83.6%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 83.6%

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

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

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

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

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

    if -5.5e-161 < y < 4.9e-42

    1. Initial program 100.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 95.1%

      \[\leadsto \color{blue}{\frac{x - \frac{x}{t \cdot z - x}}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative95.1%

        \[\leadsto \frac{x - \frac{x}{t \cdot z - x}}{\color{blue}{x + 1}} \]
    7. Simplified95.1%

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

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

Alternative 7: 80.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-30} \lor \neg \left(t \leq 1.2 \cdot 10^{-157}\right):\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{y}{x} \cdot \frac{z}{-1 - x}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -2.8e-30) (not (<= t 1.2e-157)))
   (/ (+ x (/ y t)) (+ x 1.0))
   (+ 1.0 (* (/ y x) (/ z (- -1.0 x))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -2.8e-30) || !(t <= 1.2e-157)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else {
		tmp = 1.0 + ((y / x) * (z / (-1.0 - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((t <= (-2.8d-30)) .or. (.not. (t <= 1.2d-157))) then
        tmp = (x + (y / t)) / (x + 1.0d0)
    else
        tmp = 1.0d0 + ((y / x) * (z / ((-1.0d0) - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -2.8e-30) || !(t <= 1.2e-157)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else {
		tmp = 1.0 + ((y / x) * (z / (-1.0 - x)));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -2.8e-30) or not (t <= 1.2e-157):
		tmp = (x + (y / t)) / (x + 1.0)
	else:
		tmp = 1.0 + ((y / x) * (z / (-1.0 - x)))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -2.8e-30) || !(t <= 1.2e-157))
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	else
		tmp = Float64(1.0 + Float64(Float64(y / x) * Float64(z / Float64(-1.0 - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((t <= -2.8e-30) || ~((t <= 1.2e-157)))
		tmp = (x + (y / t)) / (x + 1.0);
	else
		tmp = 1.0 + ((y / x) * (z / (-1.0 - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.8e-30], N[Not[LessEqual[t, 1.2e-157]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y / x), $MachinePrecision] * N[(z / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-30} \lor \neg \left(t \leq 1.2 \cdot 10^{-157}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.79999999999999988e-30 or 1.2e-157 < t

    1. Initial program 84.2%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative84.2%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified84.2%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 85.1%

      \[\leadsto \frac{x + \color{blue}{\frac{y}{t}}}{x + 1} \]

    if -2.79999999999999988e-30 < t < 1.2e-157

    1. Initial program 95.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative95.7%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified95.7%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 78.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{y}{x} \cdot \frac{z}{1 + x}} \]
      4. +-commutative78.5%

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

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

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

Alternative 8: 77.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-102} \lor \neg \left(z \leq 1.1 \cdot 10^{-229}\right):\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1 - y \cdot \frac{z}{x}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -5.8e-102) (not (<= z 1.1e-229)))
   (/ (+ x (/ y t)) (+ x 1.0))
   (- 1.0 (* y (/ z x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -5.8e-102) || !(z <= 1.1e-229)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else {
		tmp = 1.0 - (y * (z / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-5.8d-102)) .or. (.not. (z <= 1.1d-229))) then
        tmp = (x + (y / t)) / (x + 1.0d0)
    else
        tmp = 1.0d0 - (y * (z / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -5.8e-102) || !(z <= 1.1e-229)) {
		tmp = (x + (y / t)) / (x + 1.0);
	} else {
		tmp = 1.0 - (y * (z / x));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -5.8e-102) or not (z <= 1.1e-229):
		tmp = (x + (y / t)) / (x + 1.0)
	else:
		tmp = 1.0 - (y * (z / x))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -5.8e-102) || !(z <= 1.1e-229))
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	else
		tmp = Float64(1.0 - Float64(y * Float64(z / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -5.8e-102) || ~((z <= 1.1e-229)))
		tmp = (x + (y / t)) / (x + 1.0);
	else
		tmp = 1.0 - (y * (z / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.8e-102], N[Not[LessEqual[z, 1.1e-229]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-102} \lor \neg \left(z \leq 1.1 \cdot 10^{-229}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.79999999999999973e-102 or 1.0999999999999999e-229 < z

    1. Initial program 84.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative84.9%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified84.9%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 80.5%

      \[\leadsto \frac{x + \color{blue}{\frac{y}{t}}}{x + 1} \]

    if -5.79999999999999973e-102 < z < 1.0999999999999999e-229

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 83.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 - \frac{y}{x} \cdot \frac{z}{x + 1}} \]
    11. Taylor expanded in x around 0 82.0%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot z}{x}} \]
    12. Step-by-step derivation
      1. associate-/l*82.0%

        \[\leadsto 1 - \color{blue}{y \cdot \frac{z}{x}} \]
    13. Simplified82.0%

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

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

Alternative 9: 63.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+27} \lor \neg \left(z \leq 6.2 \cdot 10^{-78}\right):\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1 - y \cdot \frac{z}{x}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -6.2e+27) (not (<= z 6.2e-78)))
   (/ x (+ x 1.0))
   (- 1.0 (* y (/ z x)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -6.2e+27) || !(z <= 6.2e-78)) {
		tmp = x / (x + 1.0);
	} else {
		tmp = 1.0 - (y * (z / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-6.2d+27)) .or. (.not. (z <= 6.2d-78))) then
        tmp = x / (x + 1.0d0)
    else
        tmp = 1.0d0 - (y * (z / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -6.2e+27) || !(z <= 6.2e-78)) {
		tmp = x / (x + 1.0);
	} else {
		tmp = 1.0 - (y * (z / x));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -6.2e+27) or not (z <= 6.2e-78):
		tmp = x / (x + 1.0)
	else:
		tmp = 1.0 - (y * (z / x))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -6.2e+27) || !(z <= 6.2e-78))
		tmp = Float64(x / Float64(x + 1.0));
	else
		tmp = Float64(1.0 - Float64(y * Float64(z / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -6.2e+27) || ~((z <= 6.2e-78)))
		tmp = x / (x + 1.0);
	else
		tmp = 1.0 - (y * (z / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.2e+27], N[Not[LessEqual[z, 6.2e-78]], $MachinePrecision]], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+27} \lor \neg \left(z \leq 6.2 \cdot 10^{-78}\right):\\
\;\;\;\;\frac{x}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.19999999999999992e27 or 6.20000000000000035e-78 < z

    1. Initial program 79.3%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative79.3%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified79.3%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 56.9%

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative56.9%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified56.9%

      \[\leadsto \color{blue}{\frac{x}{x + 1}} \]

    if -6.19999999999999992e27 < z < 6.20000000000000035e-78

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 75.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{1 - \frac{y \cdot z}{x \cdot \left(1 + x\right)}} \]
      3. times-frac72.4%

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

        \[\leadsto 1 - \frac{y}{x} \cdot \frac{z}{\color{blue}{x + 1}} \]
    10. Simplified72.4%

      \[\leadsto \color{blue}{1 - \frac{y}{x} \cdot \frac{z}{x + 1}} \]
    11. Taylor expanded in x around 0 72.6%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot z}{x}} \]
    12. Step-by-step derivation
      1. associate-/l*72.6%

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

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

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

Alternative 10: 62.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+26} \lor \neg \left(z \leq 2.65 \cdot 10^{+85}\right):\\ \;\;\;\;\frac{x}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{z \cdot y}{x}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -2.05e+26) (not (<= z 2.65e+85)))
   (/ x (+ x 1.0))
   (- 1.0 (/ (* z y) x))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.05e+26) || !(z <= 2.65e+85)) {
		tmp = x / (x + 1.0);
	} else {
		tmp = 1.0 - ((z * y) / x);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-2.05d+26)) .or. (.not. (z <= 2.65d+85))) then
        tmp = x / (x + 1.0d0)
    else
        tmp = 1.0d0 - ((z * y) / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.05e+26) || !(z <= 2.65e+85)) {
		tmp = x / (x + 1.0);
	} else {
		tmp = 1.0 - ((z * y) / x);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -2.05e+26) or not (z <= 2.65e+85):
		tmp = x / (x + 1.0)
	else:
		tmp = 1.0 - ((z * y) / x)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -2.05e+26) || !(z <= 2.65e+85))
		tmp = Float64(x / Float64(x + 1.0));
	else
		tmp = Float64(1.0 - Float64(Float64(z * y) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -2.05e+26) || ~((z <= 2.65e+85)))
		tmp = x / (x + 1.0);
	else
		tmp = 1.0 - ((z * y) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.05e+26], N[Not[LessEqual[z, 2.65e+85]], $MachinePrecision]], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+26} \lor \neg \left(z \leq 2.65 \cdot 10^{+85}\right):\\
\;\;\;\;\frac{x}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.04999999999999992e26 or 2.65e85 < z

    1. Initial program 73.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative73.8%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified73.8%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 58.5%

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative58.5%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified58.5%

      \[\leadsto \color{blue}{\frac{x}{x + 1}} \]

    if -2.04999999999999992e26 < z < 2.65e85

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 72.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 - \frac{y}{x} \cdot \frac{z}{x + 1}} \]
    11. Taylor expanded in x around 0 68.1%

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

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

Alternative 11: 60.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-22} \lor \neg \left(z \leq 2.3 \cdot 10^{-80}\right):\\
\;\;\;\;\frac{x}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6999999999999999e-22 or 2.2999999999999998e-80 < z

    1. Initial program 80.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative80.5%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified80.5%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 57.8%

      \[\leadsto \color{blue}{\frac{x}{1 + x}} \]
    6. Step-by-step derivation
      1. +-commutative57.8%

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified57.8%

      \[\leadsto \color{blue}{\frac{x}{x + 1}} \]

    if -1.6999999999999999e-22 < z < 2.2999999999999998e-80

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.8%

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

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

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y}{t - \frac{x}{z}}}}{x + 1} \]
    9. Taylor expanded in x around inf 63.8%

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

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

Alternative 12: 53.4% accurate, 17.0× speedup?

\[\begin{array}{l} \\ 1 \end{array} \]
(FPCore (x y z t) :precision binary64 1.0)
double code(double x, double y, double z, double t) {
	return 1.0;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = 1.0d0
end function
public static double code(double x, double y, double z, double t) {
	return 1.0;
}
def code(x, y, z, t):
	return 1.0
function code(x, y, z, t)
	return 1.0
end
function tmp = code(x, y, z, t)
	tmp = 1.0;
end
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}

\\
1
\end{array}
Derivation
  1. Initial program 88.3%

    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
  2. Step-by-step derivation
    1. *-commutative88.3%

      \[\leadsto \frac{x + \frac{y \cdot z - x}{\color{blue}{z \cdot t} - x}}{x + 1} \]
  3. Simplified88.3%

    \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 88.3%

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

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

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

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

    \[\leadsto \frac{x + \color{blue}{\frac{y}{t - \frac{x}{z}}}}{x + 1} \]
  9. Taylor expanded in x around inf 54.5%

    \[\leadsto \color{blue}{1} \]
  10. Final simplification54.5%

    \[\leadsto 1 \]
  11. Add Preprocessing

Developer target: 99.4% accurate, 0.8× speedup?

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

\\
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
\end{array}

Reproduce

?
herbie shell --seed 2024085 
(FPCore (x y z t)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"
  :precision binary64

  :alt
  (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))

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