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

Percentage Accurate: 96.8% → 96.8%
Time: 11.8s
Alternatives: 17
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 17 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.8% 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.8% accurate, 1.0× speedup?

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

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

    \[\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*86.3%

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

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

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

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

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

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

Alternative 2: 71.6% accurate, 0.2× speedup?

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

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

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

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

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

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

\mathbf{elif}\;y \leq 10^{+154}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.7999999999999997e172 or 1.00000000000000004e154 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.7999999999999997e172 < y < -1.59999999999999996e39 or 3.00000000000000006e25 < y < 1.00000000000000004e154

    1. Initial program 99.7%

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

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

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

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

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

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

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

    if -1.59999999999999996e39 < y < -2.14999999999999992e-169

    1. Initial program 95.1%

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

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

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

    if -2.14999999999999992e-169 < y < 4.8e-72

    1. Initial program 90.5%

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

        \[\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. Taylor expanded in z around inf 82.7%

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

    if 4.8e-72 < y < 3.00000000000000006e25

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+172}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{+39}:\\ \;\;\;\;\frac{t \cdot y}{y - z}\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-169}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-72}:\\ \;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+25}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 10^{+154}:\\ \;\;\;\;\frac{t \cdot y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 71.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t}{y - z}\\ \mathbf{if}\;y \leq -6.4 \cdot 10^{+183}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.04 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.75 \cdot 10^{-170}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-72}:\\ \;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+174}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ t (- y z)))))
   (if (<= y -6.4e+183)
     t
     (if (<= y -1.04e+40)
       t_1
       (if (<= y -2.75e-170)
         (/ (* t x) (- z y))
         (if (<= y 1.65e-72)
           (/ (* t (- x y)) z)
           (if (<= y 7.8e+31)
             (* t (/ x (- z y)))
             (if (<= y 3.9e+174) t_1 t))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (t / (y - z));
	double tmp;
	if (y <= -6.4e+183) {
		tmp = t;
	} else if (y <= -1.04e+40) {
		tmp = t_1;
	} else if (y <= -2.75e-170) {
		tmp = (t * x) / (z - y);
	} else if (y <= 1.65e-72) {
		tmp = (t * (x - y)) / z;
	} else if (y <= 7.8e+31) {
		tmp = t * (x / (z - y));
	} else if (y <= 3.9e+174) {
		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 * (t / (y - z))
    if (y <= (-6.4d+183)) then
        tmp = t
    else if (y <= (-1.04d+40)) then
        tmp = t_1
    else if (y <= (-2.75d-170)) then
        tmp = (t * x) / (z - y)
    else if (y <= 1.65d-72) then
        tmp = (t * (x - y)) / z
    else if (y <= 7.8d+31) then
        tmp = t * (x / (z - y))
    else if (y <= 3.9d+174) 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 * (t / (y - z));
	double tmp;
	if (y <= -6.4e+183) {
		tmp = t;
	} else if (y <= -1.04e+40) {
		tmp = t_1;
	} else if (y <= -2.75e-170) {
		tmp = (t * x) / (z - y);
	} else if (y <= 1.65e-72) {
		tmp = (t * (x - y)) / z;
	} else if (y <= 7.8e+31) {
		tmp = t * (x / (z - y));
	} else if (y <= 3.9e+174) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (t / (y - z))
	tmp = 0
	if y <= -6.4e+183:
		tmp = t
	elif y <= -1.04e+40:
		tmp = t_1
	elif y <= -2.75e-170:
		tmp = (t * x) / (z - y)
	elif y <= 1.65e-72:
		tmp = (t * (x - y)) / z
	elif y <= 7.8e+31:
		tmp = t * (x / (z - y))
	elif y <= 3.9e+174:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(t / Float64(y - z)))
	tmp = 0.0
	if (y <= -6.4e+183)
		tmp = t;
	elseif (y <= -1.04e+40)
		tmp = t_1;
	elseif (y <= -2.75e-170)
		tmp = Float64(Float64(t * x) / Float64(z - y));
	elseif (y <= 1.65e-72)
		tmp = Float64(Float64(t * Float64(x - y)) / z);
	elseif (y <= 7.8e+31)
		tmp = Float64(t * Float64(x / Float64(z - y)));
	elseif (y <= 3.9e+174)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (t / (y - z));
	tmp = 0.0;
	if (y <= -6.4e+183)
		tmp = t;
	elseif (y <= -1.04e+40)
		tmp = t_1;
	elseif (y <= -2.75e-170)
		tmp = (t * x) / (z - y);
	elseif (y <= 1.65e-72)
		tmp = (t * (x - y)) / z;
	elseif (y <= 7.8e+31)
		tmp = t * (x / (z - y));
	elseif (y <= 3.9e+174)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.4e+183], t, If[LessEqual[y, -1.04e+40], t$95$1, If[LessEqual[y, -2.75e-170], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e-72], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 7.8e+31], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+174], t$95$1, t]]]]]]]
