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

Percentage Accurate: 96.8% → 96.8%
Time: 9.6s
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 97.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 59.2% accurate, 0.3× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.39999999999999998e53 or 1.04999999999999997e132 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -3.39999999999999998e53 < y < -1.05e-69

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e-69 < y < 1.24999999999999993e33

    1. Initial program 95.2%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot t}{z - y}} \]
      2. associate-/l*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
    5. Step-by-step derivation
      1. associate-*r/90.8%

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

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

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

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

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

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

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

    if 1.24999999999999993e33 < y < 3.5999999999999997e83

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5999999999999997e83 < y < 1.04999999999999997e132

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+53}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-69}:\\ \;\;\;\;\left(-t\right) \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+33}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+83}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+132}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 65.6% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.55000000000000003e137 or 1.90000000000000003e132 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.55000000000000003e137 < y < -9.4999999999999994e-71

    1. Initial program 99.8%

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

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

    if -9.4999999999999994e-71 < y < 1.90000000000000003e132

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

Alternative 4: 66.8% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.79999999999999993e136 or 1.4999999999999999e132 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -6.79999999999999993e136 < y < -1.50000000000000003e-74

    1. Initial program 99.8%

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

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

    if -1.50000000000000003e-74 < y < 1.4999999999999999e132

    1. Initial program 95.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+136}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-74}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+132}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 70.9% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.3000000000000001e-42

    1. Initial program 97.1%

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

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

    if -4.3000000000000001e-42 < z < 1.0500000000000001e-183

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0500000000000001e-183 < z < 1.38e-27

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 1.38e-27 < z

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-183}:\\ \;\;\;\;t - \frac{t \cdot x}{y}\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{-27}:\\ \;\;\;\;\frac{t}{y} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 59.2% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.14e52 or 1.04999999999999997e132 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.14e52 < y < -6.3999999999999997e-74

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.3999999999999997e-74 < y < 1.04999999999999997e132

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 89.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+150} \lor \neg \left(y \leq 2.05 \cdot 10^{+139}\right):\\
\;\;\;\;\frac{t}{\frac{-z}{y} - -1}\\

\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.35000000000000002e150 or 2.0500000000000001e139 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{z}{y} + \left(-\frac{y}{y}\right)\right)}} \]
      4. *-inverses95.8%

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

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

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

    if -2.35000000000000002e150 < y < 2.0500000000000001e139

    1. Initial program 96.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{+150} \lor \neg \left(y \leq 2.05 \cdot 10^{+139}\right):\\ \;\;\;\;\frac{t}{\frac{-z}{y} - -1}\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 74.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;x \leq 1.18 \cdot 10^{-32}:\\
\;\;\;\;\frac{t}{\frac{-z}{y} - -1}\\

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


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

    1. Initial program 99.7%

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

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

    if -4.19999999999999972e92 < x < 1.17999999999999997e-32

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{z}{y} + \left(-\frac{y}{y}\right)\right)}} \]
      4. *-inverses79.8%

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

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \color{blue}{-1}\right)} \]
    9. Simplified79.8%

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

    if 1.17999999999999997e-32 < x

    1. Initial program 94.1%

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

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

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

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

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

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

Alternative 9: 72.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{-42} \lor \neg \left(z \leq 5.9 \cdot 10^{-27}\right):\\
\;\;\;\;t \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.25000000000000001e-42 or 5.8999999999999998e-27 < z

    1. Initial program 98.2%

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

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

    if -1.25000000000000001e-42 < z < 5.8999999999999998e-27

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 65.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{+132}:\\
\;\;\;\;\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 < -2.5e50 or 1.04999999999999997e132 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.5e50 < y < 1.04999999999999997e132

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

Alternative 11: 71.9% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 97.1%

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

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

    if -2.40000000000000003e-42 < z < 1.34999999999999994e-27

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.34999999999999994e-27 < z

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 74.3% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 99.7%

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

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

    if -4.19999999999999972e92 < x < 1.65999999999999997e-32

    1. Initial program 98.4%

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

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

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

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

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

    if 1.65999999999999997e-32 < x

    1. Initial program 94.1%

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

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

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

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

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

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

Alternative 13: 57.4% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.9000000000000001e-78 or 1.04999999999999997e132 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.9000000000000001e-78 < y < 1.04999999999999997e132

    1. Initial program 95.8%

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

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

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

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

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

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

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

Alternative 14: 58.7% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.9000000000000001e-78 or 1.04999999999999997e132 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.9000000000000001e-78 < y < 1.04999999999999997e132

    1. Initial program 95.8%

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

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

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

Alternative 15: 58.8% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.9000000000000001e-78 or 1.04999999999999997e132 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.9000000000000001e-78 < y < 1.04999999999999997e132

    1. Initial program 95.8%

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

        \[\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
    5. Step-by-step derivation
      1. associate-*r/90.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{-78}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+132}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \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 97.5%

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

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

Alternative 17: 34.8% 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. Step-by-step derivation
    1. associate-*l/82.9%

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification34.1%

    \[\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 2024078 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

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

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