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

Percentage Accurate: 96.7% → 96.7%
Time: 9.7s
Alternatives: 17
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 17 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.7% 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.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
  7. Add Preprocessing

Alternative 2: 74.6% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.80000000000000028e-8 or 3.3000000000000001e66 < x

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

    if -3.80000000000000028e-8 < x < 7.80000000000000065e-61

    1. Initial program 95.8%

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

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

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

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

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

    if 7.80000000000000065e-61 < x < 8.4999999999999999e-6

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.4999999999999999e-6 < x < 3.3000000000000001e66

    1. Initial program 99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{-8}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-61}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{y - x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 65.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq 0.0023:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.00000000000000003e72 or 0.0023 < y < 4.89999999999999971e87 or 4.40000000000000033e128 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.00000000000000003e72 < y < 0.0023

    1. Initial program 96.1%

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

        \[\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 79.1%

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

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

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

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

    if 4.89999999999999971e87 < y < 4.40000000000000033e128

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{y}{x}}} \]
      2. distribute-neg-frac257.5%

        \[\leadsto \frac{t}{\color{blue}{\frac{y}{-x}}} \]
    10. Simplified57.5%

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

Alternative 4: 59.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq 0.0022:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{+84}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.2e54 or 0.00220000000000000013 < y < 1.49999999999999998e84 or 1.45e128 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -3.2e54 < y < 0.00220000000000000013

    1. Initial program 96.0%

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

        \[\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. Step-by-step derivation
      1. associate-*r/96.6%

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

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

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

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

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

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

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

    if 1.49999999999999998e84 < y < 1.45e128

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{y}{x}}} \]
      2. distribute-neg-frac257.5%

        \[\leadsto \frac{t}{\color{blue}{\frac{y}{-x}}} \]
    10. Simplified57.5%

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

Alternative 5: 59.9% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+88}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.24999999999999993e57 or 8.500000000000001e-5 < y < 1.2e88 or 9.80000000000000074e127 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.24999999999999993e57 < y < 8.500000000000001e-5

    1. Initial program 96.0%

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

        \[\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. Step-by-step derivation
      1. associate-*r/96.6%

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

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

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

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

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

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

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

    if 1.2e88 < y < 9.80000000000000074e127

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+57}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-5}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+88}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{+127}:\\ \;\;\;\;t \cdot \frac{-x}{y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 59.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 0.00175 \lor \neg \left(y \leq 7.6 \cdot 10^{+89}\right) \land y \leq 1.25 \cdot 10^{+126}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.90000000000000018e53 or 0.00175000000000000004 < y < 7.60000000000000047e89 or 1.24999999999999994e126 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -4.90000000000000018e53 < y < 0.00175000000000000004 or 7.60000000000000047e89 < y < 1.24999999999999994e126

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.9 \cdot 10^{+53}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 0.00175 \lor \neg \left(y \leq 7.6 \cdot 10^{+89}\right) \land y \leq 1.25 \cdot 10^{+126}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 59.4% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;y \leq 7.6 \cdot 10^{+89}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.2000000000000001e58 or 0.0023 < y < 7.60000000000000047e89 or 2.19999999999999999e126 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.2000000000000001e58 < y < 0.0023

    1. Initial program 96.0%

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

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

    if 7.60000000000000047e89 < y < 2.19999999999999999e126

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z}} \]
    6. Step-by-step derivation
      1. *-commutative30.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+58}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 0.0023:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+89}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 90.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+157} \lor \neg \left(y \leq 4.2 \cdot 10^{+136}\right):\\
\;\;\;\;t \cdot \frac{y}{y - z}\\

\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.9999999999999997e157 or 4.1999999999999998e136 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -8.9999999999999997e157 < y < 4.1999999999999998e136

    1. Initial program 97.0%

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

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

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

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

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

Alternative 9: 70.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{-8} \lor \neg \left(x \leq 2.5 \cdot 10^{-61}\right):\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.19999999999999999e-8 or 2.4999999999999999e-61 < x

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.19999999999999999e-8 < x < 2.4999999999999999e-61

    1. Initial program 95.8%

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

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

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

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

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

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

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

Alternative 10: 74.6% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.4000000000000003e-30

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

    if -3.4000000000000003e-30 < z < 2.19999999999999986e-15

    1. Initial program 98.9%

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

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

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

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

    if 2.19999999999999986e-15 < z

    1. Initial program 95.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-30}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-15}:\\ \;\;\;\;t \cdot \frac{y - x}{y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 68.5% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.59999999999999992e75 or 1.20000000000000003e134 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -1.59999999999999992e75 < y < 1.20000000000000003e134

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 68.5% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.4999999999999998e75 or 9.80000000000000074e127 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -3.4999999999999998e75 < y < 9.80000000000000074e127

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{+127}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 67.4% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.6799999999999999e75 or 9.19999999999999992e128 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -1.6799999999999999e75 < y < 9.19999999999999992e128

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.68 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+128}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 59.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -29:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -29 or 2.6499999999999999e-4 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -29 < y < 2.6499999999999999e-4

    1. Initial program 95.8%

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

        \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot t}{z - y}} \]
      2. associate-/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 y around 0 71.4%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z}} \]
    7. Simplified70.7%

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

Alternative 15: 37.4% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.6999999999999999e-28 or 3.00000000000000008e-5 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -2.6999999999999999e-28 < y < 3.00000000000000008e-5

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{-z}{t}}} \]
      3. add-sqr-sqrt19.2%

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

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

        \[\leadsto \frac{y}{\frac{\sqrt{\color{blue}{z \cdot z}}}{t}} \]
      6. sqrt-unprod9.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{t}} \]
      7. add-sqr-sqrt24.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{z}}{t}} \]
    12. Applied egg-rr24.2%

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

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

        \[\leadsto \frac{y}{z} \cdot \color{blue}{\frac{t}{1}} \]
      3. times-frac23.6%

        \[\leadsto \color{blue}{\frac{y \cdot t}{z \cdot 1}} \]
      4. *-rgt-identity23.6%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{z}} \]
    14. Simplified25.5%

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{z}} \]
    17. Simplified23.5%

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

Alternative 16: 96.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 17: 34.7% accurate, 9.0× speedup?

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

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

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

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

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

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

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

Developer target: 96.7% 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 2024087 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

  :alt
  (/ t (/ (- z y) (- x y)))

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