Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1

Percentage Accurate: 96.9% → 96.9%
Time: 9.8s
Alternatives: 14
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x - y}{z - y} \cdot t \end{array} \]
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
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 - y)) * t
end function
public static double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t):
	return ((x - y) / (z - y)) * t
function code(x, y, z, t)
	return Float64(Float64(Float64(x - y) / Float64(z - y)) * t)
end
function tmp = code(x, y, z, t)
	tmp = ((x - y) / (z - y)) * t;
end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}

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

\[\begin{array}{l} \\ \frac{x - y}{z - y} \cdot t \end{array} \]
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
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 - y)) * t
end function
public static double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t):
	return ((x - y) / (z - y)) * t
function code(x, y, z, t)
	return Float64(Float64(Float64(x - y) / Float64(z - y)) * t)
end
function tmp = code(x, y, z, t)
	tmp = ((x - y) / (z - y)) * t;
end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 96.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x - y}{z - y} \cdot t \end{array} \]
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
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 - y)) * t
end function
public static double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t):
	return ((x - y) / (z - y)) * t
function code(x, y, z, t)
	return Float64(Float64(Float64(x - y) / Float64(z - y)) * t)
end
function tmp = code(x, y, z, t)
	tmp = ((x - y) / (z - y)) * t;
end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}

\\
\frac{x - y}{z - y} \cdot t
\end{array}
Derivation
  1. Initial program 96.3%

    \[\frac{x - y}{z - y} \cdot t \]
  2. Add Preprocessing
  3. Final simplification96.3%

    \[\leadsto \frac{x - y}{z - y} \cdot t \]
  4. Add Preprocessing

Alternative 2: 66.4% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -1.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -25000:\\
\;\;\;\;t\\

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

