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

Percentage Accurate: 88.9% → 96.2%
Time: 13.2s
Alternatives: 10
Speedup: 0.3×

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 10 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 88.9% 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: 96.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+284}:\\ \;\;\;\;\frac{y}{\left(x + 1\right) \cdot \frac{t\_1}{z}}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+248}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
   (if (<= t_2 -1e+284)
     (/ y (* (+ x 1.0) (/ t_1 z)))
     (if (<= t_2 2e+248) t_2 (/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	double tmp;
	if (t_2 <= -1e+284) {
		tmp = y / ((x + 1.0) * (t_1 / z));
	} else if (t_2 <= 2e+248) {
		tmp = t_2;
	} else {
		tmp = (x + (y / 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z * t) - x
    t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0d0)
    if (t_2 <= (-1d+284)) then
        tmp = y / ((x + 1.0d0) * (t_1 / z))
    else if (t_2 <= 2d+248) then
        tmp = t_2
    else
        tmp = (x + (y / t)) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	double tmp;
	if (t_2 <= -1e+284) {
		tmp = y / ((x + 1.0) * (t_1 / z));
	} else if (t_2 <= 2e+248) {
		tmp = t_2;
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * t) - x
	t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0)
	tmp = 0
	if t_2 <= -1e+284:
		tmp = y / ((x + 1.0) * (t_1 / z))
	elif t_2 <= 2e+248:
		tmp = t_2
	else:
		tmp = (x + (y / t)) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0))
	tmp = 0.0
	if (t_2 <= -1e+284)
		tmp = Float64(y / Float64(Float64(x + 1.0) * Float64(t_1 / z)));
	elseif (t_2 <= 2e+248)
		tmp = t_2;
	else
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z * t) - x;
	t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	tmp = 0.0;
	if (t_2 <= -1e+284)
		tmp = y / ((x + 1.0) * (t_1 / z));
	elseif (t_2 <= 2e+248)
		tmp = t_2;
	else
		tmp = (x + (y / t)) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+284], N[(y / N[(N[(x + 1.0), $MachinePrecision] * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+248], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+248}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.00000000000000008e284

    1. Initial program 31.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
      16. +-lowering-+.f6431.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified31.4%

      \[\leadsto \color{blue}{\frac{x - \frac{x - y \cdot z}{z \cdot t - x}}{x + 1}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right), \mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      7. *-lowering-*.f6431.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right), \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
    6. Applied egg-rr31.4%

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{\left(1 + x\right) \cdot \left(t \cdot z - x\right)}} \]
    8. Step-by-step derivation
      1. times-fracN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, 1\right)\right), \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(\left(t \cdot z\right), \color{blue}{x}\right)\right)\right) \]
      8. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{+.f64}\left(x, 1\right)\right), \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right) \]
    9. Simplified88.8%

      \[\leadsto \color{blue}{\frac{y}{x + 1} \cdot \frac{z}{z \cdot t - x}} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{z}{z \cdot t - x} \cdot \color{blue}{\frac{y}{x + 1}} \]
      2. clear-numN/A

        \[\leadsto \frac{1}{\frac{z \cdot t - x}{z}} \cdot \frac{\color{blue}{y}}{x + 1} \]
      3. frac-timesN/A

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

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

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

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

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

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

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

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

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

    if -1.00000000000000008e284 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000009e248

    1. Initial program 99.0%

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

    if 2.00000000000000009e248 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

    1. Initial program 26.1%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified26.1%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(1 + x\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(x + \color{blue}{1}\right)\right) \]
      6. +-lowering-+.f6491.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    7. Simplified91.0%

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

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

