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

Percentage Accurate: 97.0% → 97.4%
Time: 11.3s
Alternatives: 15
Speedup: 0.5×

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 15 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: 97.0% 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: 97.4% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 x y) (-.f64 z y)) < -9.99999999999999995e88

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

    if -9.99999999999999995e88 < (/.f64 (-.f64 x y) (-.f64 z y))

    1. Initial program 98.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x - y}{z - y} \leq -1 \cdot 10^{+89}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{z - y} \cdot t\\ \end{array} \]

Alternative 2: 64.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z - y}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+14} \lor \neg \left(y \leq 4.2 \cdot 10^{+87}\right) \land y \leq 2.15 \cdot 10^{+126}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t (- z y)))))
   (if (<= y -3.8e+171)
     t
     (if (<= y -1.7e+79)
       t_1
       (if (<= y -4.5e+55)
         t
         (if (<= y -6.2e-25)
           (* t (/ x z))
           (if (<= y -9e-29)
             t
             (if (or (<= y 6e+14) (and (not (<= y 4.2e+87)) (<= y 2.15e+126)))
               t_1
               t))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / (z - y));
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t;
	} else if (y <= -1.7e+79) {
		tmp = t_1;
	} else if (y <= -4.5e+55) {
		tmp = t;
	} else if (y <= -6.2e-25) {
		tmp = t * (x / z);
	} else if (y <= -9e-29) {
		tmp = t;
	} else if ((y <= 6e+14) || (!(y <= 4.2e+87) && (y <= 2.15e+126))) {
		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 = x * (t / (z - y))
    if (y <= (-3.8d+171)) then
        tmp = t
    else if (y <= (-1.7d+79)) then
        tmp = t_1
    else if (y <= (-4.5d+55)) then
        tmp = t
    else if (y <= (-6.2d-25)) then
        tmp = t * (x / z)
    else if (y <= (-9d-29)) then
        tmp = t
    else if ((y <= 6d+14) .or. (.not. (y <= 4.2d+87)) .and. (y <= 2.15d+126)) 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 = x * (t / (z - y));
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t;
	} else if (y <= -1.7e+79) {
		tmp = t_1;
	} else if (y <= -4.5e+55) {
		tmp = t;
	} else if (y <= -6.2e-25) {
		tmp = t * (x / z);
	} else if (y <= -9e-29) {
		tmp = t;
	} else if ((y <= 6e+14) || (!(y <= 4.2e+87) && (y <= 2.15e+126))) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / (z - y))
	tmp = 0
	if y <= -3.8e+171:
		tmp = t
	elif y <= -1.7e+79:
		tmp = t_1
	elif y <= -4.5e+55:
		tmp = t
	elif y <= -6.2e-25:
		tmp = t * (x / z)
	elif y <= -9e-29:
		tmp = t
	elif (y <= 6e+14) or (not (y <= 4.2e+87) and (y <= 2.15e+126)):
		tmp = t_1
	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 <= -3.8e+171)
		tmp = t;
	elseif (y <= -1.7e+79)
		tmp = t_1;
	elseif (y <= -4.5e+55)
		tmp = t;
	elseif (y <= -6.2e-25)
		tmp = Float64(t * Float64(x / z));
	elseif (y <= -9e-29)
		tmp = t;
	elseif ((y <= 6e+14) || (!(y <= 4.2e+87) && (y <= 2.15e+126)))
		tmp = t_1;
	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 <= -3.8e+171)
		tmp = t;
	elseif (y <= -1.7e+79)
		tmp = t_1;
	elseif (y <= -4.5e+55)
		tmp = t;
	elseif (y <= -6.2e-25)
		tmp = t * (x / z);
	elseif (y <= -9e-29)
		tmp = t;
	elseif ((y <= 6e+14) || (~((y <= 4.2e+87)) && (y <= 2.15e+126)))
		tmp = t_1;
	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, -3.8e+171], t, If[LessEqual[y, -1.7e+79], t$95$1, If[LessEqual[y, -4.5e+55], t, If[LessEqual[y, -6.2e-25], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-29], t, If[Or[LessEqual[y, 6e+14], And[N[Not[LessEqual[y, 4.2e+87]], $MachinePrecision], LessEqual[y, 2.15e+126]]], t$95$1, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.7 \cdot 10^{+79}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4.5 \cdot 10^{+55}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -6.2 \cdot 10^{-25}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

\mathbf{elif}\;y \leq -9 \cdot 10^{-29}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 6 \cdot 10^{+14} \lor \neg \left(y \leq 4.2 \cdot 10^{+87}\right) \land y \leq 2.15 \cdot 10^{+126}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.8000000000000002e171 or -1.70000000000000016e79 < y < -4.49999999999999998e55 or -6.19999999999999989e-25 < y < -8.9999999999999996e-29 or 6e14 < y < 4.2e87 or 2.1500000000000001e126 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.8000000000000002e171 < y < -1.70000000000000016e79 or -8.9999999999999996e-29 < y < 6e14 or 4.2e87 < y < 2.1500000000000001e126

    1. Initial program 93.4%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot t}{z - y}} \]
      2. associate-*r/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. Taylor expanded in x around inf 71.9%

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

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

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

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

    if -4.49999999999999998e55 < y < -6.19999999999999989e-25

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 46.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{+79}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+14} \lor \neg \left(y \leq 4.2 \cdot 10^{+87}\right) \land y \leq 2.15 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 3: 58.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{-x}{y}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-30}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 28000:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ (- x) y))))
   (if (<= y -3.8e+171)
     t
     (if (<= y -5.1e+73)
       t_1
       (if (<= y -1.75e+55)
         t
         (if (<= y -6.8e-25)
           (* t (/ x z))
           (if (<= y -3.6e-30)
             t
             (if (<= y -4.1e-70)
               t_1
               (if (<= y 28000.0) (/ x (/ z t)) t)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (-x / y);
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t;
	} else if (y <= -5.1e+73) {
		tmp = t_1;
	} else if (y <= -1.75e+55) {
		tmp = t;
	} else if (y <= -6.8e-25) {
		tmp = t * (x / z);
	} else if (y <= -3.6e-30) {
		tmp = t;
	} else if (y <= -4.1e-70) {
		tmp = t_1;
	} else if (y <= 28000.0) {
		tmp = x / (z / t);
	} 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)
    if (y <= (-3.8d+171)) then
        tmp = t
    else if (y <= (-5.1d+73)) then
        tmp = t_1
    else if (y <= (-1.75d+55)) then
        tmp = t
    else if (y <= (-6.8d-25)) then
        tmp = t * (x / z)
    else if (y <= (-3.6d-30)) then
        tmp = t
    else if (y <= (-4.1d-70)) then
        tmp = t_1
    else if (y <= 28000.0d0) then
        tmp = x / (z / t)
    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);
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t;
	} else if (y <= -5.1e+73) {
		tmp = t_1;
	} else if (y <= -1.75e+55) {
		tmp = t;
	} else if (y <= -6.8e-25) {
		tmp = t * (x / z);
	} else if (y <= -3.6e-30) {
		tmp = t;
	} else if (y <= -4.1e-70) {
		tmp = t_1;
	} else if (y <= 28000.0) {
		tmp = x / (z / t);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (-x / y)
	tmp = 0
	if y <= -3.8e+171:
		tmp = t
	elif y <= -5.1e+73:
		tmp = t_1
	elif y <= -1.75e+55:
		tmp = t
	elif y <= -6.8e-25:
		tmp = t * (x / z)
	elif y <= -3.6e-30:
		tmp = t
	elif y <= -4.1e-70:
		tmp = t_1
	elif y <= 28000.0:
		tmp = x / (z / t)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(Float64(-x) / y))
	tmp = 0.0
	if (y <= -3.8e+171)
		tmp = t;
	elseif (y <= -5.1e+73)
		tmp = t_1;
	elseif (y <= -1.75e+55)
		tmp = t;
	elseif (y <= -6.8e-25)
		tmp = Float64(t * Float64(x / z));
	elseif (y <= -3.6e-30)
		tmp = t;
	elseif (y <= -4.1e-70)
		tmp = t_1;
	elseif (y <= 28000.0)
		tmp = Float64(x / Float64(z / t));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (-x / y);
	tmp = 0.0;
	if (y <= -3.8e+171)
		tmp = t;
	elseif (y <= -5.1e+73)
		tmp = t_1;
	elseif (y <= -1.75e+55)
		tmp = t;
	elseif (y <= -6.8e-25)
		tmp = t * (x / z);
	elseif (y <= -3.6e-30)
		tmp = t;
	elseif (y <= -4.1e-70)
		tmp = t_1;
	elseif (y <= 28000.0)
		tmp = x / (z / t);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+171], t, If[LessEqual[y, -5.1e+73], t$95$1, If[LessEqual[y, -1.75e+55], t, If[LessEqual[y, -6.8e-25], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.6e-30], t, If[LessEqual[y, -4.1e-70], t$95$1, If[LessEqual[y, 28000.0], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], t]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5.1 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.75 \cdot 10^{+55}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -6.8 \cdot 10^{-25}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-30}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -4.1 \cdot 10^{-70}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.8000000000000002e171 or -5.10000000000000024e73 < y < -1.75000000000000005e55 or -6.80000000000000003e-25 < y < -3.6000000000000003e-30 or 28000 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.8000000000000002e171 < y < -5.10000000000000024e73 or -3.6000000000000003e-30 < y < -4.09999999999999977e-70

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    6. Simplified66.0%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot t}{y}} \]
      2. neg-mul-158.6%

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

      \[\leadsto x \cdot \color{blue}{\frac{-t}{y}} \]
    10. Taylor expanded in x around 0 50.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    11. Step-by-step derivation
      1. mul-1-neg50.0%

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

        \[\leadsto -\color{blue}{t \cdot \frac{x}{y}} \]
      3. distribute-rgt-neg-in61.5%

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

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

    if -1.75000000000000005e55 < y < -6.80000000000000003e-25

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 46.3%

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

    if -4.09999999999999977e-70 < y < 28000

    1. Initial program 91.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 66.7%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    4. Applied egg-rr69.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{+73}:\\ \;\;\;\;t \cdot \frac{-x}{y}\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-30}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-70}:\\ \;\;\;\;t \cdot \frac{-x}{y}\\ \mathbf{elif}\;y \leq 28000:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 58.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{-x}{y}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{+139}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.3 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{-29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.8:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ (- x) y))))
   (if (<= y -3.8e+171)
     t
     (if (<= y -4.7e+139)
       t_1
       (if (<= y -4.3e+41)
         (* t (/ (- y) z))
         (if (<= y -6e-25)
           (* t (/ x z))
           (if (<= y -8.8e-29)
             t
             (if (<= y -1e-69) t_1 (if (<= y 2.8) (/ x (/ z t)) t)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (-x / y);
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t;
	} else if (y <= -4.7e+139) {
		tmp = t_1;
	} else if (y <= -4.3e+41) {
		tmp = t * (-y / z);
	} else if (y <= -6e-25) {
		tmp = t * (x / z);
	} else if (y <= -8.8e-29) {
		tmp = t;
	} else if (y <= -1e-69) {
		tmp = t_1;
	} else if (y <= 2.8) {
		tmp = x / (z / t);
	} 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)
    if (y <= (-3.8d+171)) then
        tmp = t
    else if (y <= (-4.7d+139)) then
        tmp = t_1
    else if (y <= (-4.3d+41)) then
        tmp = t * (-y / z)
    else if (y <= (-6d-25)) then
        tmp = t * (x / z)
    else if (y <= (-8.8d-29)) then
        tmp = t
    else if (y <= (-1d-69)) then
        tmp = t_1
    else if (y <= 2.8d0) then
        tmp = x / (z / t)
    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);
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t;
	} else if (y <= -4.7e+139) {
		tmp = t_1;
	} else if (y <= -4.3e+41) {
		tmp = t * (-y / z);
	} else if (y <= -6e-25) {
		tmp = t * (x / z);
	} else if (y <= -8.8e-29) {
		tmp = t;
	} else if (y <= -1e-69) {
		tmp = t_1;
	} else if (y <= 2.8) {
		tmp = x / (z / t);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (-x / y)
	tmp = 0
	if y <= -3.8e+171:
		tmp = t
	elif y <= -4.7e+139:
		tmp = t_1
	elif y <= -4.3e+41:
		tmp = t * (-y / z)
	elif y <= -6e-25:
		tmp = t * (x / z)
	elif y <= -8.8e-29:
		tmp = t
	elif y <= -1e-69:
		tmp = t_1
	elif y <= 2.8:
		tmp = x / (z / t)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(Float64(-x) / y))
	tmp = 0.0
	if (y <= -3.8e+171)
		tmp = t;
	elseif (y <= -4.7e+139)
		tmp = t_1;
	elseif (y <= -4.3e+41)
		tmp = Float64(t * Float64(Float64(-y) / z));
	elseif (y <= -6e-25)
		tmp = Float64(t * Float64(x / z));
	elseif (y <= -8.8e-29)
		tmp = t;
	elseif (y <= -1e-69)
		tmp = t_1;
	elseif (y <= 2.8)
		tmp = Float64(x / Float64(z / t));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (-x / y);
	tmp = 0.0;
	if (y <= -3.8e+171)
		tmp = t;
	elseif (y <= -4.7e+139)
		tmp = t_1;
	elseif (y <= -4.3e+41)
		tmp = t * (-y / z);
	elseif (y <= -6e-25)
		tmp = t * (x / z);
	elseif (y <= -8.8e-29)
		tmp = t;
	elseif (y <= -1e-69)
		tmp = t_1;
	elseif (y <= 2.8)
		tmp = x / (z / t);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+171], t, If[LessEqual[y, -4.7e+139], t$95$1, If[LessEqual[y, -4.3e+41], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6e-25], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.8e-29], t, If[LessEqual[y, -1e-69], t$95$1, If[LessEqual[y, 2.8], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], t]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.7 \cdot 10^{+139}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -6 \cdot 10^{-25}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

\mathbf{elif}\;y \leq -8.8 \cdot 10^{-29}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -1 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.8000000000000002e171 or -5.9999999999999995e-25 < y < -8.79999999999999961e-29 or 2.7999999999999998 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.8000000000000002e171 < y < -4.7000000000000001e139 or -8.79999999999999961e-29 < y < -9.9999999999999996e-70

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{z - y} \cdot x} \]
      2. *-commutative75.5%

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot t}{y}} \]
      2. neg-mul-173.4%

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

      \[\leadsto x \cdot \color{blue}{\frac{-t}{y}} \]
    10. Taylor expanded in x around 0 64.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    11. Step-by-step derivation
      1. mul-1-neg64.5%

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

        \[\leadsto -\color{blue}{t \cdot \frac{x}{y}} \]
      3. distribute-rgt-neg-in78.0%

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

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

    if -4.7000000000000001e139 < y < -4.30000000000000024e41

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in x around 0 66.2%

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{z - y}} \cdot t \]
    5. Taylor expanded in y around 0 42.8%

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

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

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

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

    if -4.30000000000000024e41 < y < -5.9999999999999995e-25

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 48.4%

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

    if -9.9999999999999996e-70 < y < 2.7999999999999998

    1. Initial program 91.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 66.7%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    4. Applied egg-rr69.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{+139}:\\ \;\;\;\;t \cdot \frac{-x}{y}\\ \mathbf{elif}\;y \leq -4.3 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{-29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-69}:\\ \;\;\;\;t \cdot \frac{-x}{y}\\ \mathbf{elif}\;y \leq 2.8:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 58.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{-x}{y}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{+141}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{+41}:\\ \;\;\;\;\frac{t}{\frac{-z}{y}}\\ \mathbf{elif}\;y \leq -6.3 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-35}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 0.01:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ (- x) y))))
   (if (<= y -3.8e+171)
     t
     (if (<= y -2.65e+141)
       t_1
       (if (<= y -2.65e+41)
         (/ t (/ (- z) y))
         (if (<= y -6.3e-25)
           (* t (/ x z))
           (if (<= y -8e-35)
             t
             (if (<= y -1.7e-70) t_1 (if (<= y 0.01) (/ x (/ z t)) t)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (-x / y);
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t;
	} else if (y <= -2.65e+141) {
		tmp = t_1;
	} else if (y <= -2.65e+41) {
		tmp = t / (-z / y);
	} else if (y <= -6.3e-25) {
		tmp = t * (x / z);
	} else if (y <= -8e-35) {
		tmp = t;
	} else if (y <= -1.7e-70) {
		tmp = t_1;
	} else if (y <= 0.01) {
		tmp = x / (z / t);
	} 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)
    if (y <= (-3.8d+171)) then
        tmp = t
    else if (y <= (-2.65d+141)) then
        tmp = t_1
    else if (y <= (-2.65d+41)) then
        tmp = t / (-z / y)
    else if (y <= (-6.3d-25)) then
        tmp = t * (x / z)
    else if (y <= (-8d-35)) then
        tmp = t
    else if (y <= (-1.7d-70)) then
        tmp = t_1
    else if (y <= 0.01d0) then
        tmp = x / (z / t)
    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);
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t;
	} else if (y <= -2.65e+141) {
		tmp = t_1;
	} else if (y <= -2.65e+41) {
		tmp = t / (-z / y);
	} else if (y <= -6.3e-25) {
		tmp = t * (x / z);
	} else if (y <= -8e-35) {
		tmp = t;
	} else if (y <= -1.7e-70) {
		tmp = t_1;
	} else if (y <= 0.01) {
		tmp = x / (z / t);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (-x / y)
	tmp = 0
	if y <= -3.8e+171:
		tmp = t
	elif y <= -2.65e+141:
		tmp = t_1
	elif y <= -2.65e+41:
		tmp = t / (-z / y)
	elif y <= -6.3e-25:
		tmp = t * (x / z)
	elif y <= -8e-35:
		tmp = t
	elif y <= -1.7e-70:
		tmp = t_1
	elif y <= 0.01:
		tmp = x / (z / t)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(Float64(-x) / y))
	tmp = 0.0
	if (y <= -3.8e+171)
		tmp = t;
	elseif (y <= -2.65e+141)
		tmp = t_1;
	elseif (y <= -2.65e+41)
		tmp = Float64(t / Float64(Float64(-z) / y));
	elseif (y <= -6.3e-25)
		tmp = Float64(t * Float64(x / z));
	elseif (y <= -8e-35)
		tmp = t;
	elseif (y <= -1.7e-70)
		tmp = t_1;
	elseif (y <= 0.01)
		tmp = Float64(x / Float64(z / t));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (-x / y);
	tmp = 0.0;
	if (y <= -3.8e+171)
		tmp = t;
	elseif (y <= -2.65e+141)
		tmp = t_1;
	elseif (y <= -2.65e+41)
		tmp = t / (-z / y);
	elseif (y <= -6.3e-25)
		tmp = t * (x / z);
	elseif (y <= -8e-35)
		tmp = t;
	elseif (y <= -1.7e-70)
		tmp = t_1;
	elseif (y <= 0.01)
		tmp = x / (z / t);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+171], t, If[LessEqual[y, -2.65e+141], t$95$1, If[LessEqual[y, -2.65e+41], N[(t / N[((-z) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.3e-25], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-35], t, If[LessEqual[y, -1.7e-70], t$95$1, If[LessEqual[y, 0.01], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], t]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.65 \cdot 10^{+141}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;y \leq -8 \cdot 10^{-35}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-70}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.8000000000000002e171 or -6.29999999999999961e-25 < y < -8.00000000000000006e-35 or 0.0100000000000000002 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.8000000000000002e171 < y < -2.65e141 or -8.00000000000000006e-35 < y < -1.69999999999999998e-70

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{z - y} \cdot x} \]
      2. *-commutative75.5%

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot t}{y}} \]
      2. neg-mul-173.4%

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

      \[\leadsto x \cdot \color{blue}{\frac{-t}{y}} \]
    10. Taylor expanded in x around 0 64.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    11. Step-by-step derivation
      1. mul-1-neg64.5%

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

        \[\leadsto -\color{blue}{t \cdot \frac{x}{y}} \]
      3. distribute-rgt-neg-in78.0%

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

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

    if -2.65e141 < y < -2.6499999999999998e41

    1. Initial program 99.7%

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z}{y}}} \]
    8. Step-by-step derivation
      1. associate-*r/42.9%

        \[\leadsto \frac{t}{\color{blue}{\frac{-1 \cdot z}{y}}} \]
      2. neg-mul-142.9%

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

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

    if -2.6499999999999998e41 < y < -6.29999999999999961e-25

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 48.4%

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

    if -1.69999999999999998e-70 < y < 0.0100000000000000002

    1. Initial program 91.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 66.7%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    4. Applied egg-rr69.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{+141}:\\ \;\;\;\;t \cdot \frac{-x}{y}\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{+41}:\\ \;\;\;\;\frac{t}{\frac{-z}{y}}\\ \mathbf{elif}\;y \leq -6.3 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-35}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-70}:\\ \;\;\;\;t \cdot \frac{-x}{y}\\ \mathbf{elif}\;y \leq 0.01:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 67.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -4.4 \cdot 10^{-63}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+82}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{+126}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.8000000000000002e171 or 6e13 < y < 8.1999999999999999e82 or 5.60000000000000018e126 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.8000000000000002e171 < y < -4.3999999999999999e-63 or 8.1999999999999999e82 < y < 5.60000000000000018e126

    1. Initial program 99.8%

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

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

    if -4.3999999999999999e-63 < y < 6e13

    1. Initial program 91.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-*r/95.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-63}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 60000000000000:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+82}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+126}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 7: 60.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -8.5 \cdot 10^{-25}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -8.4 \cdot 10^{-45}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{-228}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