\mathbf{elif}\;y \leq 0.002:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.6000000000000003e144 or -1.8e17 < y < -25000 or 1.2000000000000001e50 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/71.2%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 73.3%

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

    if -4.6000000000000003e144 < y < -1.8e17 or 2e-3 < y < 1.2000000000000001e50

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 63.6%

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

    if -25000 < y < -1.2999999999999999e-55

    1. Initial program 99.5%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/92.2%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 67.6%

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

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

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

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

    if -1.2999999999999999e-55 < y < 2e-3

    1. Initial program 92.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.7%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.5%

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

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr94.6%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative77.9%

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    9. Simplified83.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq -25000:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-55}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 0.002:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+50}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 65.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z - y}\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{+121}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-22}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 11000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+64}:\\ \;\;\;\;\frac{t}{\frac{-y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t (- z y)))))
   (if (<= y -4.8e+121)
     t
     (if (<= y -2.1e+15)
       t_1
       (if (<= y -2.8e-22)
         t
         (if (<= y 11000000.0)
           t_1
           (if (<= y 3.1e+43)
             (* t (/ y (- z)))
             (if (<= y 1.2e+64) (/ t (/ (- y) x)) t))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / (z - y));
	double tmp;
	if (y <= -4.8e+121) {
		tmp = t;
	} else if (y <= -2.1e+15) {
		tmp = t_1;
	} else if (y <= -2.8e-22) {
		tmp = t;
	} else if (y <= 11000000.0) {
		tmp = t_1;
	} else if (y <= 3.1e+43) {
		tmp = t * (y / -z);
	} else if (y <= 1.2e+64) {
		tmp = t / (-y / x);
	} else {
		tmp = t;
	}
	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 * (t / (z - y))
    if (y <= (-4.8d+121)) then
        tmp = t
    else if (y <= (-2.1d+15)) then
        tmp = t_1
    else if (y <= (-2.8d-22)) then
        tmp = t
    else if (y <= 11000000.0d0) then
        tmp = t_1
    else if (y <= 3.1d+43) then
        tmp = t * (y / -z)
    else if (y <= 1.2d+64) then
        tmp = t / (-y / x)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t / (z - y));
	double tmp;
	if (y <= -4.8e+121) {
		tmp = t;
	} else if (y <= -2.1e+15) {
		tmp = t_1;
	} else if (y <= -2.8e-22) {
		tmp = t;
	} else if (y <= 11000000.0) {
		tmp = t_1;
	} else if (y <= 3.1e+43) {
		tmp = t * (y / -z);
	} else if (y <= 1.2e+64) {
		tmp = t / (-y / x);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / (z - y))
	tmp = 0
	if y <= -4.8e+121:
		tmp = t
	elif y <= -2.1e+15:
		tmp = t_1
	elif y <= -2.8e-22:
		tmp = t
	elif y <= 11000000.0:
		tmp = t_1
	elif y <= 3.1e+43:
		tmp = t * (y / -z)
	elif y <= 1.2e+64:
		tmp = t / (-y / x)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / Float64(z - y)))
	tmp = 0.0
	if (y <= -4.8e+121)
		tmp = t;
	elseif (y <= -2.1e+15)
		tmp = t_1;
	elseif (y <= -2.8e-22)
		tmp = t;
	elseif (y <= 11000000.0)
		tmp = t_1;
	elseif (y <= 3.1e+43)
		tmp = Float64(t * Float64(y / Float64(-z)));
	elseif (y <= 1.2e+64)
		tmp = Float64(t / Float64(Float64(-y) / x));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / (z - y));
	tmp = 0.0;
	if (y <= -4.8e+121)
		tmp = t;
	elseif (y <= -2.1e+15)
		tmp = t_1;
	elseif (y <= -2.8e-22)
		tmp = t;
	elseif (y <= 11000000.0)
		tmp = t_1;
	elseif (y <= 3.1e+43)
		tmp = t * (y / -z);
	elseif (y <= 1.2e+64)
		tmp = t / (-y / x);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+121], t, If[LessEqual[y, -2.1e+15], t$95$1, If[LessEqual[y, -2.8e-22], t, If[LessEqual[y, 11000000.0], t$95$1, If[LessEqual[y, 3.1e+43], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+64], N[(t / N[((-y) / x), $MachinePrecision]), $MachinePrecision], t]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z - y}\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+121}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -2.1 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.8e121 or -2.1e15 < y < -2.79999999999999995e-22 or 1.2e64 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/70.8%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 72.3%

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

    if -4.8e121 < y < -2.1e15 or -2.79999999999999995e-22 < y < 1.1e7

    1. Initial program 94.2%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.6%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified94.6%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num93.1%

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

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr93.3%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative72.5%

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

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

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

    if 1.1e7 < y < 3.1000000000000002e43

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/90.8%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 64.5%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg56.3%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
      3. distribute-rgt-neg-in65.2%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{z}\right)} \]
      4. distribute-frac-neg265.2%

        \[\leadsto t \cdot \color{blue}{\frac{y}{-z}} \]
    10. Simplified65.2%

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

    if 3.1000000000000002e43 < y < 1.2e64

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/99.7%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.7%

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

        \[\leadsto \color{blue}{\frac{x - y}{z - y} \cdot t} \]
      3. *-commutative99.7%

        \[\leadsto \color{blue}{t \cdot \frac{x - y}{z - y}} \]
      4. clear-num99.7%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv100.0%

        \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    6. Applied egg-rr100.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{y}{x}}} \]
    9. Step-by-step derivation
      1. neg-mul-166.9%

        \[\leadsto \frac{t}{\color{blue}{-\frac{y}{x}}} \]
      2. distribute-neg-frac66.9%

        \[\leadsto \frac{t}{\color{blue}{\frac{-y}{x}}} \]
    10. Simplified66.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+121}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{+15}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-22}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 11000000:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+64}:\\ \;\;\;\;\frac{t}{\frac{-y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 65.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;y \leq -1.95 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-22}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 0.00185:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

\mathbf{elif}\;y \leq 4.2 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.9999999999999999e144 or -1.95e17 < y < -2.6e-22 or 2.4000000000000002e65 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/69.7%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified72.9%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 74.7%

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

    if -4.9999999999999999e144 < y < -1.95e17 or 0.0018500000000000001 < y < 4.20000000000000003e43

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/89.0%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified87.0%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 57.4%

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

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

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

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

    if -2.6e-22 < y < 0.0018500000000000001

    1. Initial program 93.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.9%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.9%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - y}{t}}} \]
      2. un-div-inv95.0%

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr95.0%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative75.8%

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    9. Simplified81.4%

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

    if 4.20000000000000003e43 < y < 2.4000000000000002e65

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/99.7%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.7%

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

        \[\leadsto \color{blue}{\frac{x - y}{z - y} \cdot t} \]
      3. *-commutative99.7%

        \[\leadsto \color{blue}{t \cdot \frac{x - y}{z - y}} \]
      4. clear-num99.7%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv100.0%

        \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    6. Applied egg-rr100.0%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{y}{x}}} \]
    9. Step-by-step derivation
      1. neg-mul-166.9%

        \[\leadsto \frac{t}{\color{blue}{-\frac{y}{x}}} \]
      2. distribute-neg-frac66.9%

        \[\leadsto \frac{t}{\color{blue}{\frac{-y}{x}}} \]
    10. Simplified66.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+144}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{+17}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-22}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 0.00185:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+43}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+65}:\\ \;\;\;\;\frac{t}{\frac{-y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 70.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := t - x \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-23}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 0.0022:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.50000000000000022e144 or -1.2e62 < y < -3.49999999999999993e-23 or 6.40000000000000029e43 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/73.1%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified76.4%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x - y\right)\right)}{y}} \]
      2. mul-1-neg63.0%

        \[\leadsto \frac{\color{blue}{-t \cdot \left(x - y\right)}}{y} \]
      3. distribute-lft-neg-out63.0%

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot \left(x - y\right)}}{y} \]
      4. *-commutative63.0%

        \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot \left(-t\right)}}{y} \]
    7. Simplified63.0%

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    9. Step-by-step derivation
      1. mul-1-neg77.7%

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
    10. Simplified77.7%

      \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
    11. Step-by-step derivation
      1. *-commutative77.7%

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

        \[\leadsto t - \color{blue}{x \cdot \frac{t}{y}} \]
    12. Applied egg-rr82.9%

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

    if -5.50000000000000022e144 < y < -1.2e62 or 0.00220000000000000013 < y < 6.40000000000000029e43

    1. Initial program 99.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 74.5%

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

    if -3.49999999999999993e-23 < y < 0.00220000000000000013

    1. Initial program 93.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.8%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.9%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - y}{t}}} \]
      2. un-div-inv95.0%

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr95.0%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative76.1%

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    9. Simplified81.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+144}:\\ \;\;\;\;t - x \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-23}:\\ \;\;\;\;t - x \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 0.0022:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{t}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 71.8% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.4 \cdot 10^{-25}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 0.00165:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.6000000000000003e144 or -1.2e62 < y < -2.40000000000000009e-25 or 9.4999999999999996e41 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/73.1%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified76.4%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x - y\right)\right)}{y}} \]
      2. mul-1-neg63.0%

        \[\leadsto \frac{\color{blue}{-t \cdot \left(x - y\right)}}{y} \]
      3. distribute-lft-neg-out63.0%

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot \left(x - y\right)}}{y} \]
      4. *-commutative63.0%

        \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot \left(-t\right)}}{y} \]
    7. Simplified63.0%

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    9. Step-by-step derivation
      1. mul-1-neg77.7%

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
    10. Simplified77.7%

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
      2. *-commutative87.8%

        \[\leadsto t - \color{blue}{\frac{x}{y} \cdot t} \]
    12. Applied egg-rr87.8%

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

    if -4.6000000000000003e144 < y < -1.2e62 or 0.00165 < y < 9.4999999999999996e41

    1. Initial program 99.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 74.5%

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

    if -2.40000000000000009e-25 < y < 0.00165

    1. Initial program 93.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.8%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.9%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - y}{t}}} \]
      2. un-div-inv95.0%

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr95.0%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative76.1%

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    9. Simplified81.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-25}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq 0.00165:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 71.8% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z}{x - y}}\\
t_2 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -5.2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.02 \cdot 10^{-26}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 0.00165:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.6000000000000003e144 or -5.19999999999999945e61 < y < -1.02e-26 or 3.1000000000000002e42 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/73.1%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified76.4%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x - y\right)\right)}{y}} \]
      2. mul-1-neg63.0%

        \[\leadsto \frac{\color{blue}{-t \cdot \left(x - y\right)}}{y} \]
      3. distribute-lft-neg-out63.0%

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot \left(x - y\right)}}{y} \]
      4. *-commutative63.0%

        \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot \left(-t\right)}}{y} \]
    7. Simplified63.0%

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    9. Step-by-step derivation
      1. mul-1-neg77.7%

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
    10. Simplified77.7%

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
      2. *-commutative87.8%

        \[\leadsto t - \color{blue}{\frac{x}{y} \cdot t} \]
    12. Applied egg-rr87.8%

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

    if -4.6000000000000003e144 < y < -5.19999999999999945e61 or 0.00165 < y < 3.1000000000000002e42

    1. Initial program 99.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/92.1%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/92.1%

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

        \[\leadsto \color{blue}{\frac{x - y}{z - y} \cdot t} \]
      3. *-commutative99.6%

        \[\leadsto \color{blue}{t \cdot \frac{x - y}{z - y}} \]
      4. clear-num99.3%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv99.6%

        \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    6. Applied egg-rr99.6%

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

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

    if -1.02e-26 < y < 0.00165

    1. Initial program 93.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.8%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.9%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - y}{t}}} \]
      2. un-div-inv95.0%

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr95.0%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative76.1%

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    9. Simplified81.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{+61}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-26}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq 0.00165:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+42}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 71.6% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -1.5 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 0.00176:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

