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

Percentage Accurate: 97.2% → 96.7%
Time: 11.8s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 97.2% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% accurate, 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}\;t\_m \leq 4.1 \cdot 10^{+37}:\\ \;\;\;\;\frac{1}{z - y} \cdot \frac{t\_m}{\frac{1}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_m}{\frac{z - y}{x - y}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.1e+37)
    (* (/ 1.0 (- z y)) (/ t_m (/ 1.0 (- x y))))
    (/ 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) {
	double tmp;
	if (t_m <= 4.1e+37) {
		tmp = (1.0 / (z - y)) * (t_m / (1.0 / (x - y)));
	} else {
		tmp = t_m / ((z - y) / (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 (t_m <= 4.1d+37) then
        tmp = (1.0d0 / (z - y)) * (t_m / (1.0d0 / (x - y)))
    else
        tmp = t_m / ((z - y) / (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 (t_m <= 4.1e+37) {
		tmp = (1.0 / (z - y)) * (t_m / (1.0 / (x - y)));
	} else {
		tmp = t_m / ((z - y) / (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 t_m <= 4.1e+37:
		tmp = (1.0 / (z - y)) * (t_m / (1.0 / (x - y)))
	else:
		tmp = t_m / ((z - y) / (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 (t_m <= 4.1e+37)
		tmp = Float64(Float64(1.0 / Float64(z - y)) * Float64(t_m / Float64(1.0 / Float64(x - y))));
	else
		tmp = Float64(t_m / Float64(Float64(z - y) / 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 (t_m <= 4.1e+37)
		tmp = (1.0 / (z - y)) * (t_m / (1.0 / (x - y)));
	else
		tmp = t_m / ((z - y) / (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[LessEqual[t$95$m, 4.1e+37], N[(N[(1.0 / N[(z - y), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / N[(1.0 / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.1 \cdot 10^{+37}:\\
\;\;\;\;\frac{1}{z - y} \cdot \frac{t\_m}{\frac{1}{x - y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.0999999999999998e37

    1. Initial program 94.6%

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

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

      \[\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/94.6%

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    7. Step-by-step derivation
      1. *-un-lft-identity95.0%

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

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

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

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

    if 4.0999999999999998e37 < t

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.1 \cdot 10^{+37}:\\ \;\;\;\;\frac{1}{z - y} \cdot \frac{t}{\frac{1}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 74.0% accurate, 0.2× 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 \left(1 - \frac{x}{y}\right)\\ t_3 := t\_m \cdot \frac{x}{z - y}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{+66}:\\ \;\;\;\;t\_m \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{+33}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-79}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-278}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+45}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (- 1.0 (/ x y)))) (t_3 (* t_m (/ x (- z y)))))
   (*
    t_s
    (if (<= y -7e+111)
      t_2
      (if (<= y -1.75e+66)
        (* t_m (/ (- x y) z))
        (if (<= y -5.2e+33)
          t_2
          (if (<= y -4.2e-79)
            t_3
            (if (<= y 1.15e-278)
              (* (- x y) (/ t_m z))
              (if (<= y 4.4e+45) t_3 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 * (1.0 - (x / y));
	double t_3 = t_m * (x / (z - y));
	double tmp;
	if (y <= -7e+111) {
		tmp = t_2;
	} else if (y <= -1.75e+66) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= -5.2e+33) {
		tmp = t_2;
	} else if (y <= -4.2e-79) {
		tmp = t_3;
	} else if (y <= 1.15e-278) {
		tmp = (x - y) * (t_m / z);
	} else if (y <= 4.4e+45) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_2 = t_m * (1.0d0 - (x / y))
    t_3 = t_m * (x / (z - y))
    if (y <= (-7d+111)) then
        tmp = t_2
    else if (y <= (-1.75d+66)) then
        tmp = t_m * ((x - y) / z)
    else if (y <= (-5.2d+33)) then
        tmp = t_2
    else if (y <= (-4.2d-79)) then
        tmp = t_3
    else if (y <= 1.15d-278) then
        tmp = (x - y) * (t_m / z)
    else if (y <= 4.4d+45) then
        tmp = t_3
    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 * (1.0 - (x / y));
	double t_3 = t_m * (x / (z - y));
	double tmp;
	if (y <= -7e+111) {
		tmp = t_2;
	} else if (y <= -1.75e+66) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= -5.2e+33) {
		tmp = t_2;
	} else if (y <= -4.2e-79) {
		tmp = t_3;
	} else if (y <= 1.15e-278) {
		tmp = (x - y) * (t_m / z);
	} else if (y <= 4.4e+45) {
		tmp = t_3;
	} 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 * (1.0 - (x / y))
	t_3 = t_m * (x / (z - y))
	tmp = 0
	if y <= -7e+111:
		tmp = t_2
	elif y <= -1.75e+66:
		tmp = t_m * ((x - y) / z)
	elif y <= -5.2e+33:
		tmp = t_2
	elif y <= -4.2e-79:
		tmp = t_3
	elif y <= 1.15e-278:
		tmp = (x - y) * (t_m / z)
	elif y <= 4.4e+45:
		tmp = t_3
	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(1.0 - Float64(x / y)))
	t_3 = Float64(t_m * Float64(x / Float64(z - y)))
	tmp = 0.0
	if (y <= -7e+111)
		tmp = t_2;
	elseif (y <= -1.75e+66)
		tmp = Float64(t_m * Float64(Float64(x - y) / z));
	elseif (y <= -5.2e+33)
		tmp = t_2;
	elseif (y <= -4.2e-79)
		tmp = t_3;
	elseif (y <= 1.15e-278)
		tmp = Float64(Float64(x - y) * Float64(t_m / z));
	elseif (y <= 4.4e+45)
		tmp = t_3;
	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 * (1.0 - (x / y));
	t_3 = t_m * (x / (z - y));
	tmp = 0.0;
	if (y <= -7e+111)
		tmp = t_2;
	elseif (y <= -1.75e+66)
		tmp = t_m * ((x - y) / z);
	elseif (y <= -5.2e+33)
		tmp = t_2;
	elseif (y <= -4.2e-79)
		tmp = t_3;
	elseif (y <= 1.15e-278)
		tmp = (x - y) * (t_m / z);
	elseif (y <= 4.4e+45)
		tmp = t_3;
	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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7e+111], t$95$2, If[LessEqual[y, -1.75e+66], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e+33], t$95$2, If[LessEqual[y, -4.2e-79], t$95$3, If[LessEqual[y, 1.15e-278], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+45], t$95$3, 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 \left(1 - \frac{x}{y}\right)\\
t_3 := t\_m \cdot \frac{x}{z - y}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq -5.2 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-79}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+45}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.0000000000000004e111 or -1.7499999999999999e66 < y < -5.1999999999999995e33 or 4.4000000000000001e45 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity76.8%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative76.8%

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*83.5%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*83.5%

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

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{x}{y}\right)} \]
      6. distribute-lft-in83.5%

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg83.5%

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

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

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

    if -7.0000000000000004e111 < y < -1.7499999999999999e66

    1. Initial program 99.9%

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

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

    if -5.1999999999999995e33 < y < -4.1999999999999999e-79 or 1.15000000000000001e-278 < y < 4.4000000000000001e45

    1. Initial program 95.0%

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

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

    if -4.1999999999999999e-79 < y < 1.15000000000000001e-278

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{+33}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-79}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-278}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.3% accurate, 0.2× 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 \left(1 - \frac{x}{y}\right)\\ t_3 := \frac{t\_m}{\frac{z - y}{x}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{+66}:\\ \;\;\;\;t\_m \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{+32}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -4.95 \cdot 10^{-138}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-277}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+38}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (- 1.0 (/ x y)))) (t_3 (/ t_m (/ (- z y) x))))
   (*
    t_s
    (if (<= y -7.4e+111)
      t_2
      (if (<= y -3.3e+66)
        (* t_m (/ (- x y) z))
        (if (<= y -1.6e+32)
          t_2
          (if (<= y -4.95e-138)
            t_3
            (if (<= y 2.05e-277)
              (* (- x y) (/ t_m z))
              (if (<= y 2.2e+38) t_3 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 * (1.0 - (x / y));
	double t_3 = t_m / ((z - y) / x);
	double tmp;
	if (y <= -7.4e+111) {
		tmp = t_2;
	} else if (y <= -3.3e+66) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= -1.6e+32) {
		tmp = t_2;
	} else if (y <= -4.95e-138) {
		tmp = t_3;
	} else if (y <= 2.05e-277) {
		tmp = (x - y) * (t_m / z);
	} else if (y <= 2.2e+38) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_2 = t_m * (1.0d0 - (x / y))
    t_3 = t_m / ((z - y) / x)
    if (y <= (-7.4d+111)) then
        tmp = t_2
    else if (y <= (-3.3d+66)) then
        tmp = t_m * ((x - y) / z)
    else if (y <= (-1.6d+32)) then
        tmp = t_2
    else if (y <= (-4.95d-138)) then
        tmp = t_3
    else if (y <= 2.05d-277) then
        tmp = (x - y) * (t_m / z)
    else if (y <= 2.2d+38) then
        tmp = t_3
    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 * (1.0 - (x / y));
	double t_3 = t_m / ((z - y) / x);
	double tmp;
	if (y <= -7.4e+111) {
		tmp = t_2;
	} else if (y <= -3.3e+66) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= -1.6e+32) {
		tmp = t_2;
	} else if (y <= -4.95e-138) {
		tmp = t_3;
	} else if (y <= 2.05e-277) {
		tmp = (x - y) * (t_m / z);
	} else if (y <= 2.2e+38) {
		tmp = t_3;
	} 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 * (1.0 - (x / y))
	t_3 = t_m / ((z - y) / x)
	tmp = 0
	if y <= -7.4e+111:
		tmp = t_2
	elif y <= -3.3e+66:
		tmp = t_m * ((x - y) / z)
	elif y <= -1.6e+32:
		tmp = t_2
	elif y <= -4.95e-138:
		tmp = t_3
	elif y <= 2.05e-277:
		tmp = (x - y) * (t_m / z)
	elif y <= 2.2e+38:
		tmp = t_3
	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(1.0 - Float64(x / y)))
	t_3 = Float64(t_m / Float64(Float64(z - y) / x))
	tmp = 0.0
	if (y <= -7.4e+111)
		tmp = t_2;
	elseif (y <= -3.3e+66)
		tmp = Float64(t_m * Float64(Float64(x - y) / z));
	elseif (y <= -1.6e+32)
		tmp = t_2;
	elseif (y <= -4.95e-138)
		tmp = t_3;
	elseif (y <= 2.05e-277)
		tmp = Float64(Float64(x - y) * Float64(t_m / z));
	elseif (y <= 2.2e+38)
		tmp = t_3;
	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 * (1.0 - (x / y));
	t_3 = t_m / ((z - y) / x);
	tmp = 0.0;
	if (y <= -7.4e+111)
		tmp = t_2;
	elseif (y <= -3.3e+66)
		tmp = t_m * ((x - y) / z);
	elseif (y <= -1.6e+32)
		tmp = t_2;
	elseif (y <= -4.95e-138)
		tmp = t_3;
	elseif (y <= 2.05e-277)
		tmp = (x - y) * (t_m / z);
	elseif (y <= 2.2e+38)
		tmp = t_3;
	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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7.4e+111], t$95$2, If[LessEqual[y, -3.3e+66], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e+32], t$95$2, If[LessEqual[y, -4.95e-138], t$95$3, If[LessEqual[y, 2.05e-277], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+38], t$95$3, 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 \left(1 - \frac{x}{y}\right)\\
t_3 := \frac{t\_m}{\frac{z - y}{x}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq -1.6 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -4.95 \cdot 10^{-138}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.4000000000000005e111 or -3.3000000000000001e66 < y < -1.5999999999999999e32 or 2.20000000000000006e38 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity76.8%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative76.8%

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*83.5%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*83.5%

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

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{x}{y}\right)} \]
      6. distribute-lft-in83.5%

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg83.5%

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

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

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

    if -7.4000000000000005e111 < y < -3.3000000000000001e66

    1. Initial program 99.9%

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

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

    if -1.5999999999999999e32 < y < -4.95e-138 or 2.04999999999999994e-277 < y < 2.20000000000000006e38

    1. Initial program 94.4%

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

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

        \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    3. Simplified90.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.6%

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

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

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

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

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

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

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

    if -4.95e-138 < y < 2.04999999999999994e-277

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -4.95 \cdot 10^{-138}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-277}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+38}:\\ \;\;\;\;\frac{t}{\frac{z - y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 87.4% 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 := \left(x - y\right) \cdot \frac{t\_m}{z - y}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;t\_m \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-265}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-151}:\\ \;\;\;\;\frac{t\_m \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+254}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_m}{1 - \frac{z}{y}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* (- x y) (/ t_m (- z y)))))
   (*
    t_s
    (if (<= y -5.6e+94)
      (* t_m (/ y (- y z)))
      (if (<= y 3.7e-265)
        t_2
        (if (<= y 1.25e-151)
          (/ (* t_m x) (- z y))
          (if (<= y 5.2e+254) t_2 (/ t_m (- 1.0 (/ 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 t_2 = (x - y) * (t_m / (z - y));
	double tmp;
	if (y <= -5.6e+94) {
		tmp = t_m * (y / (y - z));
	} else if (y <= 3.7e-265) {
		tmp = t_2;
	} else if (y <= 1.25e-151) {
		tmp = (t_m * x) / (z - y);
	} else if (y <= 5.2e+254) {
		tmp = t_2;
	} else {
		tmp = t_m / (1.0 - (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) :: t_2
    real(8) :: tmp
    t_2 = (x - y) * (t_m / (z - y))
    if (y <= (-5.6d+94)) then
        tmp = t_m * (y / (y - z))
    else if (y <= 3.7d-265) then
        tmp = t_2
    else if (y <= 1.25d-151) then
        tmp = (t_m * x) / (z - y)
    else if (y <= 5.2d+254) then
        tmp = t_2
    else
        tmp = t_m / (1.0d0 - (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 t_2 = (x - y) * (t_m / (z - y));
	double tmp;
	if (y <= -5.6e+94) {
		tmp = t_m * (y / (y - z));
	} else if (y <= 3.7e-265) {
		tmp = t_2;
	} else if (y <= 1.25e-151) {
		tmp = (t_m * x) / (z - y);
	} else if (y <= 5.2e+254) {
		tmp = t_2;
	} else {
		tmp = t_m / (1.0 - (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):
	t_2 = (x - y) * (t_m / (z - y))
	tmp = 0
	if y <= -5.6e+94:
		tmp = t_m * (y / (y - z))
	elif y <= 3.7e-265:
		tmp = t_2
	elif y <= 1.25e-151:
		tmp = (t_m * x) / (z - y)
	elif y <= 5.2e+254:
		tmp = t_2
	else:
		tmp = t_m / (1.0 - (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)
	t_2 = Float64(Float64(x - y) * Float64(t_m / Float64(z - y)))
	tmp = 0.0
	if (y <= -5.6e+94)
		tmp = Float64(t_m * Float64(y / Float64(y - z)));
	elseif (y <= 3.7e-265)
		tmp = t_2;
	elseif (y <= 1.25e-151)
		tmp = Float64(Float64(t_m * x) / Float64(z - y));
	elseif (y <= 5.2e+254)
		tmp = t_2;
	else
		tmp = Float64(t_m / Float64(1.0 - 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)
	t_2 = (x - y) * (t_m / (z - y));
	tmp = 0.0;
	if (y <= -5.6e+94)
		tmp = t_m * (y / (y - z));
	elseif (y <= 3.7e-265)
		tmp = t_2;
	elseif (y <= 1.25e-151)
		tmp = (t_m * x) / (z - y);
	elseif (y <= 5.2e+254)
		tmp = t_2;
	else
		tmp = t_m / (1.0 - (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_] := Block[{t$95$2 = N[(N[(x - y), $MachinePrecision] * N[(t$95$m / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -5.6e+94], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-265], t$95$2, If[LessEqual[y, 1.25e-151], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+254], t$95$2, N[(t$95$m / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;y \leq 3.7 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+254}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.59999999999999997e94

    1. Initial program 100.0%

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

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

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

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

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

    if -5.59999999999999997e94 < y < 3.6999999999999997e-265 or 1.25000000000000001e-151 < y < 5.2000000000000002e254

    1. Initial program 93.5%

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

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

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

    if 3.6999999999999997e-265 < y < 1.25000000000000001e-151

    1. Initial program 95.0%

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

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

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

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

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

    if 5.2000000000000002e254 < y

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\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 x around 0 100.0%

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z - y}{y}}} \]
    8. Step-by-step derivation
      1. mul-1-neg100.0%

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. div-sub100.0%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{-\left(\frac{z}{y} + -1\right)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification95.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-265}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-151}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+254}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 69.6% 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 \left(1 - \frac{x}{y}\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;t\_m \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq -1.26 \cdot 10^{-23} \lor \neg \left(y \leq 1.5 \cdot 10^{-109}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{x}{z}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (- 1.0 (/ x y)))))
   (*
    t_s
    (if (<= y -7e+111)
      t_2
      (if (<= y -5.6e+94)
        (* t_m (/ y (- z)))
        (if (or (<= y -1.26e-23) (not (<= y 1.5e-109)))
          t_2
          (* t_m (/ x z))))))))
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 * (1.0 - (x / y));
	double tmp;
	if (y <= -7e+111) {
		tmp = t_2;
	} else if (y <= -5.6e+94) {
		tmp = t_m * (y / -z);
	} else if ((y <= -1.26e-23) || !(y <= 1.5e-109)) {
		tmp = t_2;
	} else {
		tmp = t_m * (x / z);
	}
	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 * (1.0d0 - (x / y))
    if (y <= (-7d+111)) then
        tmp = t_2
    else if (y <= (-5.6d+94)) then
        tmp = t_m * (y / -z)
    else if ((y <= (-1.26d-23)) .or. (.not. (y <= 1.5d-109))) then
        tmp = t_2
    else
        tmp = t_m * (x / z)
    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 * (1.0 - (x / y));
	double tmp;
	if (y <= -7e+111) {
		tmp = t_2;
	} else if (y <= -5.6e+94) {
		tmp = t_m * (y / -z);
	} else if ((y <= -1.26e-23) || !(y <= 1.5e-109)) {
		tmp = t_2;
	} else {
		tmp = t_m * (x / z);
	}
	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 * (1.0 - (x / y))
	tmp = 0
	if y <= -7e+111:
		tmp = t_2
	elif y <= -5.6e+94:
		tmp = t_m * (y / -z)
	elif (y <= -1.26e-23) or not (y <= 1.5e-109):
		tmp = t_2
	else:
		tmp = t_m * (x / z)
	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(1.0 - Float64(x / y)))
	tmp = 0.0
	if (y <= -7e+111)
		tmp = t_2;
	elseif (y <= -5.6e+94)
		tmp = Float64(t_m * Float64(y / Float64(-z)));
	elseif ((y <= -1.26e-23) || !(y <= 1.5e-109))
		tmp = t_2;
	else
		tmp = Float64(t_m * Float64(x / z));
	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 * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -7e+111)
		tmp = t_2;
	elseif (y <= -5.6e+94)
		tmp = t_m * (y / -z);
	elseif ((y <= -1.26e-23) || ~((y <= 1.5e-109)))
		tmp = t_2;
	else
		tmp = t_m * (x / z);
	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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7e+111], t$95$2, If[LessEqual[y, -5.6e+94], N[(t$95$m * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.26e-23], N[Not[LessEqual[y, 1.5e-109]], $MachinePrecision]], t$95$2, N[(t$95$m * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]), $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 \left(1 - \frac{x}{y}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -5.6 \cdot 10^{+94}:\\
\;\;\;\;t\_m \cdot \frac{y}{-z}\\

\mathbf{elif}\;y \leq -1.26 \cdot 10^{-23} \lor \neg \left(y \leq 1.5 \cdot 10^{-109}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.0000000000000004e111 or -5.59999999999999997e94 < y < -1.25999999999999996e-23 or 1.50000000000000011e-109 < y

    1. Initial program 98.6%

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

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

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

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

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

        \[\leadsto \left(-\left(\frac{x}{y} + \left(-\color{blue}{1}\right)\right)\right) \cdot t \]
      5. metadata-eval76.7%

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity72.6%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative72.6%

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*76.7%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*76.7%

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

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{x}{y}\right)} \]
      6. distribute-lft-in76.7%

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg76.7%

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

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

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

    if -7.0000000000000004e111 < y < -5.59999999999999997e94

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25999999999999996e-23 < y < 1.50000000000000011e-109

    1. Initial program 90.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{+94}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq -1.26 \cdot 10^{-23} \lor \neg \left(y \leq 1.5 \cdot 10^{-109}\right):\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.5% 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{x}{z - y}\\ t_3 := t\_m \cdot \left(1 - \frac{x}{y}\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+101}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-79}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-279}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+35}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (/ x (- z y)))) (t_3 (* t_m (- 1.0 (/ x y)))))
   (*
    t_s
    (if (<= y -5.2e+101)
      t_3
      (if (<= y -2.7e-79)
        t_2
        (if (<= y 8.2e-279)
          (* (- x y) (/ t_m z))
          (if (<= y 6.5e+35) t_2 t_3)))))))
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 * (x / (z - y));
	double t_3 = t_m * (1.0 - (x / y));
	double tmp;
	if (y <= -5.2e+101) {
		tmp = t_3;
	} else if (y <= -2.7e-79) {
		tmp = t_2;
	} else if (y <= 8.2e-279) {
		tmp = (x - y) * (t_m / z);
	} else if (y <= 6.5e+35) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_2 = t_m * (x / (z - y))
    t_3 = t_m * (1.0d0 - (x / y))
    if (y <= (-5.2d+101)) then
        tmp = t_3
    else if (y <= (-2.7d-79)) then
        tmp = t_2
    else if (y <= 8.2d-279) then
        tmp = (x - y) * (t_m / z)
    else if (y <= 6.5d+35) then
        tmp = t_2
    else
        tmp = t_3
    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 * (x / (z - y));
	double t_3 = t_m * (1.0 - (x / y));
	double tmp;
	if (y <= -5.2e+101) {
		tmp = t_3;
	} else if (y <= -2.7e-79) {
		tmp = t_2;
	} else if (y <= 8.2e-279) {
		tmp = (x - y) * (t_m / z);
	} else if (y <= 6.5e+35) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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 * (x / (z - y))
	t_3 = t_m * (1.0 - (x / y))
	tmp = 0
	if y <= -5.2e+101:
		tmp = t_3
	elif y <= -2.7e-79:
		tmp = t_2
	elif y <= 8.2e-279:
		tmp = (x - y) * (t_m / z)
	elif y <= 6.5e+35:
		tmp = t_2
	else:
		tmp = t_3
	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(x / Float64(z - y)))
	t_3 = Float64(t_m * Float64(1.0 - Float64(x / y)))
	tmp = 0.0
	if (y <= -5.2e+101)
		tmp = t_3;
	elseif (y <= -2.7e-79)
		tmp = t_2;
	elseif (y <= 8.2e-279)
		tmp = Float64(Float64(x - y) * Float64(t_m / z));
	elseif (y <= 6.5e+35)
		tmp = t_2;
	else
		tmp = t_3;
	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 * (x / (z - y));
	t_3 = t_m * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -5.2e+101)
		tmp = t_3;
	elseif (y <= -2.7e-79)
		tmp = t_2;
	elseif (y <= 8.2e-279)
		tmp = (x - y) * (t_m / z);
	elseif (y <= 6.5e+35)
		tmp = t_2;
	else
		tmp = t_3;
	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[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -5.2e+101], t$95$3, If[LessEqual[y, -2.7e-79], t$95$2, If[LessEqual[y, 8.2e-279], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+35], t$95$2, t$95$3]]]]), $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{x}{z - y}\\
t_3 := t\_m \cdot \left(1 - \frac{x}{y}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+101}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq -2.7 \cdot 10^{-79}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.2e101 or 6.5000000000000003e35 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity75.1%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative75.1%

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*82.1%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*82.1%

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

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

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg82.1%

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

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

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

    if -5.2e101 < y < -2.7000000000000002e-79 or 8.20000000000000034e-279 < y < 6.5000000000000003e35

    1. Initial program 95.8%

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

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

    if -2.7000000000000002e-79 < y < 8.20000000000000034e-279

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+101}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-79}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-279}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.7% 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 \left(1 - \frac{x}{y}\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -9 \cdot 10^{+64}:\\ \;\;\;\;t\_m \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-265}:\\ \;\;\;\;\frac{x}{\frac{z - y}{t\_m}}\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+34}:\\ \;\;\;\;\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 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (- 1.0 (/ x y)))))
   (*
    t_s
    (if (<= y -7e+111)
      t_2
      (if (<= y -9e+64)
        (* t_m (/ (- x y) z))
        (if (<= y 1.8e-265)
          (/ x (/ (- z y) t_m))
          (if (<= y 9.2e+34) (/ (* 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 * (1.0 - (x / y));
	double tmp;
	if (y <= -7e+111) {
		tmp = t_2;
	} else if (y <= -9e+64) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= 1.8e-265) {
		tmp = x / ((z - y) / t_m);
	} else if (y <= 9.2e+34) {
		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 * (1.0d0 - (x / y))
    if (y <= (-7d+111)) then
        tmp = t_2
    else if (y <= (-9d+64)) then
        tmp = t_m * ((x - y) / z)
    else if (y <= 1.8d-265) then
        tmp = x / ((z - y) / t_m)
    else if (y <= 9.2d+34) 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 * (1.0 - (x / y));
	double tmp;
	if (y <= -7e+111) {
		tmp = t_2;
	} else if (y <= -9e+64) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= 1.8e-265) {
		tmp = x / ((z - y) / t_m);
	} else if (y <= 9.2e+34) {
		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 * (1.0 - (x / y))
	tmp = 0
	if y <= -7e+111:
		tmp = t_2
	elif y <= -9e+64:
		tmp = t_m * ((x - y) / z)
	elif y <= 1.8e-265:
		tmp = x / ((z - y) / t_m)
	elif y <= 9.2e+34:
		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(1.0 - Float64(x / y)))
	tmp = 0.0
	if (y <= -7e+111)
		tmp = t_2;
	elseif (y <= -9e+64)
		tmp = Float64(t_m * Float64(Float64(x - y) / z));
	elseif (y <= 1.8e-265)
		tmp = Float64(x / Float64(Float64(z - y) / t_m));
	elseif (y <= 9.2e+34)
		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 * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -7e+111)
		tmp = t_2;
	elseif (y <= -9e+64)
		tmp = t_m * ((x - y) / z);
	elseif (y <= 1.8e-265)
		tmp = x / ((z - y) / t_m);
	elseif (y <= 9.2e+34)
		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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7e+111], t$95$2, If[LessEqual[y, -9e+64], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-265], N[(x / N[(N[(z - y), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e+34], 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 \left(1 - \frac{x}{y}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;y \leq 9.2 \cdot 10^{+34}:\\
\;\;\;\;\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 < -7.0000000000000004e111 or 9.1999999999999993e34 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity76.4%

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

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*83.5%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*83.5%

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

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{x}{y}\right)} \]
      6. distribute-lft-in83.5%

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg83.5%

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

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

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

    if -7.0000000000000004e111 < y < -8.99999999999999946e64

    1. Initial program 99.9%

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

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

    if -8.99999999999999946e64 < y < 1.8000000000000001e-265

    1. Initial program 90.9%

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

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{t} - \frac{y}{t}}} \]
    10. Step-by-step derivation
      1. div-sub81.3%

        \[\leadsto \frac{x}{\color{blue}{\frac{z - y}{t}}} \]
    11. Simplified81.3%

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

    if 1.8000000000000001e-265 < y < 9.1999999999999993e34

    1. Initial program 93.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -9 \cdot 10^{+64}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-265}:\\ \;\;\;\;\frac{x}{\frac{z - y}{t}}\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+34}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.1% accurate, 0.4× 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 \cdot 10^{+116}:\\ \;\;\;\;t\_m\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-22}:\\ \;\;\;\;t\_m \cdot \frac{x}{-y}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \frac{t\_m}{z}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+35}:\\ \;\;\;\;\frac{t\_m}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\_m\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (<= y -4e+116)
    t_m
    (if (<= y -3.6e-22)
      (* t_m (/ x (- y)))
      (if (<= y 2.2e-278)
        (* x (/ t_m z))
        (if (<= y 1.6e+35) (/ 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 <= -4e+116) {
		tmp = t_m;
	} else if (y <= -3.6e-22) {
		tmp = t_m * (x / -y);
	} else if (y <= 2.2e-278) {
		tmp = x * (t_m / z);
	} else if (y <= 1.6e+35) {
		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 <= (-4d+116)) then
        tmp = t_m
    else if (y <= (-3.6d-22)) then
        tmp = t_m * (x / -y)
    else if (y <= 2.2d-278) then
        tmp = x * (t_m / z)
    else if (y <= 1.6d+35) 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 <= -4e+116) {
		tmp = t_m;
	} else if (y <= -3.6e-22) {
		tmp = t_m * (x / -y);
	} else if (y <= 2.2e-278) {
		tmp = x * (t_m / z);
	} else if (y <= 1.6e+35) {
		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 <= -4e+116:
		tmp = t_m
	elif y <= -3.6e-22:
		tmp = t_m * (x / -y)
	elif y <= 2.2e-278:
		tmp = x * (t_m / z)
	elif y <= 1.6e+35:
		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 <= -4e+116)
		tmp = t_m;
	elseif (y <= -3.6e-22)
		tmp = Float64(t_m * Float64(x / Float64(-y)));
	elseif (y <= 2.2e-278)
		tmp = Float64(x * Float64(t_m / z));
	elseif (y <= 1.6e+35)
		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 <= -4e+116)
		tmp = t_m;
	elseif (y <= -3.6e-22)
		tmp = t_m * (x / -y);
	elseif (y <= 2.2e-278)
		tmp = x * (t_m / z);
	elseif (y <= 1.6e+35)
		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, -4e+116], t$95$m, If[LessEqual[y, -3.6e-22], N[(t$95$m * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-278], N[(x * N[(t$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+35], 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 -4 \cdot 10^{+116}:\\
\;\;\;\;t\_m\\

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-22}:\\
\;\;\;\;t\_m \cdot \frac{x}{-y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.00000000000000006e116 or 1.59999999999999991e35 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -4.00000000000000006e116 < y < -3.5999999999999998e-22

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \left(-\left(\frac{x}{y} + \left(-\color{blue}{1}\right)\right)\right) \cdot t \]
      5. metadata-eval54.4%

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity54.4%

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

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*54.4%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*54.4%

        \[\leadsto t \cdot 1 + \color{blue}{t \cdot \left(\frac{x}{y} \cdot -1\right)} \]
      5. *-commutative54.4%

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{x}{y}\right)} \]
      6. distribute-lft-in54.4%

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg54.4%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    10. Step-by-step derivation
      1. mul-1-neg48.0%

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

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

        \[\leadsto \color{blue}{t \cdot \left(-\frac{x}{y}\right)} \]
      4. distribute-neg-frac48.0%

        \[\leadsto t \cdot \color{blue}{\frac{-x}{y}} \]
    11. Simplified48.0%

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

    if -3.5999999999999998e-22 < y < 2.2000000000000001e-278

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

    if 2.2000000000000001e-278 < y < 1.59999999999999991e35

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+116}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-22}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+35}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 73.5% 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 \left(1 - \frac{x}{y}\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -4.3 \cdot 10^{+66}:\\ \;\;\;\;t\_m \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+41}:\\ \;\;\;\;\frac{x}{\frac{z - y}{t\_m}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (- 1.0 (/ x y)))))
   (*
    t_s
    (if (<= y -7e+111)
      t_2
      (if (<= y -4.3e+66)
        (* t_m (/ (- x y) z))
        (if (<= y 7.2e+41) (/ x (/ (- z y) t_m)) 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 * (1.0 - (x / y));
	double tmp;
	if (y <= -7e+111) {
		tmp = t_2;
	} else if (y <= -4.3e+66) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= 7.2e+41) {
		tmp = x / ((z - y) / t_m);
	} 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 * (1.0d0 - (x / y))
    if (y <= (-7d+111)) then
        tmp = t_2
    else if (y <= (-4.3d+66)) then
        tmp = t_m * ((x - y) / z)
    else if (y <= 7.2d+41) then
        tmp = x / ((z - y) / t_m)
    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 * (1.0 - (x / y));
	double tmp;
	if (y <= -7e+111) {
		tmp = t_2;
	} else if (y <= -4.3e+66) {
		tmp = t_m * ((x - y) / z);
	} else if (y <= 7.2e+41) {
		tmp = x / ((z - y) / t_m);
	} 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 * (1.0 - (x / y))
	tmp = 0
	if y <= -7e+111:
		tmp = t_2
	elif y <= -4.3e+66:
		tmp = t_m * ((x - y) / z)
	elif y <= 7.2e+41:
		tmp = x / ((z - y) / t_m)
	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(1.0 - Float64(x / y)))
	tmp = 0.0
	if (y <= -7e+111)
		tmp = t_2;
	elseif (y <= -4.3e+66)
		tmp = Float64(t_m * Float64(Float64(x - y) / z));
	elseif (y <= 7.2e+41)
		tmp = Float64(x / Float64(Float64(z - y) / t_m));
	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 * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -7e+111)
		tmp = t_2;
	elseif (y <= -4.3e+66)
		tmp = t_m * ((x - y) / z);
	elseif (y <= 7.2e+41)
		tmp = x / ((z - y) / t_m);
	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[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[y, -7e+111], t$95$2, If[LessEqual[y, -4.3e+66], N[(t$95$m * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e+41], N[(x / N[(N[(z - y), $MachinePrecision] / t$95$m), $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 \left(1 - \frac{x}{y}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.0000000000000004e111 or 7.20000000000000051e41 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity76.4%

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

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*83.5%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*83.5%

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

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{x}{y}\right)} \]
      6. distribute-lft-in83.5%

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg83.5%

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

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

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

    if -7.0000000000000004e111 < y < -4.30000000000000027e66

    1. Initial program 99.9%

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

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

    if -4.30000000000000027e66 < y < 7.20000000000000051e41

    1. Initial program 91.8%

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

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num92.8%

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

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

      \[\leadsto \color{blue}{\frac{x - y}{\frac{z - y}{t}}} \]
    7. Step-by-step derivation
      1. div-sub92.3%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{t} - \frac{y}{t}}} \]
    10. Step-by-step derivation
      1. div-sub77.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -4.3 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+41}:\\ \;\;\;\;\frac{x}{\frac{z - y}{t}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 71.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}\;z \leq -3.3 \cdot 10^{-29} \lor \neg \left(z \leq 2.7 \cdot 10^{+81}\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 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= z -3.3e-29) (not (<= z 2.7e+81)))
    (* (- 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 <= -3.3e-29) || !(z <= 2.7e+81)) {
		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 <= (-3.3d-29)) .or. (.not. (z <= 2.7d+81))) 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 <= -3.3e-29) || !(z <= 2.7e+81)) {
		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 <= -3.3e-29) or not (z <= 2.7e+81):
		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 <= -3.3e-29) || !(z <= 2.7e+81))
		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 <= -3.3e-29) || ~((z <= 2.7e+81)))
		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, -3.3e-29], N[Not[LessEqual[z, 2.7e+81]], $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 -3.3 \cdot 10^{-29} \lor \neg \left(z \leq 2.7 \cdot 10^{+81}\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 < -3.30000000000000028e-29 or 2.6999999999999999e81 < z

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

    if -3.30000000000000028e-29 < z < 2.6999999999999999e81

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity76.2%

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

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*76.0%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*76.0%

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

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{x}{y}\right)} \]
      6. distribute-lft-in76.0%

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg76.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{-29} \lor \neg \left(z \leq 2.7 \cdot 10^{+81}\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 11: 74.3% 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.2 \cdot 10^{+46}:\\ \;\;\;\;t\_m \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+39}:\\ \;\;\;\;\frac{t\_m \cdot x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (<= y -6.2e+46)
    (* t_m (/ y (- y z)))
    (if (<= y 1.85e+39) (/ (* t_m x) (- z y)) (* 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 (y <= -6.2e+46) {
		tmp = t_m * (y / (y - z));
	} else if (y <= 1.85e+39) {
		tmp = (t_m * x) / (z - y);
	} 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 (y <= (-6.2d+46)) then
        tmp = t_m * (y / (y - z))
    else if (y <= 1.85d+39) then
        tmp = (t_m * x) / (z - y)
    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 (y <= -6.2e+46) {
		tmp = t_m * (y / (y - z));
	} else if (y <= 1.85e+39) {
		tmp = (t_m * x) / (z - y);
	} 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 y <= -6.2e+46:
		tmp = t_m * (y / (y - z))
	elif y <= 1.85e+39:
		tmp = (t_m * x) / (z - y)
	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 (y <= -6.2e+46)
		tmp = Float64(t_m * Float64(y / Float64(y - z)));
	elseif (y <= 1.85e+39)
		tmp = Float64(Float64(t_m * x) / Float64(z - y));
	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 (y <= -6.2e+46)
		tmp = t_m * (y / (y - z));
	elseif (y <= 1.85e+39)
		tmp = (t_m * x) / (z - y);
	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[LessEqual[y, -6.2e+46], N[(t$95$m * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+39], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $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}\;y \leq -6.2 \cdot 10^{+46}:\\
\;\;\;\;t\_m \cdot \frac{y}{y - z}\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

    if -6.1999999999999995e46 < y < 1.85000000000000006e39

    1. Initial program 91.7%

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

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

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

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

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

    if 1.85000000000000006e39 < y

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \left(-\left(\frac{x}{y} + \left(-\color{blue}{1}\right)\right)\right) \cdot t \]
      5. metadata-eval77.4%

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-rgt-identity72.2%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative72.2%

        \[\leadsto t \cdot 1 + \color{blue}{\frac{t \cdot x}{y} \cdot -1} \]
      3. associate-/l*77.4%

        \[\leadsto t \cdot 1 + \color{blue}{\left(t \cdot \frac{x}{y}\right)} \cdot -1 \]
      4. associate-*r*77.4%

        \[\leadsto t \cdot 1 + \color{blue}{t \cdot \left(\frac{x}{y} \cdot -1\right)} \]
      5. *-commutative77.4%

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{x}{y}\right)} \]
      6. distribute-lft-in77.4%

        \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{x}{y}\right)} \]
      7. mul-1-neg77.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+46}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+39}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 59.2% 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 -5.2 \cdot 10^{+101}:\\ \;\;\;\;t\_m\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+35}:\\ \;\;\;\;x \cdot \frac{t\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_m\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (* t_s (if (<= y -5.2e+101) t_m (if (<= y 3e+35) (* 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 <= -5.2e+101) {
		tmp = t_m;
	} else if (y <= 3e+35) {
		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 <= (-5.2d+101)) then
        tmp = t_m
    else if (y <= 3d+35) 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 <= -5.2e+101) {
		tmp = t_m;
	} else if (y <= 3e+35) {
		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 <= -5.2e+101:
		tmp = t_m
	elif y <= 3e+35:
		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 <= -5.2e+101)
		tmp = t_m;
	elseif (y <= 3e+35)
		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 <= -5.2e+101)
		tmp = t_m;
	elseif (y <= 3e+35)
		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, -5.2e+101], t$95$m, If[LessEqual[y, 3e+35], 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 -5.2 \cdot 10^{+101}:\\
\;\;\;\;t\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.2e101 or 2.99999999999999991e35 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -5.2e101 < y < 2.99999999999999991e35

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+101}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+35}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 60.3% 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 -5.2 \cdot 10^{+101}:\\ \;\;\;\;t\_m\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{+44}:\\ \;\;\;\;t\_m \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_m\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (* t_s (if (<= y -5.2e+101) t_m (if (<= y 4.7e+44) (* 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 <= -5.2e+101) {
		tmp = t_m;
	} else if (y <= 4.7e+44) {
		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 <= (-5.2d+101)) then
        tmp = t_m
    else if (y <= 4.7d+44) 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 <= -5.2e+101) {
		tmp = t_m;
	} else if (y <= 4.7e+44) {
		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 <= -5.2e+101:
		tmp = t_m
	elif y <= 4.7e+44:
		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 <= -5.2e+101)
		tmp = t_m;
	elseif (y <= 4.7e+44)
		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 <= -5.2e+101)
		tmp = t_m;
	elseif (y <= 4.7e+44)
		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, -5.2e+101], t$95$m, If[LessEqual[y, 4.7e+44], 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 -5.2 \cdot 10^{+101}:\\
\;\;\;\;t\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.2e101 or 4.70000000000000018e44 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -5.2e101 < y < 4.70000000000000018e44

    1. Initial program 92.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+101}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 36.3% accurate, 0.9× 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 5.4 \cdot 10^{+228}:\\ \;\;\;\;t\_m\\ \mathbf{else}:\\ \;\;\;\;t\_m \cdot \frac{y}{z}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 1 t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (* t_s (if (<= z 5.4e+228) t_m (* t_m (/ y z)))))
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 <= 5.4e+228) {
		tmp = t_m;
	} else {
		tmp = t_m * (y / z);
	}
	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 <= 5.4d+228) then
        tmp = t_m
    else
        tmp = t_m * (y / z)
    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 <= 5.4e+228) {
		tmp = t_m;
	} else {
		tmp = t_m * (y / z);
	}
	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 <= 5.4e+228:
		tmp = t_m
	else:
		tmp = t_m * (y / z)
	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 <= 5.4e+228)
		tmp = t_m;
	else
		tmp = Float64(t_m * Float64(y / z));
	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 <= 5.4e+228)
		tmp = t_m;
	else
		tmp = t_m * (y / z);
	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[z, 5.4e+228], t$95$m, N[(t$95$m * N[(y / z), $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 5.4 \cdot 10^{+228}:\\
\;\;\;\;t\_m\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 5.4000000000000003e228

    1. Initial program 95.7%

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

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

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

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

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

    if 5.4000000000000003e228 < z

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 5.4 \cdot 10^{+228}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 97.2% 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 1 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.5%

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

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

Alternative 16: 97.2% 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 1 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.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
  7. Final simplification95.8%

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

Alternative 17: 35.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 1 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.5%

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification37.4%

    \[\leadsto t \]
  7. Add Preprocessing

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

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

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