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

Percentage Accurate: 96.8% → 96.8%
Time: 11.9s
Alternatives: 10
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 10 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{x - y}{z - y} \cdot t \end{array} \]
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
	return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t):
	return ((x - y) / (z - y)) * t
function code(x, y, z, t)
	return Float64(Float64(Float64(x - y) / Float64(z - y)) * t)
end
function tmp = code(x, y, z, t)
	tmp = ((x - y) / (z - y)) * t;
end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}

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

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

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

Alternative 2: 69.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{x}{z - y}\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{+25}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.45 \cdot 10^{-150}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.28 \cdot 10^{-217}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+182}:\\ \;\;\;\;y \cdot \frac{t}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ x (- z y)))))
   (if (<= y -5.4e+25)
     t
     (if (<= y -4.45e-150)
       t_1
       (if (<= y -1.28e-217)
         (* (- x y) (/ t z))
         (if (<= y 4.2e+34)
           t_1
           (if (<= y 1.65e+182) (* y (/ t (- y z))) t)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (x / (z - y));
	double tmp;
	if (y <= -5.4e+25) {
		tmp = t;
	} else if (y <= -4.45e-150) {
		tmp = t_1;
	} else if (y <= -1.28e-217) {
		tmp = (x - y) * (t / z);
	} else if (y <= 4.2e+34) {
		tmp = t_1;
	} else if (y <= 1.65e+182) {
		tmp = y * (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) :: t_1
    real(8) :: tmp
    t_1 = t * (x / (z - y))
    if (y <= (-5.4d+25)) then
        tmp = t
    else if (y <= (-4.45d-150)) then
        tmp = t_1
    else if (y <= (-1.28d-217)) then
        tmp = (x - y) * (t / z)
    else if (y <= 4.2d+34) then
        tmp = t_1
    else if (y <= 1.65d+182) then
        tmp = y * (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 t_1 = t * (x / (z - y));
	double tmp;
	if (y <= -5.4e+25) {
		tmp = t;
	} else if (y <= -4.45e-150) {
		tmp = t_1;
	} else if (y <= -1.28e-217) {
		tmp = (x - y) * (t / z);
	} else if (y <= 4.2e+34) {
		tmp = t_1;
	} else if (y <= 1.65e+182) {
		tmp = y * (t / (y - z));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (x / (z - y))
	tmp = 0
	if y <= -5.4e+25:
		tmp = t
	elif y <= -4.45e-150:
		tmp = t_1
	elif y <= -1.28e-217:
		tmp = (x - y) * (t / z)
	elif y <= 4.2e+34:
		tmp = t_1
	elif y <= 1.65e+182:
		tmp = y * (t / (y - z))
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(x / Float64(z - y)))
	tmp = 0.0
	if (y <= -5.4e+25)
		tmp = t;
	elseif (y <= -4.45e-150)
		tmp = t_1;
	elseif (y <= -1.28e-217)
		tmp = Float64(Float64(x - y) * Float64(t / z));
	elseif (y <= 4.2e+34)
		tmp = t_1;
	elseif (y <= 1.65e+182)
		tmp = Float64(y * Float64(t / Float64(y - z)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (x / (z - y));
	tmp = 0.0;
	if (y <= -5.4e+25)
		tmp = t;
	elseif (y <= -4.45e-150)
		tmp = t_1;
	elseif (y <= -1.28e-217)
		tmp = (x - y) * (t / z);
	elseif (y <= 4.2e+34)
		tmp = t_1;
	elseif (y <= 1.65e+182)
		tmp = y * (t / (y - z));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.4e+25], t, If[LessEqual[y, -4.45e-150], t$95$1, If[LessEqual[y, -1.28e-217], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+34], t$95$1, If[LessEqual[y, 1.65e+182], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.45 \cdot 10^{-150}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.4e25 or 1.65e182 < y

    1. Initial program 99.9%

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

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

    if -5.4e25 < y < -4.45000000000000005e-150 or -1.28e-217 < y < 4.20000000000000035e34

    1. Initial program 97.6%

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

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

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

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

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

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

    if -4.45000000000000005e-150 < y < -1.28e-217

    1. Initial program 83.3%

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

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

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

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

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

    if 4.20000000000000035e34 < y < 1.65e182

    1. Initial program 99.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r/92.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{\frac{z - y}{t}}} \]
    8. Step-by-step derivation
      1. frac-2neg69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.4 \cdot 10^{+25}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.45 \cdot 10^{-150}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq -1.28 \cdot 10^{-217}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+182}:\\ \;\;\;\;y \cdot \frac{t}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 59.3% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;y \leq -2 \cdot 10^{-73}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.6e52 or -3.5 < y < -1.99999999999999999e-73 or 7.79999999999999969e108 < y

    1. Initial program 99.8%

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

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

    if -4.6e52 < y < -3.5

    1. Initial program 100.0%

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

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

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

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

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

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

    if -1.99999999999999999e-73 < y < 4.00000000000000013e-308

    1. Initial program 92.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r/97.8%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x - y}{z - y}}{\frac{1}{t}}} \]
    4. Applied egg-rr92.3%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    7. Simplified81.7%

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

    if 4.00000000000000013e-308 < y < 7.79999999999999969e108

    1. Initial program 97.7%

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

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

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

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

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

Alternative 4: 66.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t}{y - z}\\ \mathbf{if}\;y \leq -1.75 \cdot 10^{+229}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-19}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+183}:\\ \;\;\;\;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 -1.75e+229)
     t
     (if (<= y -1.55e-73)
       t_1
       (if (<= y 7.6e-19) (/ t (/ z x)) (if (<= y 1.15e+183) t_1 t))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (t / (y - z));
	double tmp;
	if (y <= -1.75e+229) {
		tmp = t;
	} else if (y <= -1.55e-73) {
		tmp = t_1;
	} else if (y <= 7.6e-19) {
		tmp = t / (z / x);
	} else if (y <= 1.15e+183) {
		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 <= (-1.75d+229)) then
        tmp = t
    else if (y <= (-1.55d-73)) then
        tmp = t_1
    else if (y <= 7.6d-19) then
        tmp = t / (z / x)
    else if (y <= 1.15d+183) 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 <= -1.75e+229) {
		tmp = t;
	} else if (y <= -1.55e-73) {
		tmp = t_1;
	} else if (y <= 7.6e-19) {
		tmp = t / (z / x);
	} else if (y <= 1.15e+183) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (t / (y - z))
	tmp = 0
	if y <= -1.75e+229:
		tmp = t
	elif y <= -1.55e-73:
		tmp = t_1
	elif y <= 7.6e-19:
		tmp = t / (z / x)
	elif y <= 1.15e+183:
		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 <= -1.75e+229)
		tmp = t;
	elseif (y <= -1.55e-73)
		tmp = t_1;
	elseif (y <= 7.6e-19)
		tmp = Float64(t / Float64(z / x));
	elseif (y <= 1.15e+183)
		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 <= -1.75e+229)
		tmp = t;
	elseif (y <= -1.55e-73)
		tmp = t_1;
	elseif (y <= 7.6e-19)
		tmp = t / (z / x);
	elseif (y <= 1.15e+183)
		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, -1.75e+229], t, If[LessEqual[y, -1.55e-73], t$95$1, If[LessEqual[y, 7.6e-19], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+183], t$95$1, t]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.55 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+183}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.7500000000000001e229 or 1.1499999999999999e183 < y

    1. Initial program 99.9%

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

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

    if -1.7500000000000001e229 < y < -1.54999999999999985e-73 or 7.6e-19 < y < 1.1499999999999999e183

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r/85.3%

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
      2. div-inv85.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{\frac{z - y}{t}}} \]
    8. Step-by-step derivation
      1. frac-2neg61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999985e-73 < y < 7.6e-19

    1. Initial program 95.2%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    5. Simplified72.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+229}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-73}:\\ \;\;\;\;y \cdot \frac{t}{y - z}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{-19}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+183}:\\ \;\;\;\;y \cdot \frac{t}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 65.5% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.7e229 or 9.3999999999999991e108 < y

    1. Initial program 99.8%

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

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

    if -2.7e229 < y < -1.42000000000000002e-70

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r/78.4%

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
      2. div-inv78.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{\frac{z - y}{t}}} \]
    8. Step-by-step derivation
      1. frac-2neg60.8%

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

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

        \[\leadsto \color{blue}{y} \cdot \frac{1}{-\frac{z - y}{t}} \]
      4. distribute-neg-frac60.6%

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

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

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

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

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

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

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

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

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

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

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

    if -1.42000000000000002e-70 < y < -5.50000000000000023e-129

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot t}}{y} \]
      4. distribute-lft-neg-in71.9%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{y}{-x}}} \]
    8. Simplified71.9%

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

    if -5.50000000000000023e-129 < y < 9.3999999999999991e108

    1. Initial program 95.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+229}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.42 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \frac{t}{y - z}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-129}:\\ \;\;\;\;\frac{t}{\frac{y}{-x}}\\ \mathbf{elif}\;y \leq 9.4 \cdot 10^{+108}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