\mathbf{elif}\;y \leq 5.4 \cdot 10^{+45}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.6000000000000003e144 or -1.2e62 < y < -1.50000000000000001e-23 or 5.39999999999999968e45 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/73.1%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified76.4%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x - y\right)\right)}{y}} \]
      2. mul-1-neg63.0%

        \[\leadsto \frac{\color{blue}{-t \cdot \left(x - y\right)}}{y} \]
      3. distribute-lft-neg-out63.0%

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot \left(x - y\right)}}{y} \]
      4. *-commutative63.0%

        \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot \left(-t\right)}}{y} \]
    7. Simplified63.0%

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    9. Step-by-step derivation
      1. mul-1-neg77.7%

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
    10. Simplified77.7%

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
      2. *-commutative87.8%

        \[\leadsto t - \color{blue}{\frac{x}{y} \cdot t} \]
    12. Applied egg-rr87.8%

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

    if -4.6000000000000003e144 < y < -1.2e62

    1. Initial program 99.4%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/99.8%

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

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

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

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

    if -1.50000000000000001e-23 < y < 0.00176000000000000006

    1. Initial program 93.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.8%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.9%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - y}{t}}} \]
      2. un-div-inv95.0%

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr95.0%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative76.1%

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    9. Simplified81.7%

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

    if 0.00176000000000000006 < y < 5.39999999999999968e45

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.5%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/88.5%

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

        \[\leadsto \color{blue}{\frac{x - y}{z - y} \cdot t} \]
      3. *-commutative99.7%

        \[\leadsto \color{blue}{t \cdot \frac{x - y}{z - y}} \]
      4. clear-num99.5%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv99.7%

        \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    6. Applied egg-rr99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-23}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq 0.00176:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+45}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 71.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -2.2 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 8200000:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

