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

Percentage Accurate: 97.0% → 97.1%
Time: 10.3s
Alternatives: 15
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 15 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: 97.0% 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: 97.1% 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.6%

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

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

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

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

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

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

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

      \[\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}}} \]
  5. Applied egg-rr97.6%

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

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

Alternative 2: 84.3% accurate, 0.6× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.20000000000000007e-117 or 3.2000000000000001e-171 < t

    1. Initial program 98.3%

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

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

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

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

    if -1.20000000000000007e-117 < t < 1.0500000000000001e-238

    1. Initial program 94.4%

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

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

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

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

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

    if 1.0500000000000001e-238 < t < 3.2000000000000001e-171

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{-117}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-238}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-171}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \end{array} \]

Alternative 3: 59.3% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9.49999999999999951e126 or 4.20000000000000024e58 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -9.49999999999999951e126 < y < -2.25e-13

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if -2.25e-13 < y < -1.85000000000000003e-78

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.85000000000000003e-78 < y < 4.20000000000000024e58

    1. Initial program 94.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-13}:\\ \;\;\;\;\frac{-y}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-78}:\\ \;\;\;\;x \cdot \frac{-t}{y}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+58}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 59.5% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.2e126 or 7.2000000000000005e57 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -6.2e126 < y < -9.0000000000000002e-25

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if -9.0000000000000002e-25 < y < -7.6000000000000002e-79

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6000000000000002e-79 < y < 7.2000000000000005e57

    1. Initial program 94.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{-79}:\\ \;\;\;\;x \cdot \frac{-t}{y}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+57}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 73.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{-132} \lor \neg \left(x \leq 2.4 \cdot 10^{+34}\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 -3.4e-132) (not (<= x 2.4e+34)))
   (* t (/ x (- z y)))
   (* t (/ y (- y z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -3.4e-132) || !(x <= 2.4e+34)) {
		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 <= (-3.4d-132)) .or. (.not. (x <= 2.4d+34))) 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 <= -3.4e-132) || !(x <= 2.4e+34)) {
		tmp = t * (x / (z - y));
	} else {
		tmp = t * (y / (y - z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -3.4e-132) or not (x <= 2.4e+34):
		tmp = t * (x / (z - y))
	else:
		tmp = t * (y / (y - z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -3.4e-132) || !(x <= 2.4e+34))
		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 <= -3.4e-132) || ~((x <= 2.4e+34)))
		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, -3.4e-132], N[Not[LessEqual[x, 2.4e+34]], $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 -3.4 \cdot 10^{-132} \lor \neg \left(x \leq 2.4 \cdot 10^{+34}\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 < -3.39999999999999983e-132 or 2.39999999999999987e34 < x

    1. Initial program 97.1%

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

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

    if -3.39999999999999983e-132 < x < 2.39999999999999987e34

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{-132} \lor \neg \left(x \leq 2.4 \cdot 10^{+34}\right):\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]

Alternative 6: 74.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{-132} \lor \neg \left(x \leq 10^{+33}\right):\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= x -3.4e-132) (not (<= x 1e+33)))
   (/ t (/ (- z y) x))
   (* t (/ y (- y z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -3.4e-132) || !(x <= 1e+33)) {
		tmp = t / ((z - y) / x);
	} 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 <= (-3.4d-132)) .or. (.not. (x <= 1d+33))) then
        tmp = t / ((z - y) / x)
    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 <= -3.4e-132) || !(x <= 1e+33)) {
		tmp = t / ((z - y) / x);
	} else {
		tmp = t * (y / (y - z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x <= -3.4e-132) or not (x <= 1e+33):
		tmp = t / ((z - y) / x)
	else:
		tmp = t * (y / (y - z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -3.4e-132) || !(x <= 1e+33))
		tmp = Float64(t / Float64(Float64(z - y) / x));
	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 <= -3.4e-132) || ~((x <= 1e+33)))
		tmp = t / ((z - y) / x);
	else
		tmp = t * (y / (y - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.4e-132], N[Not[LessEqual[x, 1e+33]], $MachinePrecision]], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{-132} \lor \neg \left(x \leq 10^{+33}\right):\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.39999999999999983e-132 or 9.9999999999999995e32 < x

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

    if -3.39999999999999983e-132 < x < 9.9999999999999995e32

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{-132} \lor \neg \left(x \leq 10^{+33}\right):\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]

Alternative 7: 68.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.5000000000000006e126 or 1.5000000000000001e58 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -7.5000000000000006e126 < y < 1.5000000000000001e58

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 8: 65.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+58}:\\
\;\;\;\;\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 < -7.0000000000000005e126 or 4.8e58 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -7.0000000000000005e126 < y < 4.8e58

    1. Initial program 96.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+58}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 9: 68.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.40000000000000017e145 or 1.89999999999999995e119 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -4.40000000000000017e145 < y < 1.89999999999999995e119

    1. Initial program 96.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+145}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+119}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 10: 72.9% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.39999999999999983e-132

    1. Initial program 97.3%

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

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

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

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

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

    if -3.39999999999999983e-132 < x < 8.00000000000000043e32

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.00000000000000043e32 < x

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{-132}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \end{array} \]

Alternative 11: 58.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.5000000000000006e126 or 1.55e58 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -7.5000000000000006e126 < y < 1.55e58

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 60.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.79999999999999955e127 or 2.30000000000000002e58 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -6.79999999999999955e127 < y < 2.30000000000000002e58

    1. Initial program 96.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+127}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 60.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.4999999999999998e129 or 1.55e58 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.4999999999999998e129 < y < 1.55e58

    1. Initial program 96.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    6. Simplified59.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{+129}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+58}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 14: 97.0% 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.6%

    \[\frac{x - y}{z - y} \cdot t \]
  2. Final simplification97.6%

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

Alternative 15: 35.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.6%

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification32.8%

    \[\leadsto t \]

Developer target: 97.1% 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 2023196 
(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))