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

Percentage Accurate: 97.2% → 97.2%
Time: 10.5s
Alternatives: 16
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 16 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.2% 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.2% 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.6%

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

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

Alternative 2: 59.3% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -3.5999999999999999e28 or 1.14999999999999995e123 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -3.5999999999999999e28 < y < -2.29999999999999979e-13

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    6. Simplified63.5%

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

    if -2.29999999999999979e-13 < y < -1.7000000000000001e-47

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e-47 < y < -2.50000000000000012e-231

    1. Initial program 90.1%

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

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

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

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

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

    if -2.50000000000000012e-231 < y < 5.40000000000000001e-60

    1. Initial program 95.7%

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

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

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

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

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

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

    if 5.40000000000000001e-60 < y < 1.14999999999999995e123

    1. Initial program 99.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/56.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t}}{y} \cdot x \]
    11. Simplified46.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-13}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-47}:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-60}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+123}:\\ \;\;\;\;x \cdot \frac{-t}{y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 3: 61.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{x}{z}\\ \mathbf{if}\;y \leq -1.56 \cdot 10^{+29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-48}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ x z))))
   (if (<= y -1.56e+29)
     t
     (if (<= y -6.5e-28)
       t_1
       (if (<= y -1.08e-48)
         t
         (if (<= y -2.5e-231) (* x (/ t z)) (if (<= y 3.5e+70) t_1 t)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (x / z);
	double tmp;
	if (y <= -1.56e+29) {
		tmp = t;
	} else if (y <= -6.5e-28) {
		tmp = t_1;
	} else if (y <= -1.08e-48) {
		tmp = t;
	} else if (y <= -2.5e-231) {
		tmp = x * (t / z);
	} else if (y <= 3.5e+70) {
		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 <= (-1.56d+29)) then
        tmp = t
    else if (y <= (-6.5d-28)) then
        tmp = t_1
    else if (y <= (-1.08d-48)) then
        tmp = t
    else if (y <= (-2.5d-231)) then
        tmp = x * (t / z)
    else if (y <= 3.5d+70) 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 <= -1.56e+29) {
		tmp = t;
	} else if (y <= -6.5e-28) {
		tmp = t_1;
	} else if (y <= -1.08e-48) {
		tmp = t;
	} else if (y <= -2.5e-231) {
		tmp = x * (t / z);
	} else if (y <= 3.5e+70) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (x / z)
	tmp = 0
	if y <= -1.56e+29:
		tmp = t
	elif y <= -6.5e-28:
		tmp = t_1
	elif y <= -1.08e-48:
		tmp = t
	elif y <= -2.5e-231:
		tmp = x * (t / z)
	elif y <= 3.5e+70:
		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 <= -1.56e+29)
		tmp = t;
	elseif (y <= -6.5e-28)
		tmp = t_1;
	elseif (y <= -1.08e-48)
		tmp = t;
	elseif (y <= -2.5e-231)
		tmp = Float64(x * Float64(t / z));
	elseif (y <= 3.5e+70)
		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 <= -1.56e+29)
		tmp = t;
	elseif (y <= -6.5e-28)
		tmp = t_1;
	elseif (y <= -1.08e-48)
		tmp = t;
	elseif (y <= -2.5e-231)
		tmp = x * (t / z);
	elseif (y <= 3.5e+70)
		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, -1.56e+29], t, If[LessEqual[y, -6.5e-28], t$95$1, If[LessEqual[y, -1.08e-48], t, If[LessEqual[y, -2.5e-231], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+70], t$95$1, t]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -6.5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.08 \cdot 10^{-48}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.5599999999999999e29 or -6.50000000000000043e-28 < y < -1.08e-48 or 3.50000000000000002e70 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -1.5599999999999999e29 < y < -6.50000000000000043e-28 or -2.50000000000000012e-231 < y < 3.50000000000000002e70

    1. Initial program 97.4%

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

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

    if -1.08e-48 < y < -2.50000000000000012e-231

    1. Initial program 90.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/63.1%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    8. Applied egg-rr63.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.56 \cdot 10^{+29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-28}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq -1.08 \cdot 10^{-48}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+70}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 61.3% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq -2.1 \cdot 10^{-47}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.7999999999999999e29 or -3.6499999999999998e-28 < y < -2.1000000000000001e-47 or 4.20000000000000015e70 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -5.7999999999999999e29 < y < -3.6499999999999998e-28

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -2.1000000000000001e-47 < y < -2.50000000000000012e-231

    1. Initial program 90.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/63.1%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    8. Applied egg-rr63.1%

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

    if -2.50000000000000012e-231 < y < 4.20000000000000015e70

    1. Initial program 97.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3.65 \cdot 10^{-28}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-47}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+70}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 61.2% accurate, 0.6× speedup?

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

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

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

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

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