\begin{array}{l}

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

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

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

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

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

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.4000000000000004e183 or 3.89999999999999981e174 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -6.4000000000000004e183 < y < -1.04e40 or 7.79999999999999999e31 < y < 3.89999999999999981e174

    1. Initial program 99.8%

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

        \[\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/77.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-inv100.0%

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

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

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

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

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

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

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

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

    if -1.04e40 < y < -2.75000000000000009e-170

    1. Initial program 95.1%

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

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

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

    if -2.75000000000000009e-170 < y < 1.65e-72

    1. Initial program 90.5%

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

        \[\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. Taylor expanded in z around inf 82.7%

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

    if 1.65e-72 < y < 7.79999999999999999e31

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{+183}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.04 \cdot 10^{+40}:\\ \;\;\;\;y \cdot \frac{t}{y - z}\\ \mathbf{elif}\;y \leq -2.75 \cdot 10^{-170}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-72}:\\ \;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+174}:\\ \;\;\;\;y \cdot \frac{t}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 88.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq -7.5 \cdot 10^{-277}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999999e190 < y < -7.49999999999999971e-277 or 6.80000000000000017e-140 < y < 5.1999999999999997e82

    1. Initial program 96.3%

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

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

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

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

    if -7.49999999999999971e-277 < y < 6.80000000000000017e-140

    1. Initial program 89.5%

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

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

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

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

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

    if 5.1999999999999997e82 < y

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+190}:\\ \;\;\;\;\frac{t}{\frac{y}{y - x}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-277}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{-140}:\\ \;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+82}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 69.1% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.5499999999999999e39 or 2.7500000000000001e48 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.5499999999999999e39 < y < 2.1000000000000001e-97

    1. Initial program 91.4%

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

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

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

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

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

    if 2.1000000000000001e-97 < y < 2.2e-69

    1. Initial program 99.7%

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

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

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

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

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

    if 2.2e-69 < y < 2.7500000000000001e48

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{+39}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-97}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-69}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{+48}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 68.5% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.2499999999999999e44 or 6.60000000000000027e44 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.2499999999999999e44 < y < -4.2999999999999998e-170

    1. Initial program 95.1%

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

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

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

    if -4.2999999999999998e-170 < y < 7.9999999999999997e-72

    1. Initial program 90.5%

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

        \[\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. Taylor expanded in z around inf 82.7%

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

    if 7.9999999999999997e-72 < y < 6.60000000000000027e44

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+44}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.3 \cdot 10^{-170}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-72}:\\ \;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{y - z}\\ \mathbf{if}\;y \leq -2.3 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-169}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-72}:\\ \;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+25}:\\ \;\;\;\;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 -2.3e+39)
     t_1
     (if (<= y -1.8e-169)
       (/ (* t x) (- z y))
       (if (<= y 2.15e-72)
         (/ (* t (- x y)) z)
         (if (<= y 2.3e+25) (* 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 <= -2.3e+39) {
		tmp = t_1;
	} else if (y <= -1.8e-169) {
		tmp = (t * x) / (z - y);
	} else if (y <= 2.15e-72) {
		tmp = (t * (x - y)) / z;
	} else if (y <= 2.3e+25) {
		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 <= (-2.3d+39)) then
        tmp = t_1
    else if (y <= (-1.8d-169)) then
        tmp = (t * x) / (z - y)
    else if (y <= 2.15d-72) then
        tmp = (t * (x - y)) / z
    else if (y <= 2.3d+25) 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 <= -2.3e+39) {
		tmp = t_1;
	} else if (y <= -1.8e-169) {
		tmp = (t * x) / (z - y);
	} else if (y <= 2.15e-72) {
		tmp = (t * (x - y)) / z;
	} else if (y <= 2.3e+25) {
		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 <= -2.3e+39:
		tmp = t_1
	elif y <= -1.8e-169:
		tmp = (t * x) / (z - y)
	elif y <= 2.15e-72:
		tmp = (t * (x - y)) / z
	elif y <= 2.3e+25:
		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 <= -2.3e+39)
		tmp = t_1;
	elseif (y <= -1.8e-169)
		tmp = Float64(Float64(t * x) / Float64(z - y));
	elseif (y <= 2.15e-72)
		tmp = Float64(Float64(t * Float64(x - y)) / z);
	elseif (y <= 2.3e+25)
		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 <= -2.3e+39)
		tmp = t_1;
	elseif (y <= -1.8e-169)
		tmp = (t * x) / (z - y);
	elseif (y <= 2.15e-72)
		tmp = (t * (x - y)) / z;
	elseif (y <= 2.3e+25)
		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, -2.3e+39], t$95$1, If[LessEqual[y, -1.8e-169], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e-72], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.3e+25], 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 -2.3 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.30000000000000012e39 or 2.2999999999999998e25 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.30000000000000012e39 < y < -1.80000000000000001e-169

    1. Initial program 95.1%

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

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

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

    if -1.80000000000000001e-169 < y < 2.1499999999999999e-72

    1. Initial program 90.5%

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

        \[\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. Taylor expanded in z around inf 82.7%

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

    if 2.1499999999999999e-72 < y < 2.2999999999999998e25

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+39}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-169}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-72}:\\ \;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+25}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.8% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.4999999999999999e34 or 2.15000000000000004e27 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -9.4999999999999999e34 < y < 3.4e-136

    1. Initial program 90.9%

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

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

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

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

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

    if 3.4e-136 < y < 2.15000000000000004e27

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-136}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+27}:\\ \;\;\;\;x \cdot \frac{t}{-y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.6% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.39999999999999992e36 or 1.2999999999999999e25 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.39999999999999992e36 < y < 1.40000000000000012e-135

    1. Initial program 90.9%

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

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

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

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

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

    if 1.40000000000000012e-135 < y < 1.2999999999999999e25

    1. Initial program 99.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+36}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-135}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+25}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 60.1% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.9999999999999999e31 or 1.0999999999999999e35 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.9999999999999999e31 < y < 1.40000000000000012e-135

    1. Initial program 90.9%

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

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

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

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

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

    if 1.40000000000000012e-135 < y < 1.0999999999999999e35

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+31}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-135}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+35}:\\ \;\;\;\;\frac{x \cdot \left(-t\right)}{y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 67.2% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.80000000000000014e71 or 6.3999999999999997e69 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -5.80000000000000014e71 < y < 6.3999999999999997e69

    1. Initial program 93.5%

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

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

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

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

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

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

Alternative 12: 69.6% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.2000000000000001e43 or 1.1499999999999999e47 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -8.2000000000000001e43 < y < 1.1499999999999999e47

    1. Initial program 93.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+43}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+47}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 39.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4e-99 or 8.4999999999999996e-10 < y

    1. Initial program 99.8%

      \[\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*83.8%

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

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

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

    if -1.4e-99 < y < 8.4999999999999996e-10

    1. Initial program 90.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{-z}} \]
      2. clear-num26.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 61.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.5 or 3.2000000000000003e45 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.5 < y < 3.2000000000000003e45

    1. Initial program 92.5%

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

        \[\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. Taylor expanded in y around 0 59.1%

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

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

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

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

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

Alternative 15: 62.3% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.5999999999999997e32 or 5.39999999999999991e47 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -3.5999999999999997e32 < y < 5.39999999999999991e47

    1. Initial program 93.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+32}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+47}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 96.8% 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 17: 35.4% accurate, 9.0× speedup?

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

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

    \[\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*86.3%

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification39.2%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 96.8% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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