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

Percentage Accurate: 96.9% → 96.9%
Time: 10.1s
Alternatives: 11
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 11 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.9% 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.9% 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 98.3%

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

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

Alternative 2: 68.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+127}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{+103} \lor \neg \left(y \leq -3.7 \cdot 10^{+66}\right) \land y \leq 1.35 \cdot 10^{+106}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -4e+127)
   t
   (if (or (<= y -2.65e+103) (and (not (<= y -3.7e+66)) (<= y 1.35e+106)))
     (* t (/ x (- z y)))
     t)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4e+127) {
		tmp = t;
	} else if ((y <= -2.65e+103) || (!(y <= -3.7e+66) && (y <= 1.35e+106))) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-4d+127)) then
        tmp = t
    else if ((y <= (-2.65d+103)) .or. (.not. (y <= (-3.7d+66))) .and. (y <= 1.35d+106)) then
        tmp = t * (x / (z - y))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4e+127) {
		tmp = t;
	} else if ((y <= -2.65e+103) || (!(y <= -3.7e+66) && (y <= 1.35e+106))) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -4e+127:
		tmp = t
	elif (y <= -2.65e+103) or (not (y <= -3.7e+66) and (y <= 1.35e+106)):
		tmp = t * (x / (z - y))
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -4e+127)
		tmp = t;
	elseif ((y <= -2.65e+103) || (!(y <= -3.7e+66) && (y <= 1.35e+106)))
		tmp = Float64(t * Float64(x / Float64(z - y)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -4e+127)
		tmp = t;
	elseif ((y <= -2.65e+103) || (~((y <= -3.7e+66)) && (y <= 1.35e+106)))
		tmp = t * (x / (z - y));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -4e+127], t, If[Or[LessEqual[y, -2.65e+103], And[N[Not[LessEqual[y, -3.7e+66]], $MachinePrecision], LessEqual[y, 1.35e+106]]], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.65 \cdot 10^{+103} \lor \neg \left(y \leq -3.7 \cdot 10^{+66}\right) \land y \leq 1.35 \cdot 10^{+106}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.99999999999999982e127 or -2.64999999999999985e103 < y < -3.7e66 or 1.35000000000000003e106 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -3.99999999999999982e127 < y < -2.64999999999999985e103 or -3.7e66 < y < 1.35000000000000003e106

    1. Initial program 97.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+127}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.65 \cdot 10^{+103} \lor \neg \left(y \leq -3.7 \cdot 10^{+66}\right) \land y \leq 1.35 \cdot 10^{+106}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;x \leq 3.4 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 8.6 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.3999999999999999e47

    1. Initial program 96.7%

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

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

    if -4.3999999999999999e47 < x < 3.3999999999999997e-20 or 1.09999999999999997e33 < x < 8.6000000000000002e67

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3999999999999997e-20 < x < 1.09999999999999997e33

    1. Initial program 99.3%

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

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

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

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

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

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

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

    if 8.6000000000000002e67 < x

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
      4. div-inv90.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.4 \cdot 10^{+47}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-20}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+33}:\\ \;\;\;\;\frac{x \cdot t}{z - y}\\ \mathbf{elif}\;x \leq 8.6 \cdot 10^{+67}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 61.2% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.2000000000000001e126 or -2.6e101 < y < -1.40000000000000006e48 or 2.2e46 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -8.2000000000000001e126 < y < -2.6e101

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000006e48 < y < 2.2e46

    1. Initial program 97.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{+101}:\\ \;\;\;\;\frac{x \cdot \left(-t\right)}{y}\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{+48}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+46}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 61.4% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.9999999999999994e126 or -3.2e104 < y < -1.95e48 or 1.70000000000000006e43 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -7.9999999999999994e126 < y < -3.2e104

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t}{\frac{y}{x}}} \]
    12. Simplified72.3%

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

    if -1.95e48 < y < 1.70000000000000006e43

    1. Initial program 97.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{+104}:\\ \;\;\;\;\frac{-t}{\frac{y}{x}}\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{+48}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 90.0% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.1999999999999996e165 < y < 2.9000000000000001e133

    1. Initial program 97.8%

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

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

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

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

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

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

    if 2.9000000000000001e133 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+165}:\\ \;\;\;\;\frac{-t}{\frac{z}{y} + -1}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+133}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{y}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.1 \cdot 10^{+47} \lor \neg \left(x \leq 3.9 \cdot 10^{-20}\right):\\
\;\;\;\;t \cdot \frac{x}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.1000000000000002e47 or 3.90000000000000007e-20 < x

    1. Initial program 97.6%

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

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

    if -7.1000000000000002e47 < x < 3.90000000000000007e-20

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 39.6% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.1e-111 or 4.1999999999999999e-141 < y

    1. Initial program 99.3%

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

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

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

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

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

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

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

    if -1.1e-111 < y < 4.1999999999999999e-141

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{-y}{z}} + 0 \]
      3. add-sqr-sqrt10.8%

        \[\leadsto t \cdot \frac{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}{z} + 0 \]
      4. sqrt-unprod21.2%

        \[\leadsto t \cdot \frac{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}{z} + 0 \]
      5. sqr-neg21.2%

        \[\leadsto t \cdot \frac{\sqrt{\color{blue}{y \cdot y}}}{z} + 0 \]
      6. sqrt-unprod10.8%

        \[\leadsto t \cdot \frac{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}{z} + 0 \]
      7. add-sqr-sqrt21.3%

        \[\leadsto t \cdot \frac{\color{blue}{y}}{z} + 0 \]
    10. Applied egg-rr21.3%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{z}} \]
    12. Simplified21.3%

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

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

Alternative 9: 60.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -6.9000000000000004e47 < y < 8.5e43

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 61.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25000000000000005e47 or 4.49999999999999995e48 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -1.25000000000000005e47 < y < 4.49999999999999995e48

    1. Initial program 97.2%

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

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

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

Alternative 11: 36.0% 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 98.3%

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

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

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

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

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

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

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

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 96.9% 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 2024034 
(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))