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

Percentage Accurate: 96.8% → 96.8%
Time: 7.8s
Alternatives: 9
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 9 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 96.8% accurate, 1.0× speedup?

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

\\
\frac{x - y}{z - y} \cdot t
\end{array}

Alternative 1: 96.8% accurate, 1.0× speedup?

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

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

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

Alternative 2: 67.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq -145000000000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.0499999999999999e74 or 3.4e45 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -1.0499999999999999e74 < y < -1.45e11 or 5.50000000000000053e-66 < y < 3.4e45

    1. Initial program 97.5%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot t}{z - y}} \]
      2. associate-/l*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}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 72.4%

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

    if -1.45e11 < y < 5.50000000000000053e-66

    1. Initial program 94.8%

      \[\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. associate-/l*95.5%

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

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

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

Alternative 3: 74.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -27500000000:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.75e10

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \frac{y}{0 - \color{blue}{\left(\left(-y\right) + z\right)}} \cdot t \]
      6. associate--r+80.9%

        \[\leadsto \frac{y}{\color{blue}{\left(0 - \left(-y\right)\right) - z}} \cdot t \]
      7. neg-sub080.9%

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

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

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

    if -2.75e10 < y < 1.14999999999999996e-66

    1. Initial program 94.8%

      \[\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. associate-/l*95.5%

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

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

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

    if 1.14999999999999996e-66 < y < 9.5000000000000004e43

    1. Initial program 96.2%

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

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

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

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

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

    if 9.5000000000000004e43 < y

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \frac{0 - \color{blue}{\left(\left(-y\right) + x\right)}}{y} \cdot t \]
      6. associate--r+84.0%

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

        \[\leadsto \frac{\color{blue}{\left(-\left(-y\right)\right)} - x}{y} \cdot t \]
      8. remove-double-neg84.0%

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

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

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

Alternative 4: 89.9% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{0 - \left(x - y\right)}}{y} \cdot t \]
      4. sub-neg96.0%

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

        \[\leadsto \frac{0 - \color{blue}{\left(\left(-y\right) + x\right)}}{y} \cdot t \]
      6. associate--r+96.0%

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

        \[\leadsto \frac{\color{blue}{\left(-\left(-y\right)\right)} - x}{y} \cdot t \]
      8. remove-double-neg96.0%

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

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

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

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

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

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

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

    if -3.50000000000000026e160 < y < 3.14999999999999985e103

    1. Initial program 96.3%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot t}{z - y}} \]
      2. associate-/l*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}} \]
    4. Add Preprocessing

    if 3.14999999999999985e103 < y

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \frac{y}{0 - \color{blue}{\left(\left(-y\right) + z\right)}} \cdot t \]
      6. associate--r+83.9%

        \[\leadsto \frac{y}{\color{blue}{\left(0 - \left(-y\right)\right) - z}} \cdot t \]
      7. neg-sub083.9%

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

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

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

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

Alternative 5: 75.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -135000000000 \lor \neg \left(y \leq 1.55 \cdot 10^{-46}\right):\\
\;\;\;\;t \cdot \frac{y}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35e11 or 1.55e-46 < y

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \frac{y}{0 - \color{blue}{\left(\left(-y\right) + z\right)}} \cdot t \]
      6. associate--r+75.7%

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

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

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

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

    if -1.35e11 < y < 1.55e-46

    1. Initial program 94.1%

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

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

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

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

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

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

Alternative 6: 68.2% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.79999999999999949e68 or 1.94999999999999985e42 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -8.79999999999999949e68 < y < 1.94999999999999985e42

    1. Initial program 95.5%

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

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

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

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

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

Alternative 7: 61.2% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.80000000000000037e68 or 2.7e41 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -7.80000000000000037e68 < y < 2.7e41

    1. Initial program 95.5%

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

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

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

Alternative 8: 60.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25000000000000009e69 or 1.09999999999999995e41 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -1.25000000000000009e69 < y < 1.09999999999999995e41

    1. Initial program 95.5%

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

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

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

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

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

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

Alternative 9: 35.0% accurate, 9.0× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Add Preprocessing

Developer Target 1: 96.8% accurate, 1.0× speedup?

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

\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}

Reproduce

?
herbie shell --seed 2024132 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

  :alt
  (! :herbie-platform default (/ t (/ (- z y) (- x y))))

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