\mathbf{elif}\;y \leq 30000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.39999999999999954e55 or -8.49999999999999981e-25 < y < -8.3999999999999998e-45 or 3e10 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -5.39999999999999954e55 < y < -8.49999999999999981e-25 or 4.4000000000000001e-228 < y < 3e10

    1. Initial program 95.5%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 58.5%

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

    if -8.3999999999999998e-45 < y < 4.4000000000000001e-228

    1. Initial program 90.1%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 65.2%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    4. Applied egg-rr71.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.4 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -8.4 \cdot 10^{-45}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-228}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 30000000000:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 8: 60.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -7 \cdot 10^{-63}:\\
\;\;\;\;\frac{y}{\frac{y}{t}}\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-189}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

\mathbf{elif}\;y \leq 460000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.0500000000000001e55 or 4.6e11 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -3.0500000000000001e55 < y < -1.10000000000000001e-24 or 1.45e-189 < y < 4.6e11

    1. Initial program 96.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 56.6%

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

    if -1.10000000000000001e-24 < y < -7.00000000000000006e-63

    1. Initial program 100.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in x around 0 27.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-y}{\frac{z - y}{t}}} \]
      3. add-sqr-sqrt36.1%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{\frac{z - y}{t}} \]
      4. sqrt-unprod36.2%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{\frac{z - y}{t}} \]
      5. sqr-neg36.2%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{\frac{z - y}{t}} \]
      6. sqrt-unprod0.0%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\frac{z - y}{t}} \]
      7. add-sqr-sqrt3.6%

        \[\leadsto \frac{\color{blue}{y}}{\frac{z - y}{t}} \]
      8. frac-2neg3.6%

        \[\leadsto \color{blue}{\frac{-y}{-\frac{z - y}{t}}} \]
      9. add-sqr-sqrt3.6%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{-\frac{z - y}{t}} \]
      10. sqrt-unprod3.6%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{-\frac{z - y}{t}} \]
      11. sqr-neg3.6%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{-\frac{z - y}{t}} \]
      12. sqrt-unprod0.0%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{-\frac{z - y}{t}} \]
      13. add-sqr-sqrt36.2%

        \[\leadsto \frac{\color{blue}{y}}{-\frac{z - y}{t}} \]
      14. distribute-neg-frac36.2%

        \[\leadsto \frac{y}{\color{blue}{\frac{-\left(z - y\right)}{t}}} \]
      15. sub-neg36.2%

        \[\leadsto \frac{y}{\frac{-\color{blue}{\left(z + \left(-y\right)\right)}}{t}} \]
      16. distribute-neg-in36.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{\left(-z\right) + \left(-\left(-y\right)\right)}}{t}} \]
      17. remove-double-neg36.2%

        \[\leadsto \frac{y}{\frac{\left(-z\right) + \color{blue}{y}}{t}} \]
    6. Applied egg-rr36.2%

      \[\leadsto \color{blue}{\frac{y}{\frac{\left(-z\right) + y}{t}}} \]
    7. Taylor expanded in z around 0 36.2%

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

    if -7.00000000000000006e-63 < y < 1.45e-189

    1. Initial program 89.1%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 69.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    4. Applied egg-rr74.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.05 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-24}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-63}:\\ \;\;\;\;\frac{y}{\frac{y}{t}}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-189}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 460000000000:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 9: 72.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{y - z}\\ \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{+81}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-31} \lor \neg \left(y \leq 820\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ y (- y z)))))
   (if (<= y -3.8e+171)
     t_1
     (if (<= y -7.6e+81)
       (* t (/ x (- z y)))
       (if (or (<= y -1.15e-31) (not (<= y 820.0)))
         t_1
         (* x (/ t (- z y))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (y / (y - z));
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t_1;
	} else if (y <= -7.6e+81) {
		tmp = t * (x / (z - y));
	} else if ((y <= -1.15e-31) || !(y <= 820.0)) {
		tmp = t_1;
	} else {
		tmp = x * (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) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (y - z))
    if (y <= (-3.8d+171)) then
        tmp = t_1
    else if (y <= (-7.6d+81)) then
        tmp = t * (x / (z - y))
    else if ((y <= (-1.15d-31)) .or. (.not. (y <= 820.0d0))) then
        tmp = t_1
    else
        tmp = x * (t / (z - y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * (y / (y - z));
	double tmp;
	if (y <= -3.8e+171) {
		tmp = t_1;
	} else if (y <= -7.6e+81) {
		tmp = t * (x / (z - y));
	} else if ((y <= -1.15e-31) || !(y <= 820.0)) {
		tmp = t_1;
	} else {
		tmp = x * (t / (z - y));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (y / (y - z))
	tmp = 0
	if y <= -3.8e+171:
		tmp = t_1
	elif y <= -7.6e+81:
		tmp = t * (x / (z - y))
	elif (y <= -1.15e-31) or not (y <= 820.0):
		tmp = t_1
	else:
		tmp = x * (t / (z - y))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(y / Float64(y - z)))
	tmp = 0.0
	if (y <= -3.8e+171)
		tmp = t_1;
	elseif (y <= -7.6e+81)
		tmp = Float64(t * Float64(x / Float64(z - y)));
	elseif ((y <= -1.15e-31) || !(y <= 820.0))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(t / Float64(z - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (y / (y - z));
	tmp = 0.0;
	if (y <= -3.8e+171)
		tmp = t_1;
	elseif (y <= -7.6e+81)
		tmp = t * (x / (z - y));
	elseif ((y <= -1.15e-31) || ~((y <= 820.0)))
		tmp = t_1;
	else
		tmp = x * (t / (z - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+171], t$95$1, If[LessEqual[y, -7.6e+81], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.15e-31], N[Not[LessEqual[y, 820.0]], $MachinePrecision]], t$95$1, N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -1.15 \cdot 10^{-31} \lor \neg \left(y \leq 820\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.8000000000000002e171 or -7.599999999999999e81 < y < -1.1499999999999999e-31 or 820 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in x around 0 82.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-y}{\frac{z - y}{t}}} \]
      3. add-sqr-sqrt30.2%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{\frac{z - y}{t}} \]
      4. sqrt-unprod18.5%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{\frac{z - y}{t}} \]
      5. sqr-neg18.5%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{\frac{z - y}{t}} \]
      6. sqrt-unprod2.8%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\frac{z - y}{t}} \]
      7. add-sqr-sqrt5.0%

        \[\leadsto \frac{\color{blue}{y}}{\frac{z - y}{t}} \]
      8. frac-2neg5.0%

        \[\leadsto \color{blue}{\frac{-y}{-\frac{z - y}{t}}} \]
      9. add-sqr-sqrt2.1%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{-\frac{z - y}{t}} \]
      10. sqrt-unprod23.8%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{-\frac{z - y}{t}} \]
      11. sqr-neg23.8%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{-\frac{z - y}{t}} \]
      12. sqrt-unprod37.9%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{-\frac{z - y}{t}} \]
      13. add-sqr-sqrt68.5%

        \[\leadsto \frac{\color{blue}{y}}{-\frac{z - y}{t}} \]
      14. distribute-neg-frac68.5%

        \[\leadsto \frac{y}{\color{blue}{\frac{-\left(z - y\right)}{t}}} \]
      15. sub-neg68.5%

        \[\leadsto \frac{y}{\frac{-\color{blue}{\left(z + \left(-y\right)\right)}}{t}} \]
      16. distribute-neg-in68.5%

        \[\leadsto \frac{y}{\frac{\color{blue}{\left(-z\right) + \left(-\left(-y\right)\right)}}{t}} \]
      17. remove-double-neg68.5%

        \[\leadsto \frac{y}{\frac{\left(-z\right) + \color{blue}{y}}{t}} \]
    6. Applied egg-rr68.5%

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

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

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

        \[\leadsto \frac{y}{\color{blue}{y - z}} \cdot t \]
    8. Simplified82.4%

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

    if -3.8000000000000002e171 < y < -7.599999999999999e81

    1. Initial program 99.6%

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

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

    if -1.1499999999999999e-31 < y < 820

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+171}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{+81}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-31} \lor \neg \left(y \leq 820\right):\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \end{array} \]