\mathbf{elif}\;y \leq 1.8 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.9499999999999999e27 or -4.80000000000000018e-25 < y < -8.99999999999999977e-48 or 1.8e70 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -1.9499999999999999e27 < y < -4.80000000000000018e-25

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -8.99999999999999977e-48 < y < -2.50000000000000012e-231

    1. Initial program 90.1%

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

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

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

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

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

    if -2.50000000000000012e-231 < y < 1.8e70

    1. Initial program 97.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+27}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-25}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-48}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+70}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 60.4% accurate, 0.6× speedup?

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

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

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

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

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

\mathbf{elif}\;y \leq 3.8 \cdot 10^{+70}:\\
\;\;\;\;\frac{x \cdot t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.5000000000000002e27 or -1.6500000000000001e-23 < y < -4.49999999999999988e-48 or 3.7999999999999998e70 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -7.5000000000000002e27 < y < -1.6500000000000001e-23

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -4.49999999999999988e-48 < y < -2.50000000000000012e-231

    1. Initial program 90.1%

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

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

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

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

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

    if -2.50000000000000012e-231 < y < 3.7999999999999998e70

    1. Initial program 97.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+27}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-23}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-48}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+70}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 7: 60.5% accurate, 0.6× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.6499999999999999e28 or 9.99999999999999983e72 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -3.6499999999999999e28 < y < -8.2000000000000004e-13

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    6. Simplified63.5%

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

    if -8.2000000000000004e-13 < y < -1.90000000000000007e-47

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000007e-47 < y < -2.50000000000000012e-231

    1. Initial program 90.1%

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

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

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

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

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

    if -2.50000000000000012e-231 < y < 9.99999999999999983e72

    1. Initial program 97.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.65 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-13}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-47}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 10^{+73}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 8: 60.6% accurate, 0.6× speedup?

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

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

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

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

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

