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

Percentage Accurate: 88.9% → 97.1%
Time: 12.3s
Alternatives: 10
Speedup: 0.4×

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: 97.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+278}:\\
\;\;\;\;\frac{x + \frac{\frac{1}{z}}{t - \frac{x}{z}} \cdot \left(y \cdot z - x\right)}{x + 1}\\

\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.00000000000000003e139

    1. Initial program 77.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-+.f6477.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. Simplified77.0%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, \left(\frac{x}{y \cdot \left(t \cdot z - x\right)} - \frac{z}{t \cdot z - x}\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(y, \mathsf{\_.f64}\left(\left(\frac{x}{y \cdot \left(t \cdot z - x\right)}\right), \left(\frac{z}{t \cdot z - x}\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      6. associate-/r*N/A

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

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

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

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

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

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

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

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

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

    if -1.00000000000000003e139 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.99999999999999993e278

    1. Initial program 98.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-+.f6498.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. Simplified98.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 inf

      \[\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(z \cdot \left(t + -1 \cdot \frac{x}{z}\right)\right)}\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
    6. Step-by-step derivation
      1. *-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(z, \left(t + -1 \cdot \frac{x}{z}\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      2. 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), \mathsf{*.f64}\left(z, \left(t + \left(\mathsf{neg}\left(\frac{x}{z}\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      3. unsub-negN/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(z, \left(t - \frac{x}{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(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(t, \left(\frac{x}{z}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      5. /-lowering-/.f6498.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(z, \mathsf{\_.f64}\left(t, \mathsf{/.f64}\left(x, z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
    7. Simplified98.9%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(\frac{1}{z \cdot \left(t - \frac{x}{z}\right)} \cdot \left(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(\left(\frac{1}{z \cdot \left(t - \frac{x}{z}\right)}\right), \left(x - y \cdot z\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      4. associate-/r*N/A

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

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

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

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

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

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

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

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

    1. Initial program 13.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-+.f6413.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. Simplified13.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 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-+.f6487.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. Simplified87.7%

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

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

Alternative 2: 94.6% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 96.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-+.f6496.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. Simplified96.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 inf

      \[\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(z \cdot \left(t + -1 \cdot \frac{x}{z}\right)\right)}\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
    6. Step-by-step derivation
      1. *-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(z, \left(t + -1 \cdot \frac{x}{z}\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      2. 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), \mathsf{*.f64}\left(z, \left(t + \left(\mathsf{neg}\left(\frac{x}{z}\right)\right)\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      3. unsub-negN/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(z, \left(t - \frac{x}{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(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(t, \left(\frac{x}{z}\right)\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      5. /-lowering-/.f6496.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(z, \mathsf{\_.f64}\left(t, \mathsf{/.f64}\left(x, z\right)\right)\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
    7. Simplified96.9%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(\frac{1}{z \cdot \left(t - \frac{x}{z}\right)} \cdot \left(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(\left(\frac{1}{z \cdot \left(t - \frac{x}{z}\right)}\right), \left(x - y \cdot z\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
      4. associate-/r*N/A

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

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

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

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

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

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

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

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

    1. Initial program 13.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-+.f6413.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. Simplified13.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 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-+.f6487.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. Simplified87.7%

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

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

Alternative 3: 94.6% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 96.9%

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

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

    1. Initial program 13.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-+.f6413.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. Simplified13.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 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-+.f6487.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. Simplified87.7%

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

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

Alternative 4: 76.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+168}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-126}:\\ \;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+19}:\\ \;\;\;\;\frac{1 + \left(x - y \cdot \frac{z}{x}\right)}{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.7e+168)
     t_1
     (if (<= z 3.5e-126)
       (/ (+ x (/ x (- x (* z t)))) (+ x 1.0))
       (if (<= z 6e+19) (/ (+ 1.0 (- x (* y (/ z 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 <= -1.7e+168) {
		tmp = t_1;
	} else if (z <= 3.5e-126) {
		tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
	} else if (z <= 6e+19) {
		tmp = (1.0 + (x - (y * (z / 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 <= (-1.7d+168)) then
        tmp = t_1
    else if (z <= 3.5d-126) then
        tmp = (x + (x / (x - (z * t)))) / (x + 1.0d0)
    else if (z <= 6d+19) then
        tmp = (1.0d0 + (x - (y * (z / 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 <= -1.7e+168) {
		tmp = t_1;
	} else if (z <= 3.5e-126) {
		tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
	} else if (z <= 6e+19) {
		tmp = (1.0 + (x - (y * (z / 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 <= -1.7e+168:
		tmp = t_1
	elif z <= 3.5e-126:
		tmp = (x + (x / (x - (z * t)))) / (x + 1.0)
	elif z <= 6e+19:
		tmp = (1.0 + (x - (y * (z / 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 <= -1.7e+168)
		tmp = t_1;
	elseif (z <= 3.5e-126)
		tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0));
	elseif (z <= 6e+19)
		tmp = Float64(Float64(1.0 + Float64(x - Float64(y * Float64(z / 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 <= -1.7e+168)
		tmp = t_1;
	elseif (z <= 3.5e-126)
		tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
	elseif (z <= 6e+19)
		tmp = (1.0 + (x - (y * (z / 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, -1.7e+168], t$95$1, If[LessEqual[z, 3.5e-126], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+19], N[(N[(1.0 + N[(x - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $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 -1.7 \cdot 10^{+168}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.70000000000000001e168 or 6e19 < z

    1. Initial program 76.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-+.f6476.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. Simplified76.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-+.f6491.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. Simplified91.3%

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

    if -1.70000000000000001e168 < z < 3.5e-126

    1. Initial program 96.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-+.f6496.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. Simplified96.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 \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, t\right), x\right)\right)\right), \mathsf{+.f64}\left(x, 1\right)\right) \]
    6. Step-by-step derivation
      1. Simplified85.3%

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

      if 3.5e-126 < z < 6e19

      1. Initial program 99.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-+.f6499.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. Simplified99.6%

        \[\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-+.f6476.2%

          \[\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. Simplified76.2%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+168}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-126}:\\ \;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+19}:\\ \;\;\;\;\frac{1 + \left(x - y \cdot \frac{z}{x}\right)}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 5: 82.3% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{if}\;t \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-15}:\\ \;\;\;\;\frac{1 + \left(x - y \cdot \frac{z}{x}\right)}{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 (<= t -3.4e-91)
         t_1
         (if (<= t 2.75e-15) (/ (+ 1.0 (- x (* y (/ z 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 (t <= -3.4e-91) {
    		tmp = t_1;
    	} else if (t <= 2.75e-15) {
    		tmp = (1.0 + (x - (y * (z / 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 (t <= (-3.4d-91)) then
            tmp = t_1
        else if (t <= 2.75d-15) then
            tmp = (1.0d0 + (x - (y * (z / 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 (t <= -3.4e-91) {
    		tmp = t_1;
    	} else if (t <= 2.75e-15) {
    		tmp = (1.0 + (x - (y * (z / 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 t <= -3.4e-91:
    		tmp = t_1
    	elif t <= 2.75e-15:
    		tmp = (1.0 + (x - (y * (z / 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 (t <= -3.4e-91)
    		tmp = t_1;
    	elseif (t <= 2.75e-15)
    		tmp = Float64(Float64(1.0 + Float64(x - Float64(y * Float64(z / 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 (t <= -3.4e-91)
    		tmp = t_1;
    	elseif (t <= 2.75e-15)
    		tmp = (1.0 + (x - (y * (z / 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[t, -3.4e-91], t$95$1, If[LessEqual[t, 2.75e-15], N[(N[(1.0 + N[(x - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $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}\;t \leq -3.4 \cdot 10^{-91}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 2.75 \cdot 10^{-15}:\\
    \;\;\;\;\frac{1 + \left(x - y \cdot \frac{z}{x}\right)}{x + 1}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -3.40000000000000027e-91 or 2.7500000000000001e-15 < t

      1. Initial program 84.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-+.f6484.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. Simplified84.6%

        \[\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-+.f6488.2%

          \[\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. Simplified88.2%

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

      if -3.40000000000000027e-91 < t < 2.7500000000000001e-15

      1. Initial program 95.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-+.f6495.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. Simplified95.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 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-+.f6479.8%

          \[\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. Simplified79.8%

        \[\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.7%

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

    Alternative 6: 79.9% accurate, 0.9× speedup?

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

      1. Initial program 89.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-+.f6489.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. Simplified89.0%

        \[\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. Simplified89.9%

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

        if -3.90000000000000004e-13 < x < 3.3500000000000001e-12

        1. Initial program 89.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-+.f6489.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. Simplified89.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 \mathsf{/.f64}\left(\color{blue}{\left(x + -1 \cdot \frac{-1 \cdot y - -1 \cdot \frac{x}{z}}{t}\right)}, \mathsf{+.f64}\left(x, 1\right)\right) \]
        6. Step-by-step derivation
          1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.9 \cdot 10^{-13}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 3.35 \cdot 10^{-12}:\\ \;\;\;\;x + \frac{y - \frac{x}{z}}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
        12. Add Preprocessing

        Alternative 7: 77.1% accurate, 0.9× speedup?

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

          1. Initial program 91.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-+.f6491.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. Simplified91.1%

            \[\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. Simplified95.5%

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

            if -1.29999999999999998e-14 < x < 3.14999999999999981e72

            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 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-+.f6465.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. Simplified65.3%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{-14}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 3.15 \cdot 10^{+72}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
          9. Add Preprocessing

          Alternative 8: 67.8% accurate, 0.9× speedup?

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

            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 inf

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

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

              if -1.19999999999999998e-23 < x < -3.29999999999999986e-99

              1. Initial program 95.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-+.f6495.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. Simplified95.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-+.f6456.9%

                  \[\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. Simplified56.9%

                \[\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. Simplified56.9%

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

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

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

                  if -3.29999999999999986e-99 < x < 1.19999999999999996e-49

                  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 0

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

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

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

                Alternative 9: 77.3% accurate, 1.1× speedup?

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

                  1. Initial program 89.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-+.f6489.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. Simplified89.1%

                    \[\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. Simplified89.3%

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

                    if -1.55000000000000006e-22 < x < 3.4e-8

                    1. Initial program 89.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-+.f6489.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. Simplified89.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-+.f6464.6%

                        \[\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. Simplified64.6%

                      \[\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. Simplified64.4%

                        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
                      2. Step-by-step derivation
                        1. /-rgt-identityN/A

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

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), x\right) \]
                      3. Applied egg-rr64.4%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.55 \cdot 10^{-22}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-8}:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
                    12. Add Preprocessing

                    Alternative 10: 52.9% 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 89.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-+.f6489.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. Simplified89.1%

                      \[\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. Simplified55.9%

                        \[\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 2024161 
                      (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)))