t_2 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{-148}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 9.8 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.5499999999999999e-21 or 9.80000000000000027e33 < y

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t}{\frac{z - y}{y}}} \]
      4. div-sub81.5%

        \[\leadsto \frac{-t}{\color{blue}{\frac{z}{y} - \frac{y}{y}}} \]
      5. *-inverses81.5%

        \[\leadsto \frac{-t}{\frac{z}{y} - \color{blue}{1}} \]
    5. Simplified81.5%

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

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

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

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

        \[\leadsto t \cdot \frac{1}{-\color{blue}{\left(\frac{z}{y} + \left(-1\right)\right)}} \]
      5. metadata-eval81.4%

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

        \[\leadsto t \cdot \frac{1}{\color{blue}{\left(-\frac{z}{y}\right) + \left(--1\right)}} \]
      7. metadata-eval81.4%

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

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

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

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

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

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

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

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

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

    if -1.5499999999999999e-21 < y < -3.89999999999999994e-148 or -3.30000000000000023e-218 < y < 9.80000000000000027e33

    1. Initial program 97.4%

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

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

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

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

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

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

    if -3.89999999999999994e-148 < y < -3.30000000000000023e-218

    1. Initial program 83.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-21}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-148}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-218}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{+33}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.99999999999999999e-73 or 1.8499999999999999e33 < y

    1. Initial program 99.8%

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

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

    if -1.99999999999999999e-73 < y < 1.8499999999999999e33

    1. Initial program 95.4%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
      2. associate-/r/68.8%

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

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

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

Alternative 8: 61.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.00000000000000006e25 or 7.79999999999999969e108 < y

    1. Initial program 99.8%

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

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

    if -3.00000000000000006e25 < y < 7.79999999999999969e108

    1. Initial program 96.3%

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

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

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

Alternative 9: 61.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8499999999999999e25 or 7.79999999999999969e108 < y

    1. Initial program 99.8%

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

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

    if -1.8499999999999999e25 < y < 7.79999999999999969e108

    1. Initial program 96.3%

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

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

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

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

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

Alternative 10: 34.9% accurate, 9.0× speedup?

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

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

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification35.3%

    \[\leadsto t \]
  5. 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 2024031 
(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))