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

Percentage Accurate: 96.7% → 96.9%
Time: 9.7s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 96.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.6 \cdot 10^{-49}:\\ \;\;\;\;\frac{t\_m \cdot \left(x - y\right)}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{x - y}{z - y}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5.6e-49)
    (/ (* t_m (- x y)) (- z y))
    (* t_m (/ (- x y) (- z y))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (t_m <= 5.6e-49) {
		tmp = (t_m * (x - y)) / (z - y);
	} else {
		tmp = t_m * ((x - y) / (z - y));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (t_m <= 5.6d-49) then
        tmp = (t_m * (x - y)) / (z - y)
    else
        tmp = t_m * ((x - y) / (z - y))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (t_m <= 5.6e-49) {
		tmp = (t_m * (x - y)) / (z - y);
	} else {
		tmp = t_m * ((x - y) / (z - y));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if t_m <= 5.6e-49:
		tmp = (t_m * (x - y)) / (z - y)
	else:
		tmp = t_m * ((x - y) / (z - y))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if (t_m <= 5.6e-49)
		tmp = Float64(Float64(t_m * Float64(x - y)) / Float64(z - y));
	else
		tmp = Float64(t_m * Float64(Float64(x - y) / Float64(z - y)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if (t_m <= 5.6e-49)
		tmp = (t_m * (x - y)) / (z - y);
	else
		tmp = t_m * ((x - y) / (z - y));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 5.6e-49], N[(N[(t$95$m * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.6 \cdot 10^{-49}:\\
\;\;\;\;\frac{t\_m \cdot \left(x - y\right)}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.59999999999999995e-49

    1. Initial program 95.5%

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

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

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

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

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

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

    if 5.59999999999999995e-49 < t

    1. Initial program 96.6%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification94.0%

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

Alternative 2: 73.9% accurate, 0.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := t\_m \cdot \frac{y}{y - z}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{-52}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-253}:\\ \;\;\;\;t\_m \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-189}:\\ \;\;\;\;\frac{t\_m \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+59}:\\ \;\;\;\;\frac{t\_m \cdot x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (/ y (- y z)))))
   (*
    t_s
    (if (<= y -1.2e-52)
      t_2
      (if (<= y -5.1e-253)
        (* t_m (/ x (- z y)))
        (if (<= y 1.35e-189)
          (/ (* t_m (- x y)) z)
          (if (<= y 8.5e+59) (/ (* t_m x) (- z y)) t_2)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double t_2 = t_m * (y / (y - z));
	double tmp;
	if (y <= -1.2e-52) {
		tmp = t_2;
	} else if (y <= -5.1e-253) {
		tmp = t_m * (x / (z - y));
	} else if (y <= 1.35e-189) {
		tmp = (t_m * (x - y)) / z;
	} else if (y <= 8.5e+59) {
		tmp = (t_m * x) / (z - y);
	} else {
		tmp = t_2;
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: t_2
    real(8) :: tmp
    t_2 = t_m * (y / (y - z))
    if (y <= (-1.2d-52)) then
        tmp = t_2
    else if (y <= (-5.1d-253)) then
        tmp = t_m * (x / (z - y))
    else if (y <= 1.35d-189) then
        tmp = (t_m * (x - y)) / z
    else if (y <= 8.5d+59) then
        tmp = (t_m * x) / (z - y)
    else
        tmp = t_2
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double t_2 = t_m * (y / (y - z));
	double tmp;
	if (y <= -1.2e-52) {
		tmp = t_2;
	} else if (y <= -5.1e-253) {
		tmp = t_m * (x / (z - y));
	} else if (y <= 1.35e-189) {
		tmp = (t_m * (x - y)) / z;
	} else if (y <= 8.5e+59) {
		tmp = (t_m * x) / (z - y);
	} else {
		tmp = t_2;
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	t_2 = t_m * (y / (y - z))
	tmp = 0
	if y <= -1.2e-52:
		tmp = t_2
	elif y <= -5.1e-253:
		tmp = t_m * (x / (z - y))
	elif y <= 1.35e-189:
		tmp = (t_m * (x - y)) / z
	elif y <= 8.5e+59:
		tmp = (t_m * x) / (z - y)
	else:
		tmp = t_2
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	t_2 = Float64(t_m * Float64(y / Float64(y - z)))
	tmp = 0.0
	if (y <= -1.2e-52)
		tmp = t_2;
	elseif (y <= -5.1e-253)
		tmp = Float64(t_m * Float64(x / Float64(z - y)));
	elseif (y <= 1.35e-189)
		tmp = Float64(Float64(t_m * Float64(x - y)) / z);
	elseif (y <= 8.5e+59)
		tmp = Float64(Float64(t_m * x) / Float64(z - y));
	else
		tmp = t_2;
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	t_2 = t_m * (y / (y - z));
	tmp = 0.0;
	if (y <= -1.2e-52)
		tmp = t_2;
	elseif (y <= -5.1e-253)
		tmp = t_m * (x / (z - y));
	elseif (y <= 1.35e-189)
		tmp = (t_m * (x - y)) / z;
	elseif (y <= 8.5e+59)
		tmp = (t_m * x) / (z - y);
	else
		tmp = t_2;
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := Block[{t$95$2 = N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -1.2e-52], t$95$2, If[LessEqual[y, -5.1e-253], N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-189], N[(N[(t$95$m * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 8.5e+59], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{y}{y - z}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -5.1 \cdot 10^{-253}:\\
\;\;\;\;t\_m \cdot \frac{x}{z - y}\\

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.2000000000000001e-52 or 8.4999999999999999e59 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.2000000000000001e-52 < y < -5.10000000000000008e-253

    1. Initial program 95.8%

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

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

    if -5.10000000000000008e-253 < y < 1.35e-189

    1. Initial program 88.5%

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

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

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

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

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

    if 1.35e-189 < y < 8.4999999999999999e59

    1. Initial program 94.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{-52}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-253}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-189}:\\ \;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+59}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.2% accurate, 0.4× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := t\_m \cdot \frac{y}{y - z}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-47}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-125}:\\ \;\;\;\;t\_m \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+57}:\\ \;\;\;\;\frac{t\_m \cdot x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (/ y (- y z)))))
   (*
    t_s
    (if (<= y -8.5e-47)
      t_2
      (if (<= y -3.7e-125)
        (* t_m (/ (- x y) z))
        (if (<= y 3.8e+57) (/ (* t_m x) (- z y)) t_2))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double t_2 = t_m * (y / (y - z));
	double tmp;
	if (y <= -8.5e-47) {
		tmp = t_2;
	} else if (y <= -3.7e-125) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= 3.8e+57) {
		tmp = (t_m * x) / (z - y);
	} else {
		tmp = t_2;
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: t_2
    real(8) :: tmp
    t_2 = t_m * (y / (y - z))
    if (y <= (-8.5d-47)) then
        tmp = t_2
    else if (y <= (-3.7d-125)) then
        tmp = t_m * ((x - y) / z)
    else if (y <= 3.8d+57) then
        tmp = (t_m * x) / (z - y)
    else
        tmp = t_2
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double t_2 = t_m * (y / (y - z));
	double tmp;
	if (y <= -8.5e-47) {
		tmp = t_2;
	} else if (y <= -3.7e-125) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= 3.8e+57) {
		tmp = (t_m * x) / (z - y);
	} else {
		tmp = t_2;
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	t_2 = t_m * (y / (y - z))
	tmp = 0
	if y <= -8.5e-47:
		tmp = t_2
	elif y <= -3.7e-125:
		tmp = t_m * ((x - y) / z)
	elif y <= 3.8e+57:
		tmp = (t_m * x) / (z - y)
	else:
		tmp = t_2
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	t_2 = Float64(t_m * Float64(y / Float64(y - z)))
	tmp = 0.0
	if (y <= -8.5e-47)
		tmp = t_2;
	elseif (y <= -3.7e-125)
		tmp = Float64(t_m * Float64(Float64(x - y) / z));
	elseif (y <= 3.8e+57)
		tmp = Float64(Float64(t_m * x) / Float64(z - y));
	else
		tmp = t_2;
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	t_2 = t_m * (y / (y - z));
	tmp = 0.0;
	if (y <= -8.5e-47)
		tmp = t_2;
	elseif (y <= -3.7e-125)
		tmp = t_m * ((x - y) / z);
	elseif (y <= 3.8e+57)
		tmp = (t_m * x) / (z - y);
	else
		tmp = t_2;
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := Block[{t$95$2 = N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -8.5e-47], t$95$2, If[LessEqual[y, -3.7e-125], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+57], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$2]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{y}{y - z}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-47}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -3.7 \cdot 10^{-125}:\\
\;\;\;\;t\_m \cdot \frac{x - y}{z}\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{+57}:\\
\;\;\;\;\frac{t\_m \cdot x}{z - y}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.4999999999999999e-47 or 3.7999999999999999e57 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999999e-47 < y < -3.6999999999999999e-125

    1. Initial program 95.0%

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

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

    if -3.6999999999999999e-125 < y < 3.7999999999999999e57

    1. Initial program 93.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-47}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-125}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+57}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 89.2% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+154} \lor \neg \left(y \leq 10^{+83}\right):\\ \;\;\;\;t\_m \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z - y}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= y -4.8e+154) (not (<= y 1e+83)))
    (* t_m (/ y (- y z)))
    (* (- x y) (/ t_m (- z y))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((y <= -4.8e+154) || !(y <= 1e+83)) {
		tmp = t_m * (y / (y - z));
	} else {
		tmp = (x - y) * (t_m / (z - y));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if ((y <= (-4.8d+154)) .or. (.not. (y <= 1d+83))) then
        tmp = t_m * (y / (y - z))
    else
        tmp = (x - y) * (t_m / (z - y))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((y <= -4.8e+154) || !(y <= 1e+83)) {
		tmp = t_m * (y / (y - z));
	} else {
		tmp = (x - y) * (t_m / (z - y));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if (y <= -4.8e+154) or not (y <= 1e+83):
		tmp = t_m * (y / (y - z))
	else:
		tmp = (x - y) * (t_m / (z - y))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if ((y <= -4.8e+154) || !(y <= 1e+83))
		tmp = Float64(t_m * Float64(y / Float64(y - z)));
	else
		tmp = Float64(Float64(x - y) * Float64(t_m / Float64(z - y)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if ((y <= -4.8e+154) || ~((y <= 1e+83)))
		tmp = t_m * (y / (y - z));
	else
		tmp = (x - y) * (t_m / (z - y));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[Or[LessEqual[y, -4.8e+154], N[Not[LessEqual[y, 1e+83]], $MachinePrecision]], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+154} \lor \neg \left(y \leq 10^{+83}\right):\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.8000000000000003e154 or 1.00000000000000003e83 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -4.8000000000000003e154 < y < 1.00000000000000003e83

    1. Initial program 94.6%

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

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

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

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

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

Alternative 5: 74.5% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{-55} \lor \neg \left(y \leq 1.95 \cdot 10^{+57}\right):\\ \;\;\;\;t\_m \cdot \frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{x}{z - y}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= y -6.5e-55) (not (<= y 1.95e+57)))
    (* t_m (/ y (- y z)))
    (* t_m (/ x (- z y))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((y <= -6.5e-55) || !(y <= 1.95e+57)) {
		tmp = t_m * (y / (y - z));
	} else {
		tmp = t_m * (x / (z - y));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if ((y <= (-6.5d-55)) .or. (.not. (y <= 1.95d+57))) then
        tmp = t_m * (y / (y - z))
    else
        tmp = t_m * (x / (z - y))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((y <= -6.5e-55) || !(y <= 1.95e+57)) {
		tmp = t_m * (y / (y - z));
	} else {
		tmp = t_m * (x / (z - y));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if (y <= -6.5e-55) or not (y <= 1.95e+57):
		tmp = t_m * (y / (y - z))
	else:
		tmp = t_m * (x / (z - y))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if ((y <= -6.5e-55) || !(y <= 1.95e+57))
		tmp = Float64(t_m * Float64(y / Float64(y - z)));
	else
		tmp = Float64(t_m * Float64(x / Float64(z - y)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if ((y <= -6.5e-55) || ~((y <= 1.95e+57)))
		tmp = t_m * (y / (y - z));
	else
		tmp = t_m * (x / (z - y));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[Or[LessEqual[y, -6.5e-55], N[Not[LessEqual[y, 1.95e+57]], $MachinePrecision]], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-55} \lor \neg \left(y \leq 1.95 \cdot 10^{+57}\right):\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.50000000000000006e-55 or 1.94999999999999984e57 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -6.50000000000000006e-55 < y < 1.94999999999999984e57

    1. Initial program 93.1%

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

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

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

Alternative 6: 74.7% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{+61} \lor \neg \left(y \leq 2.75 \cdot 10^{+41}\right):\\ \;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{x}{z - y}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= y -3.7e+61) (not (<= y 2.75e+41)))
    (* t_m (- 1.0 (/ x y)))
    (* t_m (/ x (- z y))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((y <= -3.7e+61) || !(y <= 2.75e+41)) {
		tmp = t_m * (1.0 - (x / y));
	} else {
		tmp = t_m * (x / (z - y));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if ((y <= (-3.7d+61)) .or. (.not. (y <= 2.75d+41))) then
        tmp = t_m * (1.0d0 - (x / y))
    else
        tmp = t_m * (x / (z - y))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((y <= -3.7e+61) || !(y <= 2.75e+41)) {
		tmp = t_m * (1.0 - (x / y));
	} else {
		tmp = t_m * (x / (z - y));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if (y <= -3.7e+61) or not (y <= 2.75e+41):
		tmp = t_m * (1.0 - (x / y))
	else:
		tmp = t_m * (x / (z - y))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if ((y <= -3.7e+61) || !(y <= 2.75e+41))
		tmp = Float64(t_m * Float64(1.0 - Float64(x / y)));
	else
		tmp = Float64(t_m * Float64(x / Float64(z - y)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if ((y <= -3.7e+61) || ~((y <= 2.75e+41)))
		tmp = t_m * (1.0 - (x / y));
	else
		tmp = t_m * (x / (z - y));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[Or[LessEqual[y, -3.7e+61], N[Not[LessEqual[y, 2.75e+41]], $MachinePrecision]], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+61} \lor \neg \left(y \leq 2.75 \cdot 10^{+41}\right):\\
\;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.70000000000000003e61 or 2.7500000000000002e41 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y + \color{blue}{\left(-x\right)}}{y} \cdot t \]
      2. sub-neg78.6%

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

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

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

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

    if -3.70000000000000003e61 < y < 2.7500000000000002e41

    1. Initial program 93.7%

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

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

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

Alternative 7: 71.6% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-48} \lor \neg \left(z \leq 10^{-20}\right):\\ \;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= z -8e-48) (not (<= z 1e-20)))
    (* (- x y) (/ t_m z))
    (* t_m (- 1.0 (/ x y))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((z <= -8e-48) || !(z <= 1e-20)) {
		tmp = (x - y) * (t_m / z);
	} else {
		tmp = t_m * (1.0 - (x / y));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if ((z <= (-8d-48)) .or. (.not. (z <= 1d-20))) then
        tmp = (x - y) * (t_m / z)
    else
        tmp = t_m * (1.0d0 - (x / y))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((z <= -8e-48) || !(z <= 1e-20)) {
		tmp = (x - y) * (t_m / z);
	} else {
		tmp = t_m * (1.0 - (x / y));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if (z <= -8e-48) or not (z <= 1e-20):
		tmp = (x - y) * (t_m / z)
	else:
		tmp = t_m * (1.0 - (x / y))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if ((z <= -8e-48) || !(z <= 1e-20))
		tmp = Float64(Float64(x - y) * Float64(t_m / z));
	else
		tmp = Float64(t_m * Float64(1.0 - Float64(x / y)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if ((z <= -8e-48) || ~((z <= 1e-20)))
		tmp = (x - y) * (t_m / z);
	else
		tmp = t_m * (1.0 - (x / y));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[Or[LessEqual[z, -8e-48], N[Not[LessEqual[z, 1e-20]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-48} \lor \neg \left(z \leq 10^{-20}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.9999999999999998e-48 or 9.99999999999999945e-21 < z

    1. Initial program 95.6%

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

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

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

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

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

    if -7.9999999999999998e-48 < z < 9.99999999999999945e-21

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y + \color{blue}{\left(-x\right)}}{y} \cdot t \]
      2. sub-neg76.9%

        \[\leadsto \frac{\color{blue}{y - x}}{y} \cdot t \]
      3. div-sub76.9%

        \[\leadsto \color{blue}{\left(\frac{y}{y} - \frac{x}{y}\right)} \cdot t \]
      4. *-inverses76.9%

        \[\leadsto \left(\color{blue}{1} - \frac{x}{y}\right) \cdot t \]
    8. Simplified76.9%

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

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

Alternative 8: 73.9% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+63} \lor \neg \left(y \leq 2.4 \cdot 10^{+41}\right):\\ \;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t\_m}{z - y}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= y -2.2e+63) (not (<= y 2.4e+41)))
    (* t_m (- 1.0 (/ x y)))
    (* x (/ t_m (- z y))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((y <= -2.2e+63) || !(y <= 2.4e+41)) {
		tmp = t_m * (1.0 - (x / y));
	} else {
		tmp = x * (t_m / (z - y));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if ((y <= (-2.2d+63)) .or. (.not. (y <= 2.4d+41))) then
        tmp = t_m * (1.0d0 - (x / y))
    else
        tmp = x * (t_m / (z - y))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if ((y <= -2.2e+63) || !(y <= 2.4e+41)) {
		tmp = t_m * (1.0 - (x / y));
	} else {
		tmp = x * (t_m / (z - y));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if (y <= -2.2e+63) or not (y <= 2.4e+41):
		tmp = t_m * (1.0 - (x / y))
	else:
		tmp = x * (t_m / (z - y))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if ((y <= -2.2e+63) || !(y <= 2.4e+41))
		tmp = Float64(t_m * Float64(1.0 - Float64(x / y)));
	else
		tmp = Float64(x * Float64(t_m / Float64(z - y)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if ((y <= -2.2e+63) || ~((y <= 2.4e+41)))
		tmp = t_m * (1.0 - (x / y));
	else
		tmp = x * (t_m / (z - y));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[Or[LessEqual[y, -2.2e+63], N[Not[LessEqual[y, 2.4e+41]], $MachinePrecision]], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+63} \lor \neg \left(y \leq 2.4 \cdot 10^{+41}\right):\\
\;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.1999999999999999e63 or 2.4000000000000002e41 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y + \color{blue}{\left(-x\right)}}{y} \cdot t \]
      2. sub-neg78.6%

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

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

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

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

    if -2.1999999999999999e63 < y < 2.4000000000000002e41

    1. Initial program 93.7%

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

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

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

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

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

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

Alternative 9: 67.7% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{+62}:\\ \;\;\;\;t\_m\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \frac{t\_m}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\_m\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (<= y -6.4e+62) t_m (if (<= y 3.1e+82) (* x (/ t_m (- z y))) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (y <= -6.4e+62) {
		tmp = t_m;
	} else if (y <= 3.1e+82) {
		tmp = x * (t_m / (z - y));
	} else {
		tmp = t_m;
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (y <= (-6.4d+62)) then
        tmp = t_m
    else if (y <= 3.1d+82) then
        tmp = x * (t_m / (z - y))
    else
        tmp = t_m
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (y <= -6.4e+62) {
		tmp = t_m;
	} else if (y <= 3.1e+82) {
		tmp = x * (t_m / (z - y));
	} else {
		tmp = t_m;
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if y <= -6.4e+62:
		tmp = t_m
	elif y <= 3.1e+82:
		tmp = x * (t_m / (z - y))
	else:
		tmp = t_m
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if (y <= -6.4e+62)
		tmp = t_m;
	elseif (y <= 3.1e+82)
		tmp = Float64(x * Float64(t_m / Float64(z - y)));
	else
		tmp = t_m;
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if (y <= -6.4e+62)
		tmp = t_m;
	elseif (y <= 3.1e+82)
		tmp = x * (t_m / (z - y));
	else
		tmp = t_m;
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -6.4e+62], t$95$m, If[LessEqual[y, 3.1e+82], N[(x * N[(t$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$m]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \frac{t\_m}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.39999999999999968e62 or 3.10000000000000032e82 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -6.39999999999999968e62 < y < 3.10000000000000032e82

    1. Initial program 94.1%

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

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

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

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

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

Alternative 10: 60.8% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+61}:\\ \;\;\;\;t\_m\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+40}:\\ \;\;\;\;\frac{t\_m}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\_m\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (* t_s (if (<= y -2.15e+61) t_m (if (<= y 1.4e+40) (/ t_m (/ z x)) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (y <= -2.15e+61) {
		tmp = t_m;
	} else if (y <= 1.4e+40) {
		tmp = t_m / (z / x);
	} else {
		tmp = t_m;
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (y <= (-2.15d+61)) then
        tmp = t_m
    else if (y <= 1.4d+40) then
        tmp = t_m / (z / x)
    else
        tmp = t_m
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (y <= -2.15e+61) {
		tmp = t_m;
	} else if (y <= 1.4e+40) {
		tmp = t_m / (z / x);
	} else {
		tmp = t_m;
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if y <= -2.15e+61:
		tmp = t_m
	elif y <= 1.4e+40:
		tmp = t_m / (z / x)
	else:
		tmp = t_m
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if (y <= -2.15e+61)
		tmp = t_m;
	elseif (y <= 1.4e+40)
		tmp = Float64(t_m / Float64(z / x));
	else
		tmp = t_m;
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if (y <= -2.15e+61)
		tmp = t_m;
	elseif (y <= 1.4e+40)
		tmp = t_m / (z / x);
	else
		tmp = t_m;
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -2.15e+61], t$95$m, If[LessEqual[y, 1.4e+40], N[(t$95$m / N[(z / x), $MachinePrecision]), $MachinePrecision], t$95$m]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+61}:\\
\;\;\;\;t\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.1500000000000001e61 or 1.4000000000000001e40 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -2.1500000000000001e61 < y < 1.4000000000000001e40

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 60.8% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+61}:\\ \;\;\;\;t\_m\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+41}:\\ \;\;\;\;t\_m \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_m\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (* t_s (if (<= y -2.15e+61) t_m (if (<= y 6.2e+41) (* t_m (/ x z)) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (y <= -2.15e+61) {
		tmp = t_m;
	} else if (y <= 6.2e+41) {
		tmp = t_m * (x / z);
	} else {
		tmp = t_m;
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (y <= (-2.15d+61)) then
        tmp = t_m
    else if (y <= 6.2d+41) then
        tmp = t_m * (x / z)
    else
        tmp = t_m
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (y <= -2.15e+61) {
		tmp = t_m;
	} else if (y <= 6.2e+41) {
		tmp = t_m * (x / z);
	} else {
		tmp = t_m;
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if y <= -2.15e+61:
		tmp = t_m
	elif y <= 6.2e+41:
		tmp = t_m * (x / z)
	else:
		tmp = t_m
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if (y <= -2.15e+61)
		tmp = t_m;
	elseif (y <= 6.2e+41)
		tmp = Float64(t_m * Float64(x / z));
	else
		tmp = t_m;
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if (y <= -2.15e+61)
		tmp = t_m;
	elseif (y <= 6.2e+41)
		tmp = t_m * (x / z);
	else
		tmp = t_m;
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -2.15e+61], t$95$m, If[LessEqual[y, 6.2e+41], N[(t$95$m * N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$m]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+61}:\\
\;\;\;\;t\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.1500000000000001e61 or 6.2e41 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -2.1500000000000001e61 < y < 6.2e41

    1. Initial program 93.7%

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

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

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

Alternative 12: 59.5% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+61}:\\ \;\;\;\;t\_m\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+41}:\\ \;\;\;\;x \cdot \frac{t\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_m\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (* t_s (if (<= y -2.7e+61) t_m (if (<= y 4.3e+41) (* x (/ t_m z)) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (y <= -2.7e+61) {
		tmp = t_m;
	} else if (y <= 4.3e+41) {
		tmp = x * (t_m / z);
	} else {
		tmp = t_m;
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    real(8) :: tmp
    if (y <= (-2.7d+61)) then
        tmp = t_m
    else if (y <= 4.3d+41) then
        tmp = x * (t_m / z)
    else
        tmp = t_m
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (y <= -2.7e+61) {
		tmp = t_m;
	} else if (y <= 4.3e+41) {
		tmp = x * (t_m / z);
	} else {
		tmp = t_m;
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	tmp = 0
	if y <= -2.7e+61:
		tmp = t_m
	elif y <= 4.3e+41:
		tmp = x * (t_m / z)
	else:
		tmp = t_m
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	tmp = 0.0
	if (y <= -2.7e+61)
		tmp = t_m;
	elseif (y <= 4.3e+41)
		tmp = Float64(x * Float64(t_m / z));
	else
		tmp = t_m;
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, x, y, z, t_m)
	tmp = 0.0;
	if (y <= -2.7e+61)
		tmp = t_m;
	elseif (y <= 4.3e+41)
		tmp = x * (t_m / z);
	else
		tmp = t_m;
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * If[LessEqual[y, -2.7e+61], t$95$m, If[LessEqual[y, 4.3e+41], N[(x * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], t$95$m]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+61}:\\
\;\;\;\;t\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7000000000000002e61 or 4.30000000000000024e41 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -2.7000000000000002e61 < y < 4.30000000000000024e41

    1. Initial program 93.7%

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

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

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

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

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

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

Alternative 13: 96.7% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{t\_m}{\frac{z - y}{x - y}} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (* t_s (/ t_m (/ (- z y) (- x y)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	return t_s * (t_m / ((z - y) / (x - y)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    code = t_s * (t_m / ((z - y) / (x - y)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	return t_s * (t_m / ((z - y) / (x - y)));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	return t_s * (t_m / ((z - y) / (x - y)))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	return Float64(t_s * Float64(t_m / Float64(Float64(z - y) / Float64(x - y))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, y, z, t_m)
	tmp = t_s * (t_m / ((z - y) / (x - y)));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * N[(t$95$m / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 96.7% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(t\_m \cdot \frac{x - y}{z - y}\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (* t_s (* t_m (/ (- x y) (- z y)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	return t_s * (t_m * ((x - y) / (z - y)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    code = t_s * (t_m * ((x - y) / (z - y)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	return t_s * (t_m * ((x - y) / (z - y)));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	return t_s * (t_m * ((x - y) / (z - y)))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	return Float64(t_s * Float64(t_m * Float64(Float64(x - y) / Float64(z - y))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, y, z, t_m)
	tmp = t_s * (t_m * ((x - y) / (z - y)));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * N[(t$95$m * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(t\_m \cdot \frac{x - y}{z - y}\right)
\end{array}
Derivation
  1. Initial program 95.9%

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

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

Alternative 15: 34.1% accurate, 9.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot t\_m \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m) :precision binary64 (* t_s t_m))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	return t_s * t_m;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, y, z, t_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t_m
    code = t_s * t_m
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double y, double z, double t_m) {
	return t_s * t_m;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, x, y, z, t_m):
	return t_s * t_m
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, x, y, z, t_m)
	return Float64(t_s * t_m)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, x, y, z, t_m)
	tmp = t_s * t_m;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, y_, z_, t$95$m_] := N[(t$95$s * t$95$m), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot t\_m
\end{array}
Derivation
  1. Initial program 95.9%

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

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

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

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

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

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

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

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

Reproduce

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