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

Percentage Accurate: 96.9% → 96.9%
Time: 10.4s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 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: 96.9% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 1.0× speedup?

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

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

    \[\frac{x - y}{z - y} \cdot t \]
  2. Final simplification97.9%

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

Alternative 2: 75.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2300000000000:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.92 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-20}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ x y)))))
   (if (<= y -4.8e+17)
     t_1
     (if (<= y -2300000000000.0)
       (/ (* y (- t)) z)
       (if (<= y -6.8e-34)
         t_1
         (if (<= y -1.92e-107)
           (* t (/ (- x y) z))
           (if (<= y 1.35e-20) (* t (/ x (- z y))) t_1)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -4.8e+17) {
		tmp = t_1;
	} else if (y <= -2300000000000.0) {
		tmp = (y * -t) / z;
	} else if (y <= -6.8e-34) {
		tmp = t_1;
	} else if (y <= -1.92e-107) {
		tmp = t * ((x - y) / z);
	} else if (y <= 1.35e-20) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (1.0d0 - (x / y))
    if (y <= (-4.8d+17)) then
        tmp = t_1
    else if (y <= (-2300000000000.0d0)) then
        tmp = (y * -t) / z
    else if (y <= (-6.8d-34)) then
        tmp = t_1
    else if (y <= (-1.92d-107)) then
        tmp = t * ((x - y) / z)
    else if (y <= 1.35d-20) then
        tmp = t * (x / (z - y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -4.8e+17) {
		tmp = t_1;
	} else if (y <= -2300000000000.0) {
		tmp = (y * -t) / z;
	} else if (y <= -6.8e-34) {
		tmp = t_1;
	} else if (y <= -1.92e-107) {
		tmp = t * ((x - y) / z);
	} else if (y <= 1.35e-20) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	tmp = 0
	if y <= -4.8e+17:
		tmp = t_1
	elif y <= -2300000000000.0:
		tmp = (y * -t) / z
	elif y <= -6.8e-34:
		tmp = t_1
	elif y <= -1.92e-107:
		tmp = t * ((x - y) / z)
	elif y <= 1.35e-20:
		tmp = t * (x / (z - y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(1.0 - Float64(x / y)))
	tmp = 0.0
	if (y <= -4.8e+17)
		tmp = t_1;
	elseif (y <= -2300000000000.0)
		tmp = Float64(Float64(y * Float64(-t)) / z);
	elseif (y <= -6.8e-34)
		tmp = t_1;
	elseif (y <= -1.92e-107)
		tmp = Float64(t * Float64(Float64(x - y) / z));
	elseif (y <= 1.35e-20)
		tmp = Float64(t * Float64(x / Float64(z - y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -4.8e+17)
		tmp = t_1;
	elseif (y <= -2300000000000.0)
		tmp = (y * -t) / z;
	elseif (y <= -6.8e-34)
		tmp = t_1;
	elseif (y <= -1.92e-107)
		tmp = t * ((x - y) / z);
	elseif (y <= 1.35e-20)
		tmp = t * (x / (z - y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+17], t$95$1, If[LessEqual[y, -2300000000000.0], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -6.8e-34], t$95$1, If[LessEqual[y, -1.92e-107], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-20], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2300000000000:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\

\mathbf{elif}\;y \leq -6.8 \cdot 10^{-34}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.8e17 or -2.3e12 < y < -6.8000000000000001e-34 or 1.35e-20 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -4.8e17 < y < -2.3e12

    1. Initial program 99.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot t}}{z} \]
      2. distribute-lft-neg-out100.0%

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

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

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

    if -6.8000000000000001e-34 < y < -1.92000000000000014e-107

    1. Initial program 99.6%

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

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

    if -1.92000000000000014e-107 < y < 1.35e-20

    1. Initial program 94.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -2300000000000:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-34}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.92 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-20}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]

Alternative 3: 88.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - y\right) \cdot \frac{t}{z - y}\\ t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{+164}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{-287}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-110}:\\ \;\;\;\;\frac{x \cdot t}{z - y}\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+147}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- x y) (/ t (- z y)))) (t_2 (* t (- 1.0 (/ x y)))))
   (if (<= y -5.5e+164)
     t_2
     (if (<= y 9.6e-287)
       t_1
       (if (<= y 1.9e-110)
         (/ (* x t) (- z y))
         (if (<= y 1.12e+147) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x - y) * (t / (z - y));
	double t_2 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -5.5e+164) {
		tmp = t_2;
	} else if (y <= 9.6e-287) {
		tmp = t_1;
	} else if (y <= 1.9e-110) {
		tmp = (x * t) / (z - y);
	} else if (y <= 1.12e+147) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x - y) * (t / (z - y))
    t_2 = t * (1.0d0 - (x / y))
    if (y <= (-5.5d+164)) then
        tmp = t_2
    else if (y <= 9.6d-287) then
        tmp = t_1
    else if (y <= 1.9d-110) then
        tmp = (x * t) / (z - y)
    else if (y <= 1.12d+147) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x - y) * (t / (z - y));
	double t_2 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -5.5e+164) {
		tmp = t_2;
	} else if (y <= 9.6e-287) {
		tmp = t_1;
	} else if (y <= 1.9e-110) {
		tmp = (x * t) / (z - y);
	} else if (y <= 1.12e+147) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x - y) * (t / (z - y))
	t_2 = t * (1.0 - (x / y))
	tmp = 0
	if y <= -5.5e+164:
		tmp = t_2
	elif y <= 9.6e-287:
		tmp = t_1
	elif y <= 1.9e-110:
		tmp = (x * t) / (z - y)
	elif y <= 1.12e+147:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x - y) * Float64(t / Float64(z - y)))
	t_2 = Float64(t * Float64(1.0 - Float64(x / y)))
	tmp = 0.0
	if (y <= -5.5e+164)
		tmp = t_2;
	elseif (y <= 9.6e-287)
		tmp = t_1;
	elseif (y <= 1.9e-110)
		tmp = Float64(Float64(x * t) / Float64(z - y));
	elseif (y <= 1.12e+147)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x - y) * (t / (z - y));
	t_2 = t * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -5.5e+164)
		tmp = t_2;
	elseif (y <= 9.6e-287)
		tmp = t_1;
	elseif (y <= 1.9e-110)
		tmp = (x * t) / (z - y);
	elseif (y <= 1.12e+147)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+164], t$95$2, If[LessEqual[y, 9.6e-287], t$95$1, If[LessEqual[y, 1.9e-110], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+147], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 9.6 \cdot 10^{-287}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.12 \cdot 10^{+147}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.4999999999999998e164 or 1.12e147 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e164 < y < 9.59999999999999997e-287 or 1.8999999999999999e-110 < y < 1.12e147

    1. Initial program 97.8%

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

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

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

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

    if 9.59999999999999997e-287 < y < 1.8999999999999999e-110

    1. Initial program 94.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+164}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{-287}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-110}:\\ \;\;\;\;\frac{x \cdot t}{z - y}\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+147}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]