\mathbf{elif}\;y \leq 2.55 \cdot 10^{+48}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.7000000000000002e144 or -1.95000000000000011e59 < y < -2.20000000000000002e-24 or 2.5499999999999999e48 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/73.1%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified76.4%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x - y\right)\right)}{y}} \]
      2. mul-1-neg63.0%

        \[\leadsto \frac{\color{blue}{-t \cdot \left(x - y\right)}}{y} \]
      3. distribute-lft-neg-out63.0%

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot \left(x - y\right)}}{y} \]
      4. *-commutative63.0%

        \[\leadsto \frac{\color{blue}{\left(x - y\right) \cdot \left(-t\right)}}{y} \]
    7. Simplified63.0%

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    9. Step-by-step derivation
      1. mul-1-neg77.7%

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
    10. Simplified77.7%

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
      2. *-commutative87.8%

        \[\leadsto t - \color{blue}{\frac{x}{y} \cdot t} \]
    12. Applied egg-rr87.8%

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

    if -4.7000000000000002e144 < y < -1.95000000000000011e59

    1. Initial program 99.4%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/99.8%

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

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

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

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

    if -2.20000000000000002e-24 < y < 8.2e6

    1. Initial program 93.5%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.6%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.9%

        \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - y}{t}}} \]
      2. un-div-inv95.1%

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr95.1%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative74.9%

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

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

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

    if 8.2e6 < y < 2.5499999999999999e48

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/90.8%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{z - y} \cdot y} \]
      3. distribute-rgt-neg-out82.4%

        \[\leadsto \color{blue}{\frac{t}{z - y} \cdot \left(-y\right)} \]
    7. Simplified82.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+144}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{+59}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-24}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq 8200000:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{+48}:\\ \;\;\;\;y \cdot \frac{t}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 67.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+121}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-22}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{+65}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.75e+121)
   t
   (if (<= y -1.5e+18)
     (* t (/ x (- z y)))
     (if (<= y -2.8e-22) t (if (<= y 2.55e+65) (* x (/ t (- z y))) t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.75e+121) {
		tmp = t;
	} else if (y <= -1.5e+18) {
		tmp = t * (x / (z - y));
	} else if (y <= -2.8e-22) {
		tmp = t;
	} else if (y <= 2.55e+65) {
		tmp = x * (t / (z - y));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-1.75d+121)) then
        tmp = t
    else if (y <= (-1.5d+18)) then
        tmp = t * (x / (z - y))
    else if (y <= (-2.8d-22)) then
        tmp = t
    else if (y <= 2.55d+65) then
        tmp = x * (t / (z - y))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.75e+121) {
		tmp = t;
	} else if (y <= -1.5e+18) {
		tmp = t * (x / (z - y));
	} else if (y <= -2.8e-22) {
		tmp = t;
	} else if (y <= 2.55e+65) {
		tmp = x * (t / (z - y));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.75e+121:
		tmp = t
	elif y <= -1.5e+18:
		tmp = t * (x / (z - y))
	elif y <= -2.8e-22:
		tmp = t
	elif y <= 2.55e+65:
		tmp = x * (t / (z - y))
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.75e+121)
		tmp = t;
	elseif (y <= -1.5e+18)
		tmp = Float64(t * Float64(x / Float64(z - y)));
	elseif (y <= -2.8e-22)
		tmp = t;
	elseif (y <= 2.55e+65)
		tmp = Float64(x * Float64(t / Float64(z - y)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.75e+121)
		tmp = t;
	elseif (y <= -1.5e+18)
		tmp = t * (x / (z - y));
	elseif (y <= -2.8e-22)
		tmp = t;
	elseif (y <= 2.55e+65)
		tmp = x * (t / (z - y));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.75e+121], t, If[LessEqual[y, -1.5e+18], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-22], t, If[LessEqual[y, 2.55e+65], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+121}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -1.5 \cdot 10^{+18}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\

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