Alternative 2: 79.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;z \leq -9 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.99999999999999987e-111 or 5.2999999999999998e-79 < z

    1. Initial program 82.3%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
      16. +-lowering-+.f6482.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified82.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(1 + x\right)\right) \]
      5. +-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    7. Simplified84.3%

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

    if -8.99999999999999987e-111 < z < 5.2999999999999998e-79

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified99.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{-111}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-79}:\\ \;\;\;\;\frac{x - \frac{y \cdot z - x}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 79.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.01999999999999996e-112 or 1.55000000000000009e-78 < z

    1. Initial program 82.3%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
      16. +-lowering-+.f6482.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified82.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(1 + x\right)\right) \]
      5. +-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    7. Simplified84.3%

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

    if -1.01999999999999996e-112 < z < 1.55000000000000009e-78

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified99.9%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{\_.f64}\left(x, \left(\frac{y \cdot z}{x}\right)\right)\right), \left(1 + x\right)\right) \]
      6. associate-/l*N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, x\right)\right)\right)\right), \left(x + \color{blue}{1}\right)\right) \]
      10. +-lowering-+.f6485.0%

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

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

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

Alternative 4: 76.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{-80}:\\
\;\;\;\;z \cdot \frac{t - y}{x} + 1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e-118 or 7.2e-80 < z

    1. Initial program 82.3%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
      16. +-lowering-+.f6482.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified82.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(1 + x\right)\right) \]
      5. +-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    7. Simplified84.3%

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

    if -4.5e-118 < z < 7.2e-80

    1. Initial program 99.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified99.9%

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

      \[\leadsto \color{blue}{1 + z \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 + x\right)} + \frac{t}{x \cdot \left(1 + x\right)}\right)} \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(x, \left(1 + x\right)\right)\right), \left(\frac{y}{x \cdot \left(1 + x\right)}\right)\right)\right)\right) \]
      9. +-commutativeN/A

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

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

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

        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(1 + x\right)}\right)\right)\right)\right)\right) \]
      13. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \left(x + \color{blue}{1}\right)\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f6478.4%

        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, 1\right)\right)\right), \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right)\right)\right)\right)\right) \]
    7. Simplified78.4%

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

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

        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{/.f64}\left(\left(t - y\right), \color{blue}{x}\right)\right)\right) \]
      2. --lowering--.f6475.2%

        \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, y\right), x\right)\right)\right) \]
    10. Simplified75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{-118}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-80}:\\ \;\;\;\;z \cdot \frac{t - y}{x} + 1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{-6}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 1.65 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.60000000000000009e-6 or 1.65e-20 < x

    1. Initial program 86.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      5. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
      6. sub0-negN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
    3. Simplified86.9%

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

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

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

      if -2.60000000000000009e-6 < x < 1.65e-20

      1. Initial program 89.8%

        \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
      2. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
        3. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
        4. neg-sub0N/A

          \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
        5. associate-+l-N/A

          \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
        6. sub0-negN/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
        16. +-lowering-+.f6489.8%

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(1 + x\right)\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(x + \color{blue}{1}\right)\right) \]
        6. +-lowering-+.f6472.3%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
      7. Simplified72.3%

        \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
      8. Taylor expanded in x around 0

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \color{blue}{1}\right) \]
      9. Step-by-step derivation
        1. Simplified71.8%

          \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
      10. Recombined 2 regimes into one program.
      11. Final simplification78.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{-6}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
      12. Add Preprocessing

      Alternative 6: 68.3% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-64}:\\ \;\;\;\;\frac{1}{\frac{1}{x} + 1}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-84}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (<= x -2.2e-64)
         (/ 1.0 (+ (/ 1.0 x) 1.0))
         (if (<= x 4e-84) (/ y t) (/ x (+ x 1.0)))))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (x <= -2.2e-64) {
      		tmp = 1.0 / ((1.0 / x) + 1.0);
      	} else if (x <= 4e-84) {
      		tmp = y / t;
      	} 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 <= (-2.2d-64)) then
              tmp = 1.0d0 / ((1.0d0 / x) + 1.0d0)
          else if (x <= 4d-84) then
              tmp = y / t
          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 <= -2.2e-64) {
      		tmp = 1.0 / ((1.0 / x) + 1.0);
      	} else if (x <= 4e-84) {
      		tmp = y / t;
      	} else {
      		tmp = x / (x + 1.0);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	tmp = 0
      	if x <= -2.2e-64:
      		tmp = 1.0 / ((1.0 / x) + 1.0)
      	elif x <= 4e-84:
      		tmp = y / t
      	else:
      		tmp = x / (x + 1.0)
      	return tmp
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (x <= -2.2e-64)
      		tmp = Float64(1.0 / Float64(Float64(1.0 / x) + 1.0));
      	elseif (x <= 4e-84)
      		tmp = Float64(y / t);
      	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 <= -2.2e-64)
      		tmp = 1.0 / ((1.0 / x) + 1.0);
      	elseif (x <= 4e-84)
      		tmp = y / t;
      	else
      		tmp = x / (x + 1.0);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := If[LessEqual[x, -2.2e-64], N[(1.0 / N[(N[(1.0 / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e-84], N[(y / t), $MachinePrecision], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -2.2 \cdot 10^{-64}:\\
      \;\;\;\;\frac{1}{\frac{1}{x} + 1}\\
      
      \mathbf{elif}\;x \leq 4 \cdot 10^{-84}:\\
      \;\;\;\;\frac{y}{t}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{x + 1}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -2.2e-64

        1. Initial program 84.0%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Step-by-step derivation
          1. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          3. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          4. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          5. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          6. sub0-negN/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
        3. Simplified84.0%

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(1 + x\right)\right) \]
          5. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(x + \color{blue}{1}\right)\right) \]
          6. +-lowering-+.f6469.7%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
        7. Simplified69.7%

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{x}\right)}\right)\right)\right) \]
          3. /-lowering-/.f6469.7%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{x}\right)\right)\right)\right) \]
        10. Simplified69.7%

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

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{x}\right)}\right)\right) \]
          3. /-lowering-/.f6475.1%

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{x}\right)\right)\right) \]
        13. Simplified75.1%

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

        if -2.2e-64 < x < 4.0000000000000001e-84

        1. Initial program 89.5%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Step-by-step derivation
          1. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          3. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          4. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          5. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          6. sub0-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
          16. +-lowering-+.f6489.5%

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

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

          \[\leadsto \color{blue}{\frac{y}{t}} \]
        6. Step-by-step derivation
          1. /-lowering-/.f6457.1%

            \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{t}\right) \]
        7. Simplified57.1%

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

        if 4.0000000000000001e-84 < x

        1. Initial program 90.3%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Step-by-step derivation
          1. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          3. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          4. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          5. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          6. sub0-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
          16. +-lowering-+.f6490.3%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
        3. Simplified90.3%

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

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

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + x\right)}\right) \]
          2. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(x + \color{blue}{1}\right)\right) \]
          3. +-lowering-+.f6477.4%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
        7. Simplified77.4%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{-64}:\\ \;\;\;\;\frac{1}{\frac{1}{x} + 1}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-84}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{x + 1}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 7: 68.4% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{x + 1}\\ \mathbf{if}\;x \leq -4.7 \cdot 10^{-64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-82}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (/ x (+ x 1.0))))
         (if (<= x -4.7e-64) t_1 (if (<= x 7e-82) (/ y t) t_1))))
      double code(double x, double y, double z, double t) {
      	double t_1 = x / (x + 1.0);
      	double tmp;
      	if (x <= -4.7e-64) {
      		tmp = t_1;
      	} else if (x <= 7e-82) {
      		tmp = y / t;
      	} else {
      		tmp = t_1;
      	}
      	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) :: t_1
          real(8) :: tmp
          t_1 = x / (x + 1.0d0)
          if (x <= (-4.7d-64)) then
              tmp = t_1
          else if (x <= 7d-82) then
              tmp = y / t
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double t_1 = x / (x + 1.0);
      	double tmp;
      	if (x <= -4.7e-64) {
      		tmp = t_1;
      	} else if (x <= 7e-82) {
      		tmp = y / t;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = x / (x + 1.0)
      	tmp = 0
      	if x <= -4.7e-64:
      		tmp = t_1
      	elif x <= 7e-82:
      		tmp = y / t
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(x / Float64(x + 1.0))
      	tmp = 0.0
      	if (x <= -4.7e-64)
      		tmp = t_1;
      	elseif (x <= 7e-82)
      		tmp = Float64(y / t);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = x / (x + 1.0);
      	tmp = 0.0;
      	if (x <= -4.7e-64)
      		tmp = t_1;
      	elseif (x <= 7e-82)
      		tmp = y / t;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.7e-64], t$95$1, If[LessEqual[x, 7e-82], N[(y / t), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{x}{x + 1}\\
      \mathbf{if}\;x \leq -4.7 \cdot 10^{-64}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;x \leq 7 \cdot 10^{-82}:\\
      \;\;\;\;\frac{y}{t}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -4.6999999999999998e-64 or 6.9999999999999997e-82 < x

        1. Initial program 87.5%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Step-by-step derivation
          1. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          3. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          4. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          5. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          6. sub0-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
          16. +-lowering-+.f6487.5%

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

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

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

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + x\right)}\right) \]
          2. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(x, \left(x + \color{blue}{1}\right)\right) \]
          3. +-lowering-+.f6476.4%

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
        7. Simplified76.4%

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

        if -4.6999999999999998e-64 < x < 6.9999999999999997e-82

        1. Initial program 89.5%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Step-by-step derivation
          1. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          3. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          4. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          5. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          6. sub0-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
          16. +-lowering-+.f6489.5%

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

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

          \[\leadsto \color{blue}{\frac{y}{t}} \]
        6. Step-by-step derivation
          1. /-lowering-/.f6457.1%

            \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{t}\right) \]
        7. Simplified57.1%

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

      Alternative 8: 67.4% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{-32}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{-78}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (<= x -4.8e-32) 1.0 (if (<= x 1.12e-78) (/ y t) 1.0)))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (x <= -4.8e-32) {
      		tmp = 1.0;
      	} else if (x <= 1.12e-78) {
      		tmp = y / t;
      	} 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 (x <= (-4.8d-32)) then
              tmp = 1.0d0
          else if (x <= 1.12d-78) then
              tmp = y / t
          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 (x <= -4.8e-32) {
      		tmp = 1.0;
      	} else if (x <= 1.12e-78) {
      		tmp = y / t;
      	} else {
      		tmp = 1.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	tmp = 0
      	if x <= -4.8e-32:
      		tmp = 1.0
      	elif x <= 1.12e-78:
      		tmp = y / t
      	else:
      		tmp = 1.0
      	return tmp
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (x <= -4.8e-32)
      		tmp = 1.0;
      	elseif (x <= 1.12e-78)
      		tmp = Float64(y / t);
      	else
      		tmp = 1.0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	tmp = 0.0;
      	if (x <= -4.8e-32)
      		tmp = 1.0;
      	elseif (x <= 1.12e-78)
      		tmp = y / t;
      	else
      		tmp = 1.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := If[LessEqual[x, -4.8e-32], 1.0, If[LessEqual[x, 1.12e-78], N[(y / t), $MachinePrecision], 1.0]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -4.8 \cdot 10^{-32}:\\
      \;\;\;\;1\\
      
      \mathbf{elif}\;x \leq 1.12 \cdot 10^{-78}:\\
      \;\;\;\;\frac{y}{t}\\
      
      \mathbf{else}:\\
      \;\;\;\;1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -4.8000000000000003e-32 or 1.12000000000000005e-78 < x

        1. Initial program 87.6%

          \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
        2. Step-by-step derivation
          1. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          3. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          4. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          5. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
          6. sub0-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
          16. +-lowering-+.f6487.6%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
        3. Simplified87.6%

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

          \[\leadsto \color{blue}{1} \]
        6. Step-by-step derivation
          1. Simplified77.3%

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

          if -4.8000000000000003e-32 < x < 1.12000000000000005e-78

          1. Initial program 89.2%

            \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
          2. Step-by-step derivation
            1. /-lowering-/.f64N/A

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

              \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
            3. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
            4. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
            5. associate-+l-N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
            6. sub0-negN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
            16. +-lowering-+.f6489.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
          3. Simplified89.2%

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

            \[\leadsto \color{blue}{\frac{y}{t}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f6455.8%

              \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{t}\right) \]
          7. Simplified55.8%

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

        Alternative 9: 56.8% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{-29}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-67}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= x -1.35e-29) 1.0 (if (<= x 1.6e-67) x 1.0)))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (x <= -1.35e-29) {
        		tmp = 1.0;
        	} else if (x <= 1.6e-67) {
        		tmp = x;
        	} 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 (x <= (-1.35d-29)) then
                tmp = 1.0d0
            else if (x <= 1.6d-67) then
                tmp = x
            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 (x <= -1.35e-29) {
        		tmp = 1.0;
        	} else if (x <= 1.6e-67) {
        		tmp = x;
        	} else {
        		tmp = 1.0;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if x <= -1.35e-29:
        		tmp = 1.0
        	elif x <= 1.6e-67:
        		tmp = x
        	else:
        		tmp = 1.0
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (x <= -1.35e-29)
        		tmp = 1.0;
        	elseif (x <= 1.6e-67)
        		tmp = x;
        	else
        		tmp = 1.0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (x <= -1.35e-29)
        		tmp = 1.0;
        	elseif (x <= 1.6e-67)
        		tmp = x;
        	else
        		tmp = 1.0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[x, -1.35e-29], 1.0, If[LessEqual[x, 1.6e-67], x, 1.0]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -1.35 \cdot 10^{-29}:\\
        \;\;\;\;1\\
        
        \mathbf{elif}\;x \leq 1.6 \cdot 10^{-67}:\\
        \;\;\;\;x\\
        
        \mathbf{else}:\\
        \;\;\;\;1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -1.35000000000000011e-29 or 1.60000000000000011e-67 < x

          1. Initial program 87.4%

            \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
          2. Step-by-step derivation
            1. /-lowering-/.f64N/A

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

              \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
            3. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
            4. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
            5. associate-+l-N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
            6. sub0-negN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
            16. +-lowering-+.f6487.4%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
          3. Simplified87.4%

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

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

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

            if -1.35000000000000011e-29 < x < 1.60000000000000011e-67

            1. Initial program 89.5%

              \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

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

                \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
              4. neg-sub0N/A

                \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
              5. associate-+l-N/A

                \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
              6. sub0-negN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
              16. +-lowering-+.f6489.5%

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(1 + x\right)\right) \]
              5. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \left(x + \color{blue}{1}\right)\right) \]
              6. +-lowering-+.f6475.5%

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{x}\right)}\right)\right)\right) \]
              3. /-lowering-/.f6475.3%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{x}\right)\right)\right)\right) \]
            10. Simplified75.3%

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

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

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

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{1}{x}\right)}\right)\right) \]
              3. /-lowering-/.f6424.3%

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \color{blue}{x}\right)\right)\right) \]
            13. Simplified24.3%

              \[\leadsto \color{blue}{\frac{1}{1 + \frac{1}{x}}} \]
            14. Taylor expanded in x around 0

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

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

            Alternative 10: 54.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.2%

              \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

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

                \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{y \cdot z + \left(\mathsf{neg}\left(x\right)\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
              3. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(\mathsf{neg}\left(x\right)\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
              4. neg-sub0N/A

                \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{\left(0 - x\right) + y \cdot z}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
              5. associate-+l-N/A

                \[\leadsto \mathsf{/.f64}\left(\left(x + \frac{0 - \left(x - y \cdot z\right)}{t \cdot z - x}\right), \left(x + 1\right)\right) \]
              6. sub0-negN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \left(x + 1\right)\right) \]
              16. +-lowering-+.f6488.2%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, \color{blue}{1}\right)\right) \]
            3. Simplified88.2%

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

              \[\leadsto \color{blue}{1} \]
            6. Step-by-step derivation
              1. Simplified51.5%

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

              Developer Target 1: 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 2024163 
              (FPCore (x y z t)
                :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"
                :precision binary64
              
                :alt
                (! :herbie-platform default (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1)))
              
                (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))