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

Percentage Accurate: 96.9% → 96.9%
Time: 10.0s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 96.9% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 1.0× speedup?

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

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

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

Alternative 2: 70.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 4.9 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.5000000000000001e174 or 4.9000000000000002e92 < y

    1. Initial program 100.0%

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

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

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

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

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

    if -6.5000000000000001e174 < y < -1.9e-96 or 2.74999999999999987e-11 < y < 4.9000000000000002e92

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{0 - \left(z - y\right)}} \]
      10. sub-neg62.5%

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

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

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{\left(-\left(-y\right)\right)} - z} \]
      14. remove-double-neg62.5%

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

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

    if -1.9e-96 < y < 2.74999999999999987e-11

    1. Initial program 94.7%

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

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

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

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

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

Alternative 3: 59.0% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.59999999999999963e84 or 6.20000000000000021e-32 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -5.59999999999999963e84 < y < -1.65e-45

    1. Initial program 99.7%

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

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

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

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

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

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

    if -1.65e-45 < y < -5.79999999999999946e-138

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot \frac{t}{z - y}} \]
      7. distribute-rgt-neg-in74.6%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z - y}\right)} \]
      8. distribute-frac-neg274.6%

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{0 - \left(z - y\right)}} \]
      10. sub-neg74.6%

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999946e-138 < y < 6.20000000000000021e-32

    1. Initial program 94.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+84}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{-45}:\\ \;\;\;\;t \cdot \frac{-x}{y}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-138}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-32}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.0% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.5e85 or 4.2999999999999999e-32 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -1.5e85 < y < -3.1000000000000001e-46

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if -3.1000000000000001e-46 < y < -5.79999999999999946e-138

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot \frac{t}{z - y}} \]
      7. distribute-rgt-neg-in74.6%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z - y}\right)} \]
      8. distribute-frac-neg274.6%

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

        \[\leadsto y \cdot \frac{t}{\color{blue}{0 - \left(z - y\right)}} \]
      10. sub-neg74.6%

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999946e-138 < y < 4.2999999999999999e-32

    1. Initial program 94.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+85}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-46}:\\ \;\;\;\;\left(-x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-138}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{-32}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-45}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.7999999999999998e-45

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -4.7999999999999998e-45 < y < -1.8999999999999998e-238

    1. Initial program 95.1%

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

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

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

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

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

    if -1.8999999999999998e-238 < y < 1.18e-11

    1. Initial program 93.9%

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

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

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

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

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

    if 1.18e-11 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{-45}:\\ \;\;\;\;t \cdot \frac{y - x}{y}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-238}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.18 \cdot 10^{-11}:\\ \;\;\;\;\frac{x \cdot t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-43}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.00000000000000007e-43

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000007e-43 < y < -7.4000000000000003e-240

    1. Initial program 95.1%

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

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

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

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

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

    if -7.4000000000000003e-240 < y < 1.2199999999999999e-9

    1. Initial program 93.9%

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

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

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

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

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

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

    if 1.2199999999999999e-9 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{y - x}{y}\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-240}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-9}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 74.9% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.60000000000000004e-45

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.60000000000000004e-45 < y < -2.8999999999999999e-241

    1. Initial program 95.1%

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

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

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

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

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

    if -2.8999999999999999e-241 < y < 8.50000000000000007e-15

    1. Initial program 93.9%

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

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

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

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

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

    if 8.50000000000000007e-15 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{-45}:\\ \;\;\;\;t \cdot \frac{y - x}{y}\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-241}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-15}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.2% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.5000000000000004e84 or 5.6000000000000002e-36 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -5.5000000000000004e84 < y < -3.2000000000000001e-52

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if -3.2000000000000001e-52 < y < 5.6000000000000002e-36

    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*93.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+84}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-52}:\\ \;\;\;\;\left(-x\right) \cdot \frac{t}{y}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 90.4% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{t \cdot x}{y}\right) - -1 \cdot \frac{t \cdot z}{y}} \]
    6. Step-by-step derivation
      1. associate--l+84.2%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{t \cdot x}{y} - -1 \cdot \frac{t \cdot z}{y}\right)} \]
      2. distribute-lft-out--84.2%

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

        \[\leadsto t + -1 \cdot \color{blue}{\frac{t \cdot x - t \cdot z}{y}} \]
      4. mul-1-neg84.2%

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x - t \cdot z}{y}} \]
      6. div-sub84.2%

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

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

        \[\leadsto t - \left(t \cdot \frac{x}{y} - \color{blue}{t \cdot \frac{z}{y}}\right) \]
      9. distribute-lft-out--92.2%

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

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

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

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

    if -6.8000000000000002e156 < y < 2.3999999999999999e129

    1. Initial program 96.5%

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

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

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

    if 2.3999999999999999e129 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 73.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+27} \lor \neg \left(x \leq 3.2 \cdot 10^{+143}\right):\\
\;\;\;\;t \cdot \frac{x}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.60000000000000008e27 or 3.20000000000000016e143 < x

    1. Initial program 94.8%

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

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

    if -1.60000000000000008e27 < x < 3.20000000000000016e143

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 68.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq 0.075:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.0000000000000001e85 or 0.0749999999999999972 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -4.0000000000000001e85 < y < 0.0749999999999999972

    1. Initial program 95.5%

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

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

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

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

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

Alternative 12: 60.2% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.5999999999999998e-43 or 3.2000000000000002e-32 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -4.5999999999999998e-43 < y < 3.2000000000000002e-32

    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*93.2%

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

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

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

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

Alternative 13: 35.2% 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/86.9%

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

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

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

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

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

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

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

Reproduce

?
herbie shell --seed 2024146 
(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))