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

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

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

Initial Program: 96.9% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 1.0× speedup?

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

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

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

Alternative 2: 68.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+131}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.60000000000000026e126 or 3.60000000000000031e131 < y

    1. Initial program 100.0%

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

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

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

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

    if -6.60000000000000026e126 < y < 1.8000000000000002e-30

    1. Initial program 94.2%

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

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

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

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

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

    if 1.8000000000000002e-30 < y < 3.60000000000000031e131

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.8% accurate, 0.5× speedup?

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

\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 < -1.12e143 or 9.49999999999999979e168 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

        \[\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 z around 0 95.2%

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

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

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

        \[\leadsto \frac{t}{-\frac{y}{\color{blue}{\left(-y\right) + x}}} \]
      4. neg-sub095.2%

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

        \[\leadsto \frac{t}{-\frac{y}{\color{blue}{0 - \left(y - x\right)}}} \]
      6. neg-sub095.2%

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

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

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

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

    if -1.12e143 < y < 9.49999999999999979e168

    1. Initial program 95.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/91.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
  3. Recombined 2 regimes into one program.
  4. Final simplification93.6%

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

Alternative 4: 74.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+45} \lor \neg \left(y \leq 2.25 \cdot 10^{-30}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5e45 or 2.24999999999999984e-30 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -5e45 < y < 2.24999999999999984e-30

    1. Initial program 93.3%

      \[\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*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. Add Preprocessing
    5. Taylor expanded in x around inf 81.3%

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

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

Alternative 5: 74.5% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.9000000000000002e45 or 9.9999999999999995e32 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -4.9000000000000002e45 < y < 9.9999999999999995e32

    1. Initial program 93.8%

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

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

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

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

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

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

Alternative 6: 67.8% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.60000000000000026e126 or 3.4999999999999999e40 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -6.60000000000000026e126 < y < 3.4999999999999999e40

    1. Initial program 94.7%

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

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

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

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

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

Alternative 7: 61.2% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.29999999999999984e71 or 2.5500000000000001e38 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -4.29999999999999984e71 < y < 2.5500000000000001e38

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 61.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.39999999999999981e71 or 8.8000000000000009e34 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -2.39999999999999981e71 < y < 8.8000000000000009e34

    1. Initial program 94.2%

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

      \[\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 -2.4 \cdot 10^{+71}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.8% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.0400000000000001e70 or 2.35e38 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -1.0400000000000001e70 < y < 2.35e38

    1. Initial program 94.2%

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

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

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

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

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

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

Alternative 10: 35.1% accurate, 9.0× speedup?

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

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

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

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

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

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

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

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

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

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