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

Percentage Accurate: 96.7% → 96.7%
Time: 10.4s
Alternatives: 21
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 21 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 96.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% 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}
Derivation
  1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 69.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{+154}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-270}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+148}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y x) (/ t y))))
   (if (<= y -2.2e+154)
     t
     (if (<= y -8.5e+44)
       t_1
       (if (<= y 5.5e-270)
         (* (- x y) (/ t z))
         (if (<= y 1.6e+75)
           (* t (/ x (- z y)))
           (if (<= y 6e+142)
             t_1
             (if (<= y 4.8e+148) (* t (/ (- x y) z)) t))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - x) * (t / y);
	double tmp;
	if (y <= -2.2e+154) {
		tmp = t;
	} else if (y <= -8.5e+44) {
		tmp = t_1;
	} else if (y <= 5.5e-270) {
		tmp = (x - y) * (t / z);
	} else if (y <= 1.6e+75) {
		tmp = t * (x / (z - y));
	} else if (y <= 6e+142) {
		tmp = t_1;
	} else if (y <= 4.8e+148) {
		tmp = t * ((x - y) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - x) * (t / y)
    if (y <= (-2.2d+154)) then
        tmp = t
    else if (y <= (-8.5d+44)) then
        tmp = t_1
    else if (y <= 5.5d-270) then
        tmp = (x - y) * (t / z)
    else if (y <= 1.6d+75) then
        tmp = t * (x / (z - y))
    else if (y <= 6d+142) then
        tmp = t_1
    else if (y <= 4.8d+148) then
        tmp = t * ((x - y) / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - x) * (t / y);
	double tmp;
	if (y <= -2.2e+154) {
		tmp = t;
	} else if (y <= -8.5e+44) {
		tmp = t_1;
	} else if (y <= 5.5e-270) {
		tmp = (x - y) * (t / z);
	} else if (y <= 1.6e+75) {
		tmp = t * (x / (z - y));
	} else if (y <= 6e+142) {
		tmp = t_1;
	} else if (y <= 4.8e+148) {
		tmp = t * ((x - y) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - x) * (t / y)
	tmp = 0
	if y <= -2.2e+154:
		tmp = t
	elif y <= -8.5e+44:
		tmp = t_1
	elif y <= 5.5e-270:
		tmp = (x - y) * (t / z)
	elif y <= 1.6e+75:
		tmp = t * (x / (z - y))
	elif y <= 6e+142:
		tmp = t_1
	elif y <= 4.8e+148:
		tmp = t * ((x - y) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - x) * Float64(t / y))
	tmp = 0.0
	if (y <= -2.2e+154)
		tmp = t;
	elseif (y <= -8.5e+44)
		tmp = t_1;
	elseif (y <= 5.5e-270)
		tmp = Float64(Float64(x - y) * Float64(t / z));
	elseif (y <= 1.6e+75)
		tmp = Float64(t * Float64(x / Float64(z - y)));
	elseif (y <= 6e+142)
		tmp = t_1;
	elseif (y <= 4.8e+148)
		tmp = Float64(t * Float64(Float64(x - y) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - x) * (t / y);
	tmp = 0.0;
	if (y <= -2.2e+154)
		tmp = t;
	elseif (y <= -8.5e+44)
		tmp = t_1;
	elseif (y <= 5.5e-270)
		tmp = (x - y) * (t / z);
	elseif (y <= 1.6e+75)
		tmp = t * (x / (z - y));
	elseif (y <= 6e+142)
		tmp = t_1;
	elseif (y <= 4.8e+148)
		tmp = t * ((x - y) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+154], t, If[LessEqual[y, -8.5e+44], t$95$1, If[LessEqual[y, 5.5e-270], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+75], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+142], t$95$1, If[LessEqual[y, 4.8e+148], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;y \leq 6 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.2000000000000001e154 or 4.79999999999999989e148 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.2000000000000001e154 < y < -8.5e44 or 1.59999999999999992e75 < y < 5.99999999999999949e142

    1. Initial program 99.8%

      \[\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. associate-/l*91.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{0 - \left(x - y\right)}}} \]
      4. associate--r-81.4%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(0 - x\right) + y}}} \]
      5. neg-sub081.4%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right)} + y}} \]
    9. Simplified81.4%

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

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

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

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

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

    if -8.5e44 < y < 5.4999999999999996e-270

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

    if 5.4999999999999996e-270 < y < 1.59999999999999992e75

    1. Initial program 97.2%

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

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

    if 5.99999999999999949e142 < y < 4.79999999999999989e148

    1. Initial program 98.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+154}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{+44}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-270}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+142}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+148}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 59.6% accurate, 0.3× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -7.19999999999999993e49 or 1.84999999999999993e118 < y

    1. Initial program 99.7%

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

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

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

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

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

    if -7.19999999999999993e49 < y < -6.1999999999999999e-61

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999999e-61 < y < 7.6000000000000004e-296

    1. Initial program 89.7%

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

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

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

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

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

    if 7.6000000000000004e-296 < y < 1.59999999999999992e75

    1. Initial program 94.9%

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

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

    if 1.59999999999999992e75 < y < 1.84999999999999993e118

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    12. Step-by-step derivation
      1. mul-1-neg57.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+49}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{-61}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-296}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+118}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 69.5% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.1000000000000002e158 or 1.2500000000000001e127 < y

    1. Initial program 99.7%

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

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

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

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

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

    if -3.1000000000000002e158 < y < -7.5999999999999998e46 or 1.10000000000000008e56 < y < 1.2500000000000001e127

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{0 - \left(x - y\right)}}} \]
      4. associate--r-78.2%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(0 - x\right) + y}}} \]
      5. neg-sub078.2%

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

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

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

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

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

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

    if -7.5999999999999998e46 < y < 1.10000000000000008e56

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+158}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{+46}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+56}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+127}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.8% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.32000000000000008e157 or 1.40000000000000003e121 < y

    1. Initial program 99.7%

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

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

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

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

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

    if -2.32000000000000008e157 < y < -2.64999999999999996e45

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{0 - \left(x - y\right)}}} \]
      4. associate--r-73.3%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(0 - x\right) + y}}} \]
      5. neg-sub073.3%

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

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

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

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

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

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

    if -2.64999999999999996e45 < y < 6.99999999999999987e-270

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

    if 6.99999999999999987e-270 < y < 1.40000000000000003e121

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.32 \cdot 10^{+157}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{+45}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-270}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+121}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{y - z}\\ \mathbf{if}\;y \leq -1.75 \cdot 10^{+152}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{+44}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-271}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+98}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ y (- y z)))))
   (if (<= y -1.75e+152)
     t_1
     (if (<= y -9.5e+44)
       (* (- y x) (/ t y))
       (if (<= y 1.4e-271)
         (* (- x y) (/ t z))
         (if (<= y 1.4e+98) (* t (/ x (- z y))) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (y / (y - z));
	double tmp;
	if (y <= -1.75e+152) {
		tmp = t_1;
	} else if (y <= -9.5e+44) {
		tmp = (y - x) * (t / y);
	} else if (y <= 1.4e-271) {
		tmp = (x - y) * (t / z);
	} else if (y <= 1.4e+98) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (y - z))
    if (y <= (-1.75d+152)) then
        tmp = t_1
    else if (y <= (-9.5d+44)) then
        tmp = (y - x) * (t / y)
    else if (y <= 1.4d-271) then
        tmp = (x - y) * (t / z)
    else if (y <= 1.4d+98) then
        tmp = t * (x / (z - y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * (y / (y - z));
	double tmp;
	if (y <= -1.75e+152) {
		tmp = t_1;
	} else if (y <= -9.5e+44) {
		tmp = (y - x) * (t / y);
	} else if (y <= 1.4e-271) {
		tmp = (x - y) * (t / z);
	} else if (y <= 1.4e+98) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (y / (y - z))
	tmp = 0
	if y <= -1.75e+152:
		tmp = t_1
	elif y <= -9.5e+44:
		tmp = (y - x) * (t / y)
	elif y <= 1.4e-271:
		tmp = (x - y) * (t / z)
	elif y <= 1.4e+98:
		tmp = t * (x / (z - y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(y / Float64(y - z)))
	tmp = 0.0
	if (y <= -1.75e+152)
		tmp = t_1;
	elseif (y <= -9.5e+44)
		tmp = Float64(Float64(y - x) * Float64(t / y));
	elseif (y <= 1.4e-271)
		tmp = Float64(Float64(x - y) * Float64(t / z));
	elseif (y <= 1.4e+98)
		tmp = Float64(t * Float64(x / Float64(z - y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (y / (y - z));
	tmp = 0.0;
	if (y <= -1.75e+152)
		tmp = t_1;
	elseif (y <= -9.5e+44)
		tmp = (y - x) * (t / y);
	elseif (y <= 1.4e-271)
		tmp = (x - y) * (t / z);
	elseif (y <= 1.4e+98)
		tmp = t * (x / (z - y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e+152], t$95$1, If[LessEqual[y, -9.5e+44], N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e-271], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+98], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.74999999999999991e152 or 1.4e98 < y

    1. Initial program 99.7%

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

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

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

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

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

    if -1.74999999999999991e152 < y < -9.5000000000000004e44

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{0 - \left(x - y\right)}}} \]
      4. associate--r-77.5%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(0 - x\right) + y}}} \]
      5. neg-sub077.5%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right)} + y}} \]
    9. Simplified77.5%

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

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

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

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

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

    if -9.5000000000000004e44 < y < 1.3999999999999999e-271

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

    if 1.3999999999999999e-271 < y < 1.4e98

    1. Initial program 97.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+152}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{+44}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-271}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+98}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 72.8% accurate, 0.3× speedup?

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

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

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

    if -1.74999999999999991e152 < y < -1.50000000000000012e46

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{0 - \left(x - y\right)}}} \]
      4. associate--r-77.5%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(0 - x\right) + y}}} \]
      5. neg-sub077.5%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right)} + y}} \]
    9. Simplified77.5%

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

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

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

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

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

    if -1.50000000000000012e46 < y < 1.02000000000000002e-269

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

    if 1.02000000000000002e-269 < y < 6.29999999999999982e98

    1. Initial program 97.5%

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

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

    if 6.29999999999999982e98 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+152}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+46}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-269}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 6.3 \cdot 10^{+98}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{y - z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.1% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.8000000000000002e48 or 5.4999999999999998e121 < y

    1. Initial program 99.7%

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

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

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

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

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

    if -7.8000000000000002e48 < y < -1.02e-113

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02e-113 < y < 1.59999999999999992e75

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999992e75 < y < 5.4999999999999998e121

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    12. Step-by-step derivation
      1. mul-1-neg57.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{+48}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-113}:\\ \;\;\;\;y \cdot \frac{t}{-z}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+75}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+121}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.8% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.8e45 or 9.5999999999999996e117 < y

    1. Initial program 99.7%

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

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

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

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

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

    if -1.8e45 < y < 1.59999999999999992e75

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999992e75 < y < 9.5999999999999996e117

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    12. Step-by-step derivation
      1. mul-1-neg57.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+75}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{+117}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 66.1% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4e46 or 1.99999999999999993e118 < y

    1. Initial program 99.7%

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

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

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

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

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

    if -4e46 < y < 5.5000000000000003e73

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

    if 5.5000000000000003e73 < y < 1.99999999999999993e118

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 60.4% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.41999999999999994e50 or 1.00000000000000004e42 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.41999999999999994e50 < y < -1.02e-113

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02e-113 < y < 1.00000000000000004e42

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 90.2% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

    if -1.36000000000000012e182 < y < 1.5000000000000001e127

    1. Initial program 94.8%

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

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

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

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

    if 1.5000000000000001e127 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 71.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-93} \lor \neg \left(z \leq 3.5 \cdot 10^{-21}\right):\\
