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

Percentage Accurate: 97.3% → 97.6%
Time: 10.3s
Alternatives: 12
Speedup: 0.5×

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 12 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.3% 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.6% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 x y) (-.f64 z y)) < 1.00000000000000005e117

    1. Initial program 97.5%

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

    if 1.00000000000000005e117 < (/.f64 (-.f64 x y) (-.f64 z y))

    1. Initial program 77.7%

      \[\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. *-commutative99.9%

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

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

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

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

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

Alternative 2: 90.2% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

    if -1.7499999999999999e187 < y < 7.50000000000000001e163

    1. Initial program 94.7%

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

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

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

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

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

    if 7.50000000000000001e163 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+187}:\\ \;\;\;\;\frac{-t}{\frac{y}{x - y}}\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+163}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \end{array} \]

Alternative 3: 74.0% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 93.4%

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

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

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

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

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

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

    if -3.2e-13 < x < 1.80000000000000005e-58

    1. Initial program 96.4%

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

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

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

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

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

    if 1.80000000000000005e-58 < x

    1. Initial program 97.5%

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

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

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

Alternative 4: 75.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+26} \lor \neg \left(y \leq 1.7 \cdot 10^{+18}\right):\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35e26 or 1.7e18 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e26 < y < 1.7e18

    1. Initial program 92.6%

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

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

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

Alternative 5: 66.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 6.8 \cdot 10^{+100}:\\
\;\;\;\;\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 < -1.79999999999999988e29 or 6.79999999999999988e100 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -1.79999999999999988e29 < y < 6.79999999999999988e100

    1. Initial program 93.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+100}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 68.5% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.9e19 or 7.00000000000000004e73 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -1.9e19 < y < 7.00000000000000004e73

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

Alternative 7: 68.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.79999999999999988e29 or 9.49999999999999924e171 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -1.79999999999999988e29 < y < 9.49999999999999924e171

    1. Initial program 93.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+29}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+171}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 8: 74.6% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

    if -1.04999999999999997e-12 < x < 1.08e-57

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.08e-57 < x

    1. Initial program 97.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-12}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{-57}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \end{array} \]

Alternative 9: 73.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 93.4%

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

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

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

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

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

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

    if -3.8499999999999998e-13 < x < 8.49999999999999969e-63

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.49999999999999969e-63 < x

    1. Initial program 97.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.85 \cdot 10^{-13}:\\ \;\;\;\;\frac{x \cdot t}{z - y}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-63}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \end{array} \]

Alternative 10: 60.3% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.5e14 or 1.3500000000000001e-21 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -5.5e14 < y < 1.3500000000000001e-21

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+14}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-21}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 61.3% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5e17 or 1.3500000000000001e-21 < y

    1. Initial program 99.8%

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

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

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

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

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

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

    if -6.5e17 < y < 1.3500000000000001e-21

    1. Initial program 92.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+17}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-21}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 35.1% 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 95.8%

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

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

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

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

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

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

    \[\leadsto t \]

Developer target: 97.3% 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 2023308 
(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))