Alternative 4: 75.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -49000000:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. neg-sub077.3%

        \[\leadsto \frac{t}{\color{blue}{0 - \frac{z - y}{y}}} \]
      3. div-sub77.3%

        \[\leadsto \frac{t}{0 - \color{blue}{\left(\frac{z}{y} - \frac{y}{y}\right)}} \]
      4. *-inverses77.3%

        \[\leadsto \frac{t}{0 - \left(\frac{z}{y} - \color{blue}{1}\right)} \]
      5. associate-+l-77.3%

        \[\leadsto \frac{t}{\color{blue}{\left(0 - \frac{z}{y}\right) + 1}} \]
      6. neg-sub077.3%

        \[\leadsto \frac{t}{\color{blue}{\left(-\frac{z}{y}\right)} + 1} \]
      7. neg-mul-177.3%

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

        \[\leadsto \frac{t}{\color{blue}{1 + -1 \cdot \frac{z}{y}}} \]
      9. neg-mul-177.3%

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

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

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

    if -4.9e7 < y < -3.99999999999999971e-34

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -3.99999999999999971e-34 < y < -4.1999999999999998e-108

    1. Initial program 99.6%

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

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

    if -4.1999999999999998e-108 < y < 5.60000000000000008e-21

    1. Initial program 94.7%

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

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

    if 5.60000000000000008e-21 < y

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -49000000:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-34}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-108}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-21}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{-y}{z - y}\\ \end{array} \]