Alternative 10: 74.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+138}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-35} \lor \neg \left(y \leq 10500000000000\right):\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -2.7e+138)
   (- t (* t (/ x y)))
   (if (or (<= y -2.25e-35) (not (<= y 10500000000000.0)))
     (* t (/ y (- y z)))
     (* x (/ t (- z y))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -2.7e+138) {
		tmp = t - (t * (x / y));
	} else if ((y <= -2.25e-35) || !(y <= 10500000000000.0)) {
		tmp = t * (y / (y - z));
	} else {
		tmp = x * (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 <= (-2.7d+138)) then
        tmp = t - (t * (x / y))
    else if ((y <= (-2.25d-35)) .or. (.not. (y <= 10500000000000.0d0))) then
        tmp = t * (y / (y - z))
    else
        tmp = x * (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 <= -2.7e+138) {
		tmp = t - (t * (x / y));
	} else if ((y <= -2.25e-35) || !(y <= 10500000000000.0)) {
		tmp = t * (y / (y - z));
	} else {
		tmp = x * (t / (z - y));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -2.7e+138:
		tmp = t - (t * (x / y))
	elif (y <= -2.25e-35) or not (y <= 10500000000000.0):
		tmp = t * (y / (y - z))
	else:
		tmp = x * (t / (z - y))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -2.7e+138)
		tmp = Float64(t - Float64(t * Float64(x / y)));
	elseif ((y <= -2.25e-35) || !(y <= 10500000000000.0))
		tmp = Float64(t * Float64(y / Float64(y - z)));
	else
		tmp = Float64(x * Float64(t / Float64(z - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -2.7e+138)
		tmp = t - (t * (x / y));
	elseif ((y <= -2.25e-35) || ~((y <= 10500000000000.0)))
		tmp = t * (y / (y - z));
	else
		tmp = x * (t / (z - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e+138], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.25e-35], N[Not[LessEqual[y, 10500000000000.0]], $MachinePrecision]], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+138}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\

\mathbf{elif}\;y \leq -2.25 \cdot 10^{-35} \lor \neg \left(y \leq 10500000000000\right):\\
\;\;\;\;t \cdot \frac{y}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.70000000000000009e138

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{z - y}, x, \frac{t}{z - y} \cdot \left(-y\right)\right)} \]
    5. Applied egg-rr69.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{z - y}, x, \frac{t}{z - y} \cdot \left(-y\right)\right)} \]
    6. Taylor expanded in z around 0 73.2%

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

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

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

        \[\leadsto \color{blue}{t - \frac{t}{\frac{y}{x}}} \]
      4. associate-/l*73.2%

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
    8. Simplified86.1%

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

    if -2.70000000000000009e138 < y < -2.25000000000000005e-35 or 1.05e13 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in x around 0 77.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-y}{\frac{z - y}{t}}} \]
      3. add-sqr-sqrt23.3%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{\frac{z - y}{t}} \]
      4. sqrt-unprod26.5%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{\frac{z - y}{t}} \]
      5. sqr-neg26.5%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{\frac{z - y}{t}} \]
      6. sqrt-unprod3.5%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\frac{z - y}{t}} \]
      7. add-sqr-sqrt5.4%

        \[\leadsto \frac{\color{blue}{y}}{\frac{z - y}{t}} \]
      8. frac-2neg5.4%

        \[\leadsto \color{blue}{\frac{-y}{-\frac{z - y}{t}}} \]
      9. add-sqr-sqrt1.9%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{-\frac{z - y}{t}} \]
      10. sqrt-unprod29.6%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{-\frac{z - y}{t}} \]
      11. sqr-neg29.6%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{-\frac{z - y}{t}} \]
      12. sqrt-unprod46.7%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{-\frac{z - y}{t}} \]
      13. add-sqr-sqrt70.4%

        \[\leadsto \frac{\color{blue}{y}}{-\frac{z - y}{t}} \]
      14. distribute-neg-frac70.4%

        \[\leadsto \frac{y}{\color{blue}{\frac{-\left(z - y\right)}{t}}} \]
      15. sub-neg70.4%

        \[\leadsto \frac{y}{\frac{-\color{blue}{\left(z + \left(-y\right)\right)}}{t}} \]
      16. distribute-neg-in70.4%

        \[\leadsto \frac{y}{\frac{\color{blue}{\left(-z\right) + \left(-\left(-y\right)\right)}}{t}} \]
      17. remove-double-neg70.4%

        \[\leadsto \frac{y}{\frac{\left(-z\right) + \color{blue}{y}}{t}} \]
    6. Applied egg-rr70.4%

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

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

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

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

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

    if -2.25000000000000005e-35 < y < 1.05e13

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+138}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-35} \lor \neg \left(y \leq 10500000000000\right):\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \end{array} \]

