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

Percentage Accurate: 97.1% → 97.0%
Time: 10.5s
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: 97.1% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% 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 96.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 65.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 0.00155 \lor \neg \left(y \leq 1.55 \cdot 10^{+86}\right) \land y \leq 3.9 \cdot 10^{+126}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.1000000000000001e150 or 0.00154999999999999995 < y < 1.5500000000000001e86 or 3.89999999999999993e126 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -5.1000000000000001e150 < y < 0.00154999999999999995 or 1.5500000000000001e86 < y < 3.89999999999999993e126

    1. Initial program 95.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.1 \cdot 10^{+150}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 0.00155 \lor \neg \left(y \leq 1.55 \cdot 10^{+86}\right) \land y \leq 3.9 \cdot 10^{+126}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 3: 65.7% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq 5.6 \cdot 10^{+85}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.4999999999999998e150 or 0.00154999999999999995 < y < 5.5999999999999998e85 or 1.79999999999999991e121 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -7.4999999999999998e150 < y < 0.00154999999999999995

    1. Initial program 95.1%

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

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

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

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

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

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

    if 5.5999999999999998e85 < y < 1.79999999999999991e121

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+150}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 0.00155:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+85}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+121}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 65.8% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+85}:\\
\;\;\;\;t + \frac{t}{\frac{y}{z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.4499999999999999e152 or 6.5000000000000004e117 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -1.4499999999999999e152 < y < 0.00154999999999999995

    1. Initial program 95.1%

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

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

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

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

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

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

    if 0.00154999999999999995 < y < 5.20000000000000021e85

    1. Initial program 99.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x - t \cdot z}{y}} \]
      6. distribute-lft-out--81.7%

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{t \cdot z}{y}} \]
    8. Step-by-step derivation
      1. sub-neg70.3%

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

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

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

        \[\leadsto t + \color{blue}{\frac{t}{\frac{y}{z}}} \]
    9. Simplified70.3%

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

    if 5.20000000000000021e85 < y < 6.5000000000000004e117

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+152}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 0.00155:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+85}:\\ \;\;\;\;t + \frac{t}{\frac{y}{z}}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+117}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 61.1% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;y \leq 6 \cdot 10^{+95}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.79999999999999957e37 or 1.29999999999999989e-4 < y < 5.99999999999999982e95 or 2e114 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -5.79999999999999957e37 < y < 1.29999999999999989e-4

    1. Initial program 94.6%

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

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

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

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

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

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

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

    if 5.99999999999999982e95 < y < 2e114

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 0.00013:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+95}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+114}:\\ \;\;\;\;-\frac{t}{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 89.9% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x - t \cdot z}{y}} \]
      6. distribute-lft-out--74.6%

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

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

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

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

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

    if -1.90000000000000003e129 < y < 2.4999999999999999e199

    1. Initial program 95.9%

      \[\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-*r/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}} \]

    if 2.4999999999999999e199 < y

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+129}:\\ \;\;\;\;t - \frac{t}{\frac{y}{x}}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+199}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z - y}\\ \end{array} \]

Alternative 7: 74.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+39} \lor \neg \left(y \leq 0.0012\right):\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.1000000000000001e39 or 0.00119999999999999989 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x - t \cdot z}{y}} \]
      6. distribute-lft-out--71.7%

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

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

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

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

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

    if -1.1000000000000001e39 < y < 0.00119999999999999989

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

Alternative 8: 74.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+37} \lor \neg \left(y \leq 0.0014\right):\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.99999999999999963e37 or 0.00139999999999999999 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x - t \cdot z}{y}} \]
      6. distribute-lft-out--71.7%

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

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

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

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

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

    if -7.99999999999999963e37 < y < 0.00139999999999999999

    1. Initial program 94.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{t}{z - y}} \]
    7. Step-by-step derivation
      1. clear-num81.4%

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

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

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

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

Alternative 9: 60.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

    if -6.3999999999999998e36 < y < 9.49999999999999998e-4

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 61.4% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.49999999999999974e36 or 1.15e-5 < y

    1. Initial program 99.8%

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

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

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

    if -9.49999999999999974e36 < y < 1.15e-5

    1. Initial program 94.6%

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

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

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

Alternative 11: 61.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.8%

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

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

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

    if -1.0999999999999999e40 < y < 8.49999999999999953e-4

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

Alternative 12: 97.1% 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 96.9%

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

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

Alternative 13: 35.6% 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 96.9%

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

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

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

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

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

    \[\leadsto t \]

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

  :herbie-target
  (/ t (/ (- z y) (- x y)))

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