Alternative 5: 75.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -4.8 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2300000000000:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-34} \lor \neg \left(y \leq 6.5 \cdot 10^{-20}\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 (- 1.0 (/ x y)))))
   (if (<= y -4.8e+17)
     t_1
     (if (<= y -2300000000000.0)
       (/ (* y (- t)) z)
       (if (or (<= y -4.4e-34) (not (<= y 6.5e-20)))
         t_1
         (* x (/ t (- z y))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -4.8e+17) {
		tmp = t_1;
	} else if (y <= -2300000000000.0) {
		tmp = (y * -t) / z;
	} else if ((y <= -4.4e-34) || !(y <= 6.5e-20)) {
		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 * (1.0d0 - (x / y))
    if (y <= (-4.8d+17)) then
        tmp = t_1
    else if (y <= (-2300000000000.0d0)) then
        tmp = (y * -t) / z
    else if ((y <= (-4.4d-34)) .or. (.not. (y <= 6.5d-20))) 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 * (1.0 - (x / y));
	double tmp;
	if (y <= -4.8e+17) {
		tmp = t_1;
	} else if (y <= -2300000000000.0) {
		tmp = (y * -t) / z;
	} else if ((y <= -4.4e-34) || !(y <= 6.5e-20)) {
		tmp = t_1;
	} else {
		tmp = x * (t / (z - y));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	tmp = 0
	if y <= -4.8e+17:
		tmp = t_1
	elif y <= -2300000000000.0:
		tmp = (y * -t) / z
	elif (y <= -4.4e-34) or not (y <= 6.5e-20):
		tmp = t_1
	else:
		tmp = x * (t / (z - y))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(1.0 - Float64(x / y)))
	tmp = 0.0
	if (y <= -4.8e+17)
		tmp = t_1;
	elseif (y <= -2300000000000.0)
		tmp = Float64(Float64(y * Float64(-t)) / z);
	elseif ((y <= -4.4e-34) || !(y <= 6.5e-20))
		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 * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -4.8e+17)
		tmp = t_1;
	elseif (y <= -2300000000000.0)
		tmp = (y * -t) / z;
	elseif ((y <= -4.4e-34) || ~((y <= 6.5e-20)))
		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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+17], t$95$1, If[LessEqual[y, -2300000000000.0], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[y, -4.4e-34], N[Not[LessEqual[y, 6.5e-20]], $MachinePrecision]], t$95$1, N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2300000000000:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\

\mathbf{elif}\;y \leq -4.4 \cdot 10^{-34} \lor \neg \left(y \leq 6.5 \cdot 10^{-20}\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 < -4.8e17 or -2.3e12 < y < -4.3999999999999998e-34 or 6.50000000000000032e-20 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -4.8e17 < y < -2.3e12

    1. Initial program 99.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot t}}{z} \]
      2. distribute-lft-neg-out100.0%

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

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

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

    if -4.3999999999999998e-34 < y < 6.50000000000000032e-20

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+17}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -2300000000000:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-34} \lor \neg \left(y \leq 6.5 \cdot 10^{-20}\right):\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \end{array} \]