Alternative 11: 72.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+138}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-11}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 2100000000:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.45e+138)
   (- t (* t (/ x y)))
   (if (<= y -3.2e-11)
     (/ t (/ z (- x y)))
     (if (<= y 2100000000.0) (* x (/ t (- z y))) (* t (/ y (- y z)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.45e+138) {
		tmp = t - (t * (x / y));
	} else if (y <= -3.2e-11) {
		tmp = t / (z / (x - y));
	} else if (y <= 2100000000.0) {
		tmp = x * (t / (z - y));
	} else {
		tmp = t * (y / (y - z));
	}
	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.45d+138)) then
        tmp = t - (t * (x / y))
    else if (y <= (-3.2d-11)) then
        tmp = t / (z / (x - y))
    else if (y <= 2100000000.0d0) then
        tmp = x * (t / (z - y))
    else
        tmp = t * (y / (y - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.45e+138) {
		tmp = t - (t * (x / y));
	} else if (y <= -3.2e-11) {
		tmp = t / (z / (x - y));
	} else if (y <= 2100000000.0) {
		tmp = x * (t / (z - y));
	} else {
		tmp = t * (y / (y - z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.45e+138:
		tmp = t - (t * (x / y))
	elif y <= -3.2e-11:
		tmp = t / (z / (x - y))
	elif y <= 2100000000.0:
		tmp = x * (t / (z - y))
	else:
		tmp = t * (y / (y - z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.45e+138)
		tmp = Float64(t - Float64(t * Float64(x / y)));
	elseif (y <= -3.2e-11)
		tmp = Float64(t / Float64(z / Float64(x - y)));
	elseif (y <= 2100000000.0)
		tmp = Float64(x * Float64(t / Float64(z - y)));
	else
		tmp = Float64(t * Float64(y / Float64(y - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.45e+138)
		tmp = t - (t * (x / y));
	elseif (y <= -3.2e-11)
		tmp = t / (z / (x - y));
	elseif (y <= 2100000000.0)
		tmp = x * (t / (z - y));
	else
		tmp = t * (y / (y - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e+138], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.2e-11], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2100000000.0], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+138}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.45000000000000005e138

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{z - y}, x, \frac{t}{z - y} \cdot \left(-y\right)\right)} \]
    5. Applied egg-rr69.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{z - y}, x, \frac{t}{z - y} \cdot \left(-y\right)\right)} \]
    6. Taylor expanded in z around 0 73.2%

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

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

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

        \[\leadsto \color{blue}{t - \frac{t}{\frac{y}{x}}} \]
      4. associate-/l*73.2%

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
    8. Simplified86.1%

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

    if -1.45000000000000005e138 < y < -3.19999999999999994e-11

    1. Initial program 99.7%

      \[\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-*r/82.0%

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

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

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

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

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

    if -3.19999999999999994e-11 < y < 2.1e9

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

    if 2.1e9 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in x around 0 87.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-y}{\frac{z - y}{t}}} \]
      3. add-sqr-sqrt0.0%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{\frac{z - y}{t}} \]
      4. sqrt-unprod5.1%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{\frac{z - y}{t}} \]
      5. sqr-neg5.1%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{\frac{z - y}{t}} \]
      6. sqrt-unprod5.8%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\frac{z - y}{t}} \]
      7. add-sqr-sqrt5.8%

        \[\leadsto \frac{\color{blue}{y}}{\frac{z - y}{t}} \]
      8. frac-2neg5.8%

        \[\leadsto \color{blue}{\frac{-y}{-\frac{z - y}{t}}} \]
      9. add-sqr-sqrt0.0%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{-\frac{z - y}{t}} \]
      10. sqrt-unprod46.0%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{-\frac{z - y}{t}} \]
      11. sqr-neg46.0%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{-\frac{z - y}{t}} \]
      12. sqrt-unprod77.8%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{-\frac{z - y}{t}} \]
      13. add-sqr-sqrt78.3%

        \[\leadsto \frac{\color{blue}{y}}{-\frac{z - y}{t}} \]
      14. distribute-neg-frac78.3%

        \[\leadsto \frac{y}{\color{blue}{\frac{-\left(z - y\right)}{t}}} \]
      15. sub-neg78.3%

        \[\leadsto \frac{y}{\frac{-\color{blue}{\left(z + \left(-y\right)\right)}}{t}} \]
      16. distribute-neg-in78.3%

        \[\leadsto \frac{y}{\frac{\color{blue}{\left(-z\right) + \left(-\left(-y\right)\right)}}{t}} \]
      17. remove-double-neg78.3%

        \[\leadsto \frac{y}{\frac{\left(-z\right) + \color{blue}{y}}{t}} \]
    6. Applied egg-rr78.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+138}:\\ \;\;\;\;t - t \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-11}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 2100000000:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]