\mathbf{elif}\;y \leq 2.55 \cdot 10^{+65}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.75e121 or -1.5e18 < y < -2.79999999999999995e-22 or 2.54999999999999994e65 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/70.8%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 72.3%

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

    if -1.75e121 < y < -1.5e18

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 64.2%

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

    if -2.79999999999999995e-22 < y < 2.54999999999999994e65

    1. Initial program 94.2%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/89.2%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.2%

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

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    6. Applied egg-rr94.4%

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - y}} \]
    8. Step-by-step derivation
      1. *-commutative71.3%

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    9. Simplified75.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+121}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-22}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{+65}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-28}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 0.35:\\
\;\;\;\;x \cdot \frac{t}{z}\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+50}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.49999999999999925e-28 or 1.6999999999999999e50 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/75.2%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified76.4%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 62.1%

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

    if -8.49999999999999925e-28 < y < 0.34999999999999998

    1. Initial program 93.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.2%

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

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

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

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

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

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

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

    if 0.34999999999999998 < y < 1.6999999999999999e50

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/93.7%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified90.6%

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 63.7%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg52.0%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y}{-z}} \]
    10. Simplified58.1%

      \[\leadsto \color{blue}{t \cdot \frac{y}{-z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-28}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 0.35:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+50}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 89.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+192} \lor \neg \left(y \leq 6 \cdot 10^{+114}\right):\\