\;\;\;\;t \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5999999999999999e-93 or 3.5000000000000003e-21 < z

    1. Initial program 97.1%

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

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

    if -1.5999999999999999e-93 < z < 3.5000000000000003e-21

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-93} \lor \neg \left(z \leq 3.5 \cdot 10^{-21}\right):\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t \cdot x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 71.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-93}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.5999999999999999e-93

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.5999999999999999e-93 < z < 6.4000000000000003e-21

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4000000000000003e-21 < z

    1. Initial program 96.9%

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

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

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

Alternative 15: 72.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-93}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.5999999999999999e-93

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.5999999999999999e-93 < z < 1.06e-20

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{0 - \left(x - y\right)}}} \]
      4. associate--r-80.0%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(0 - x\right) + y}}} \]
      5. neg-sub080.0%

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right)} + y}} \]
    9. Simplified80.0%

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

    if 1.06e-20 < z

    1. Initial program 96.9%

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

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

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

Alternative 16: 60.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.23999999999999998e45 or 1.35e42 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.23999999999999998e45 < y < 1.35e42

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.24 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 62.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.2999999999999998e46 or 8.00000000000000005e41 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -3.2999999999999998e46 < y < 8.00000000000000005e41

    1. Initial program 93.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{+46}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 62.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.7999999999999999e46 or 2.1e41 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -3.7999999999999999e46 < y < 2.1e41

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+46}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+41}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 35.0% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.00000000000000022e210

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{t}{y} \]
      7. add-sqr-sqrt23.3%

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

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

    if -3.00000000000000022e210 < x

    1. Initial program 95.7%

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

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

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

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

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

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

Alternative 20: 96.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 21: 35.2% accurate, 9.0× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification32.3%

    \[\leadsto t \]
  7. Add Preprocessing

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

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

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