\mathbf{elif}\;y \leq 2.7 \cdot 10^{+72}:\\
\;\;\;\;\frac{x \cdot t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.19999999999999978e28 or 2.7000000000000001e72 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -4.19999999999999978e28 < y < -1.14999999999999995e-12

    1. Initial program 99.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    6. Simplified63.5%

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

    if -1.14999999999999995e-12 < y < -1.90000000000000001e-48

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000001e-48 < y < -2.50000000000000012e-231

    1. Initial program 90.1%

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

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

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

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

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

    if -2.50000000000000012e-231 < y < 2.7000000000000001e72

    1. Initial program 97.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+28}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-12}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-48}:\\ \;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+72}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 9: 66.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -5.8 \cdot 10^{-218}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.8000000000000002e29 or 2.5500000000000001e79 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -4.8000000000000002e29 < y < -5.8000000000000004e-218 or 7.19999999999999989e-249 < y < 2.5500000000000001e79

    1. Initial program 96.6%

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

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

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

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

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

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

    if -5.8000000000000004e-218 < y < 7.19999999999999989e-249

    1. Initial program 94.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-218}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-249}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{+79}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 10: 65.2% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.36e29 or 6.7999999999999996e177 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -1.36e29 < y < -4.0999999999999998e-218

    1. Initial program 95.9%

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

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

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

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

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

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

    if -4.0999999999999998e-218 < y < 1.9499999999999999e-245

    1. Initial program 94.7%

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

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

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

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

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

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

    if 1.9499999999999999e-245 < y < 6.7999999999999996e177

    1. Initial program 97.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. clear-num97.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/66.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.36 \cdot 10^{+29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-218}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-245}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+177}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 74.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{y - z}\\ t_2 := t \cdot \frac{x}{z - y}\\ \mathbf{if}\;x \leq -1.85 \cdot 10^{+31}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;x \leq 9200000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
   (if (<= x -1.85e+31)
     t_2
     (if (<= x -7.5e-26)
       t_1
       (if (<= x -1.6e-116)
         (* x (/ t (- z y)))
         (if (<= x 9200000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (y / (y - z));
	double t_2 = t * (x / (z - y));
	double tmp;
	if (x <= -1.85e+31) {
		tmp = t_2;
	} else if (x <= -7.5e-26) {
		tmp = t_1;
	} else if (x <= -1.6e-116) {
		tmp = x * (t / (z - y));
	} else if (x <= 9200000000.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 * (y / (y - z))
    t_2 = t * (x / (z - y))
    if (x <= (-1.85d+31)) then
        tmp = t_2
    else if (x <= (-7.5d-26)) then
        tmp = t_1
    else if (x <= (-1.6d-116)) then
        tmp = x * (t / (z - y))
    else if (x <= 9200000000.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 * (y / (y - z));
	double t_2 = t * (x / (z - y));
	double tmp;
	if (x <= -1.85e+31) {
		tmp = t_2;
	} else if (x <= -7.5e-26) {
		tmp = t_1;
	} else if (x <= -1.6e-116) {
		tmp = x * (t / (z - y));
	} else if (x <= 9200000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (y / (y - z))
	t_2 = t * (x / (z - y))
	tmp = 0
	if x <= -1.85e+31:
		tmp = t_2
	elif x <= -7.5e-26:
		tmp = t_1
	elif x <= -1.6e-116:
		tmp = x * (t / (z - y))
	elif x <= 9200000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(y / Float64(y - z)))
	t_2 = Float64(t * Float64(x / Float64(z - y)))
	tmp = 0.0
	if (x <= -1.85e+31)
		tmp = t_2;
	elseif (x <= -7.5e-26)
		tmp = t_1;
	elseif (x <= -1.6e-116)
		tmp = Float64(x * Float64(t / Float64(z - y)));
	elseif (x <= 9200000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (y / (y - z));
	t_2 = t * (x / (z - y));
	tmp = 0.0;
	if (x <= -1.85e+31)
		tmp = t_2;
	elseif (x <= -7.5e-26)
		tmp = t_1;
	elseif (x <= -1.6e-116)
		tmp = x * (t / (z - y));
	elseif (x <= 9200000000.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[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.85e+31], t$95$2, If[LessEqual[x, -7.5e-26], t$95$1, If[LessEqual[x, -1.6e-116], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9200000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -7.5 \cdot 10^{-26}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 9200000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.8499999999999999e31 or 9.2e9 < x

    1. Initial program 99.0%

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

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

    if -1.8499999999999999e31 < x < -7.4999999999999994e-26 or -1.60000000000000005e-116 < x < 9.2e9

    1. Initial program 95.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{z - y}} \cdot t \]
    5. Step-by-step derivation
      1. frac-2neg80.4%

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

        \[\leadsto \color{blue}{\left(\left(-\left(-y\right)\right) \cdot \frac{1}{-\left(z - y\right)}\right)} \cdot t \]
      3. remove-double-neg80.2%

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

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

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

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

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

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

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

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

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

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

    if -7.4999999999999994e-26 < x < -1.60000000000000005e-116

    1. Initial program 99.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. clear-num99.4%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/78.0%

        \[\leadsto \color{blue}{\frac{t}{z - y} \cdot x} \]
    8. Applied egg-rr78.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;x \leq 9200000000:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \end{array} \]

Alternative 12: 74.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{y - z}\\ t_2 := \frac{t}{\frac{z - y}{x}}\\ \mathbf{if}\;x \leq -2 \cdot 10^{+31}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;x \leq 3400000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ y (- y z)))) (t_2 (/ t (/ (- z y) x))))
   (if (<= x -2e+31)
     t_2
     (if (<= x -1.9e-25)
       t_1
       (if (<= x -1.6e-116)
         (* x (/ t (- z y)))
         (if (<= x 3400000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (y / (y - z));
	double t_2 = t / ((z - y) / x);
	double tmp;
	if (x <= -2e+31) {
		tmp = t_2;
	} else if (x <= -1.9e-25) {
		tmp = t_1;
	} else if (x <= -1.6e-116) {
		tmp = x * (t / (z - y));
	} else if (x <= 3400000000.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 * (y / (y - z))
    t_2 = t / ((z - y) / x)
    if (x <= (-2d+31)) then
        tmp = t_2
    else if (x <= (-1.9d-25)) then
        tmp = t_1
    else if (x <= (-1.6d-116)) then
        tmp = x * (t / (z - y))
    else if (x <= 3400000000.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 * (y / (y - z));
	double t_2 = t / ((z - y) / x);
	double tmp;
	if (x <= -2e+31) {
		tmp = t_2;
	} else if (x <= -1.9e-25) {
		tmp = t_1;
	} else if (x <= -1.6e-116) {
		tmp = x * (t / (z - y));
	} else if (x <= 3400000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (y / (y - z))
	t_2 = t / ((z - y) / x)
	tmp = 0
	if x <= -2e+31:
		tmp = t_2
	elif x <= -1.9e-25:
		tmp = t_1
	elif x <= -1.6e-116:
		tmp = x * (t / (z - y))
	elif x <= 3400000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(y / Float64(y - z)))
	t_2 = Float64(t / Float64(Float64(z - y) / x))
	tmp = 0.0
	if (x <= -2e+31)
		tmp = t_2;
	elseif (x <= -1.9e-25)
		tmp = t_1;
	elseif (x <= -1.6e-116)
		tmp = Float64(x * Float64(t / Float64(z - y)));
	elseif (x <= 3400000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (y / (y - z));
	t_2 = t / ((z - y) / x);
	tmp = 0.0;
	if (x <= -2e+31)
		tmp = t_2;
	elseif (x <= -1.9e-25)
		tmp = t_1;
	elseif (x <= -1.6e-116)
		tmp = x * (t / (z - y));
	elseif (x <= 3400000000.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[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e+31], t$95$2, If[LessEqual[x, -1.9e-25], t$95$1, If[LessEqual[x, -1.6e-116], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3400000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.9 \cdot 10^{-25}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 3400000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.9999999999999999e31 or 3.4e9 < x

    1. Initial program 99.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. clear-num99.0%

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

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

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

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

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

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

    if -1.9999999999999999e31 < x < -1.8999999999999999e-25 or -1.60000000000000005e-116 < x < 3.4e9

    1. Initial program 95.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{z - y}} \cdot t \]
    5. Step-by-step derivation
      1. frac-2neg80.4%

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

        \[\leadsto \color{blue}{\left(\left(-\left(-y\right)\right) \cdot \frac{1}{-\left(z - y\right)}\right)} \cdot t \]
      3. remove-double-neg80.2%

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-25 < x < -1.60000000000000005e-116

    1. Initial program 99.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. clear-num99.4%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/78.0%

        \[\leadsto \color{blue}{\frac{t}{z - y} \cdot x} \]
    8. Applied egg-rr78.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+31}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;x \leq 3400000000:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \end{array} \]

Alternative 13: 86.4% accurate, 0.6× speedup?

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

\mathbf{elif}\;x \leq -5.8 \cdot 10^{-223} \lor \neg \left(x \leq 1.4 \cdot 10^{-209}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.50000000000000018e227

    1. Initial program 96.1%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. clear-num96.1%

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

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

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

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

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

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

    if -6.50000000000000018e227 < x < -5.8000000000000001e-223 or 1.40000000000000006e-209 < x

    1. Initial program 97.4%

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

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

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

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

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

    if -5.8000000000000001e-223 < x < 1.40000000000000006e-209

    1. Initial program 100.0%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{z - y}} \cdot t \]
    5. Step-by-step derivation
      1. frac-2neg97.0%

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

        \[\leadsto \color{blue}{\left(\left(-\left(-y\right)\right) \cdot \frac{1}{-\left(z - y\right)}\right)} \cdot t \]
      3. remove-double-neg96.8%

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

        \[\leadsto \left(y \cdot \frac{1}{-\color{blue}{\left(z + \left(-y\right)\right)}}\right) \cdot t \]
      5. distribute-neg-in96.8%

        \[\leadsto \left(y \cdot \frac{1}{\color{blue}{\left(-z\right) + \left(-\left(-y\right)\right)}}\right) \cdot t \]
      6. remove-double-neg96.8%

        \[\leadsto \left(y \cdot \frac{1}{\left(-z\right) + \color{blue}{y}}\right) \cdot t \]
    6. Applied egg-rr96.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{+227}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-223} \lor \neg \left(x \leq 1.4 \cdot 10^{-209}\right):\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]

Alternative 14: 67.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.05e30 or 7.20000000000000005e177 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -1.05e30 < y < 7.20000000000000005e177

    1. Initial program 96.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+30}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+177}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 60.4% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.0500000000000001e27 or 2.30000000000000004e80 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -2.0500000000000001e27 < y < 2.30000000000000004e80

    1. Initial program 96.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    7. Step-by-step derivation
      1. associate-/r/55.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{+27}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 16: 35.7% 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.6%

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

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

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

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

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

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

    \[\leadsto t \]

Developer target: 97.2% 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 2023311 
(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))