\;\;\;\;t - t \cdot \frac{x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9e192 or 6.0000000000000001e114 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/67.8%

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified68.9%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x - y\right)\right)}{y}} \]
      2. mul-1-neg64.6%

        \[\leadsto \frac{\color{blue}{-t \cdot \left(x - y\right)}}{y} \]
      3. distribute-lft-neg-out64.6%

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot \left(x - y\right)}}{y} \]
      4. *-commutative64.6%

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    9. Step-by-step derivation
      1. mul-1-neg81.9%

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
    10. Simplified81.9%

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
      2. *-commutative95.0%

        \[\leadsto t - \color{blue}{\frac{x}{y} \cdot t} \]
    12. Applied egg-rr95.0%

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

    if -9e192 < y < 6.0000000000000001e114

    1. Initial program 95.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/87.9%

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

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

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

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

Alternative 13: 59.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-27}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 21000000000:\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.5000000000000001e-27 or 2.1e10 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/76.3%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 59.2%

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

    if -1.5000000000000001e-27 < y < 2.1e10

    1. Initial program 93.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/88.8%

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z}} \]
    7. Simplified67.7%

      \[\leadsto \color{blue}{x \cdot \frac{t}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{-27}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 21000000000:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 34.9% accurate, 9.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
	return t;
}
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 = t
end function
public static double code(double x, double y, double z, double t) {
	return t;
}
def code(x, y, z, t):
	return t
function code(x, y, z, t)
	return t
end
function tmp = code(x, y, z, t)
	tmp = t;
end
code[x_, y_, z_, t_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 96.3%

    \[\frac{x - y}{z - y} \cdot t \]
  2. Step-by-step derivation
    1. associate-*l/83.3%

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
  3. Simplified87.8%

    \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
  4. Add Preprocessing
  5. Taylor expanded in y around inf 31.5%

    \[\leadsto \color{blue}{t} \]
  6. Final simplification31.5%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 96.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{t}{\frac{z - y}{x - y}} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
	return t / ((z - y) / (x - y));
}
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 = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
	return t / ((z - y) / (x - y));
}
def code(x, y, z, t):
	return t / ((z - y) / (x - y))
function code(x, y, z, t)
	return Float64(t / Float64(Float64(z - y) / Float64(x - y)))
end
function tmp = code(x, y, z, t)
	tmp = t / ((z - y) / (x - y));
end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}

Reproduce

?
herbie shell --seed 2024066 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

  :alt
  (/ t (/ (- z y) (- x y)))

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