Alternative 6: 71.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\ t_2 := \left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{if}\;z \leq -36000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-35}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 70000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ x y)))) (t_2 (* (- x y) (/ t z))))
   (if (<= z -36000000000.0)
     t_2
     (if (<= z -3.8e-22)
       t_1
       (if (<= z -4.7e-35) (/ t (/ z x)) (if (<= z 70000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double t_2 = (x - y) * (t / z);
	double tmp;
	if (z <= -36000000000.0) {
		tmp = t_2;
	} else if (z <= -3.8e-22) {
		tmp = t_1;
	} else if (z <= -4.7e-35) {
		tmp = t / (z / x);
	} else if (z <= 70000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (1.0d0 - (x / y))
    t_2 = (x - y) * (t / z)
    if (z <= (-36000000000.0d0)) then
        tmp = t_2
    else if (z <= (-3.8d-22)) then
        tmp = t_1
    else if (z <= (-4.7d-35)) then
        tmp = t / (z / x)
    else if (z <= 70000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double t_2 = (x - y) * (t / z);
	double tmp;
	if (z <= -36000000000.0) {
		tmp = t_2;
	} else if (z <= -3.8e-22) {
		tmp = t_1;
	} else if (z <= -4.7e-35) {
		tmp = t / (z / x);
	} else if (z <= 70000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	t_2 = (x - y) * (t / z)
	tmp = 0
	if z <= -36000000000.0:
		tmp = t_2
	elif z <= -3.8e-22:
		tmp = t_1
	elif z <= -4.7e-35:
		tmp = t / (z / x)
	elif z <= 70000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(1.0 - Float64(x / y)))
	t_2 = Float64(Float64(x - y) * Float64(t / z))
	tmp = 0.0
	if (z <= -36000000000.0)
		tmp = t_2;
	elseif (z <= -3.8e-22)
		tmp = t_1;
	elseif (z <= -4.7e-35)
		tmp = Float64(t / Float64(z / x));
	elseif (z <= 70000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (1.0 - (x / y));
	t_2 = (x - y) * (t / z);
	tmp = 0.0;
	if (z <= -36000000000.0)
		tmp = t_2;
	elseif (z <= -3.8e-22)
		tmp = t_1;
	elseif (z <= -4.7e-35)
		tmp = t / (z / x);
	elseif (z <= 70000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -36000000000.0], t$95$2, If[LessEqual[z, -3.8e-22], t$95$1, If[LessEqual[z, -4.7e-35], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 70000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
t_2 := \left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -36000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -3.8 \cdot 10^{-22}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-35}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\

\mathbf{elif}\;z \leq 70000:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.6e10 or 7e4 < z

    1. Initial program 96.7%

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

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

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

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

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

    if -3.6e10 < z < -3.80000000000000023e-22 or -4.7e-35 < z < 7e4

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

    if -3.80000000000000023e-22 < z < -4.7e-35

    1. Initial program 99.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    6. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -36000000000:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-22}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-35}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 70000:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \end{array} \]

Alternative 7: 75.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{1 - \frac{z}{y}}\\ \mathbf{if}\;y \leq -50000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-34}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-20}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ t (- 1.0 (/ z y)))))
   (if (<= y -50000000.0)
     t_1
     (if (<= y -6.5e-34)
       (* t (- 1.0 (/ x y)))
       (if (<= y -4.8e-106)
         (* t (/ (- x y) z))
         (if (<= y 5.6e-20) (* t (/ x (- z y))) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = t / (1.0 - (z / y));
	double tmp;
	if (y <= -50000000.0) {
		tmp = t_1;
	} else if (y <= -6.5e-34) {
		tmp = t * (1.0 - (x / y));
	} else if (y <= -4.8e-106) {
		tmp = t * ((x - y) / z);
	} else if (y <= 5.6e-20) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t / (1.0d0 - (z / y))
    if (y <= (-50000000.0d0)) then
        tmp = t_1
    else if (y <= (-6.5d-34)) then
        tmp = t * (1.0d0 - (x / y))
    else if (y <= (-4.8d-106)) then
        tmp = t * ((x - y) / z)
    else if (y <= 5.6d-20) then
        tmp = t * (x / (z - y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t / (1.0 - (z / y));
	double tmp;
	if (y <= -50000000.0) {
		tmp = t_1;
	} else if (y <= -6.5e-34) {
		tmp = t * (1.0 - (x / y));
	} else if (y <= -4.8e-106) {
		tmp = t * ((x - y) / z);
	} else if (y <= 5.6e-20) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t / (1.0 - (z / y))
	tmp = 0
	if y <= -50000000.0:
		tmp = t_1
	elif y <= -6.5e-34:
		tmp = t * (1.0 - (x / y))
	elif y <= -4.8e-106:
		tmp = t * ((x - y) / z)
	elif y <= 5.6e-20:
		tmp = t * (x / (z - y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t / Float64(1.0 - Float64(z / y)))
	tmp = 0.0
	if (y <= -50000000.0)
		tmp = t_1;
	elseif (y <= -6.5e-34)
		tmp = Float64(t * Float64(1.0 - Float64(x / y)));
	elseif (y <= -4.8e-106)
		tmp = Float64(t * Float64(Float64(x - y) / z));
	elseif (y <= 5.6e-20)
		tmp = Float64(t * Float64(x / Float64(z - y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t / (1.0 - (z / y));
	tmp = 0.0;
	if (y <= -50000000.0)
		tmp = t_1;
	elseif (y <= -6.5e-34)
		tmp = t * (1.0 - (x / y));
	elseif (y <= -4.8e-106)
		tmp = t * ((x - y) / z);
	elseif (y <= 5.6e-20)
		tmp = t * (x / (z - y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -50000000.0], t$95$1, If[LessEqual[y, -6.5e-34], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.8e-106], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e-20], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -50000000:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5e7 or 5.6000000000000005e-20 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. neg-sub077.7%

        \[\leadsto \frac{t}{\color{blue}{0 - \frac{z - y}{y}}} \]
      3. div-sub77.7%

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

        \[\leadsto \frac{t}{0 - \left(\frac{z}{y} - \color{blue}{1}\right)} \]
      5. associate-+l-77.7%

        \[\leadsto \frac{t}{\color{blue}{\left(0 - \frac{z}{y}\right) + 1}} \]
      6. neg-sub077.7%

        \[\leadsto \frac{t}{\color{blue}{\left(-\frac{z}{y}\right)} + 1} \]
      7. neg-mul-177.7%

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

        \[\leadsto \frac{t}{\color{blue}{1 + -1 \cdot \frac{z}{y}}} \]
      9. neg-mul-177.7%

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

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

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

    if -5e7 < y < -6.49999999999999985e-34

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -6.49999999999999985e-34 < y < -4.7999999999999995e-106

    1. Initial program 99.6%

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

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

    if -4.7999999999999995e-106 < y < 5.6000000000000005e-20

    1. Initial program 94.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -50000000:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-34}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-20}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \end{array} \]

Alternative 8: 60.1% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.15e94 or 2.9e-21 < y

    1. Initial program 99.9%

      \[\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/71.6%

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

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

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

    if -2.15e94 < y < -3.2999999999999998e-26

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{y}} \cdot t \]
    6. Step-by-step derivation
      1. distribute-frac-neg41.7%

        \[\leadsto \color{blue}{\left(-\frac{x}{y}\right)} \cdot t \]
      2. distribute-lft-neg-out41.7%

        \[\leadsto \color{blue}{-\frac{x}{y} \cdot t} \]
      3. associate-/r/41.7%

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

        \[\leadsto -\color{blue}{x \cdot \frac{1}{\frac{y}{t}}} \]
      5. clear-num41.7%

        \[\leadsto -x \cdot \color{blue}{\frac{t}{y}} \]
    7. Applied egg-rr41.7%

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

    if -3.2999999999999998e-26 < y < 2.9e-21

    1. Initial program 95.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-26}:\\ \;\;\;\;\frac{t}{y} \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-21}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 9: 59.3% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.5199999999999999e94 or 1.6499999999999999e-19 < y

    1. Initial program 99.9%

      \[\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/71.6%

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

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

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

    if -1.5199999999999999e94 < y < -8.4000000000000003e-50

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if -8.4000000000000003e-50 < y < 1.6499999999999999e-19

    1. Initial program 95.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.52 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -8.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{-y}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-19}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 10: 59.4% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.39999999999999958e94 or 2.5000000000000002e-19 < y

    1. Initial program 99.9%

      \[\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/71.6%

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

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

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

    if -8.39999999999999958e94 < y < -1.8999999999999999e-49

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot t}}{z} \]
      2. distribute-lft-neg-out46.9%

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

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

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

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

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

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(t \cdot y\right)}}{z} \]
      3. associate-*r*46.9%

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

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

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

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

    if -1.8999999999999999e-49 < y < 2.5000000000000002e-19

    1. Initial program 95.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.4 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-49}:\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-19}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 67.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.61999999999999997e94 or 2.80000000000000003e-19 < y

    1. Initial program 99.9%

      \[\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/71.6%

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

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

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

    if -1.61999999999999997e94 < y < 2.80000000000000003e-19

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.62 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 38.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 1.15 \cdot 10^{-21}:\\
\;\;\;\;t \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4499999999999999e-53 or 1.15e-21 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.4499999999999999e-53 < y < 1.15e-21

    1. Initial program 95.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot t}}{z} \]
      2. distribute-lft-neg-out24.8%

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

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

      \[\leadsto \frac{\color{blue}{t \cdot \left(-y\right)}}{z} \]
    8. Step-by-step derivation
      1. expm1-log1p-u21.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t \cdot \left(-y\right)}{z}\right)\right)} \]
      2. expm1-udef16.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{t \cdot \left(-y\right)}{z}\right)} - 1} \]
      3. div-inv16.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(t \cdot \left(-y\right)\right) \cdot \frac{1}{z}}\right)} - 1 \]
      4. associate-*l*16.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{t \cdot \left(\left(-y\right) \cdot \frac{1}{z}\right)}\right)} - 1 \]
      5. add-sqr-sqrt7.7%

        \[\leadsto e^{\mathsf{log1p}\left(t \cdot \left(\color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot \frac{1}{z}\right)\right)} - 1 \]
      6. sqrt-unprod16.3%

        \[\leadsto e^{\mathsf{log1p}\left(t \cdot \left(\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \frac{1}{z}\right)\right)} - 1 \]
      7. sqr-neg16.3%

        \[\leadsto e^{\mathsf{log1p}\left(t \cdot \left(\sqrt{\color{blue}{y \cdot y}} \cdot \frac{1}{z}\right)\right)} - 1 \]
      8. sqrt-unprod8.6%

        \[\leadsto e^{\mathsf{log1p}\left(t \cdot \left(\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \frac{1}{z}\right)\right)} - 1 \]
      9. add-sqr-sqrt14.8%

        \[\leadsto e^{\mathsf{log1p}\left(t \cdot \left(\color{blue}{y} \cdot \frac{1}{z}\right)\right)} - 1 \]
      10. div-inv14.8%

        \[\leadsto e^{\mathsf{log1p}\left(t \cdot \color{blue}{\frac{y}{z}}\right)} - 1 \]
    9. Applied egg-rr14.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(t \cdot \frac{y}{z}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def14.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \frac{y}{z}\right)\right)} \]
      2. expm1-log1p15.0%

        \[\leadsto \color{blue}{t \cdot \frac{y}{z}} \]
    11. Simplified15.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{-53}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-21}:\\ \;\;\;\;t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 59.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.20000000000000016e-34 or 1.7000000000000001e-19 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -7.20000000000000016e-34 < y < 1.7000000000000001e-19

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
      2. *-commutative67.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{-34}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 14: 60.3% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.5000000000000004e-34 or 5.4999999999999996e-20 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -7.5000000000000004e-34 < y < 5.4999999999999996e-20

    1. Initial program 95.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{-34}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-20}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 34.4% 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 97.9%

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

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

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

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

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

    \[\leadsto t \]

Developer target: 96.9% 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 2023221 
(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))