Alternative 12: 90.5% accurate, 0.7× speedup?

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

\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 < -4.3999999999999999e171 or 2.8e124 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in x around 0 91.0%

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

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

        \[\leadsto \color{blue}{\frac{-y}{z - y}} \cdot t \]
    4. Simplified91.0%

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

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

        \[\leadsto \color{blue}{\frac{-y}{\frac{z - y}{t}}} \]
      3. add-sqr-sqrt26.7%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{\frac{z - y}{t}} \]
      4. sqrt-unprod3.0%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{\frac{z - y}{t}} \]
      5. sqr-neg3.0%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{\frac{z - y}{t}} \]
      6. sqrt-unprod2.5%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\frac{z - y}{t}} \]
      7. add-sqr-sqrt4.1%

        \[\leadsto \frac{\color{blue}{y}}{\frac{z - y}{t}} \]
      8. frac-2neg4.1%

        \[\leadsto \color{blue}{\frac{-y}{-\frac{z - y}{t}}} \]
      9. add-sqr-sqrt1.6%

        \[\leadsto \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{-\frac{z - y}{t}} \]
      10. sqrt-unprod12.3%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{-\frac{z - y}{t}} \]
      11. sqr-neg12.3%

        \[\leadsto \frac{\sqrt{\color{blue}{y \cdot y}}}{-\frac{z - y}{t}} \]
      12. sqrt-unprod40.2%

        \[\leadsto \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{-\frac{z - y}{t}} \]
      13. add-sqr-sqrt67.3%

        \[\leadsto \frac{\color{blue}{y}}{-\frac{z - y}{t}} \]
      14. distribute-neg-frac67.3%

        \[\leadsto \frac{y}{\color{blue}{\frac{-\left(z - y\right)}{t}}} \]
      15. sub-neg67.3%

        \[\leadsto \frac{y}{\frac{-\color{blue}{\left(z + \left(-y\right)\right)}}{t}} \]
      16. distribute-neg-in67.3%

        \[\leadsto \frac{y}{\frac{\color{blue}{\left(-z\right) + \left(-\left(-y\right)\right)}}{t}} \]
      17. remove-double-neg67.3%

        \[\leadsto \frac{y}{\frac{\left(-z\right) + \color{blue}{y}}{t}} \]
    6. Applied egg-rr67.3%

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

        \[\leadsto \color{blue}{\frac{y}{\left(-z\right) + y} \cdot t} \]
      2. +-commutative91.0%

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

        \[\leadsto \frac{y}{\color{blue}{y - z}} \cdot t \]
    8. Simplified91.0%

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

    if -4.3999999999999999e171 < y < 2.8e124

    1. Initial program 94.9%

      \[\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-*r/92.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+171} \lor \neg \left(y \leq 2.8 \cdot 10^{+124}\right):\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \end{array} \]

Alternative 13: 61.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.69999999999999977e55 or 1.12e7 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.69999999999999977e55 < y < 1.12e7

    1. Initial program 93.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Taylor expanded in y around 0 60.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 11200000:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 14: 61.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.79999999999999994e55 or 7e9 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.79999999999999994e55 < y < 7e9

    1. Initial program 93.0%

      \[\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-*r/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. Taylor expanded in y around 0 58.2%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    6. Simplified60.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 7000000000:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 35.0% 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.2%

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification34.7%

    \[\leadsto t \]

Developer target: 97.0% 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 2023257 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

  :herbie-target
  (/ t (/ (- z y) (- x y)))

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