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

Percentage Accurate: 96.9% → 96.8%
Time: 8.8s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 96.9% accurate, 1.0× speedup?

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

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

Alternative 1: 96.8% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 7 \cdot 10^{+124}:\\ \;\;\;\;\frac{t\_m}{\frac{z - y}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y}{\frac{z - y}{t\_m}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 7e+124)
    (/ t_m (/ (- z y) (- x y)))
    (/ (- x y) (/ (- z y) t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double y, double z, double t_m) {
	double tmp;
	if (t_m <= 7e+124) {
		tmp = t_m / ((z - y) / (x - y));
	} else {
		tmp = (x - y) / ((z - y) / 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 (t_m <= 7d+124) then
        tmp = t_m / ((z - y) / (x - y))
    else
        tmp = (x - y) / ((z - y) / 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 (t_m <= 7e+124) {
		tmp = t_m / ((z - y) / (x - y));
	} else {
		tmp = (x - y) / ((z - y) / 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 t_m <= 7e+124:
		tmp = t_m / ((z - y) / (x - y))
	else:
		tmp = (x - y) / ((z - y) / 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 (t_m <= 7e+124)
		tmp = Float64(t_m / Float64(Float64(z - y) / Float64(x - y)));
	else
		tmp = Float64(Float64(x - y) / Float64(Float64(z - y) / 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 (t_m <= 7e+124)
		tmp = t_m / ((z - y) / (x - y));
	else
		tmp = (x - y) / ((z - y) / 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[t$95$m, 7e+124], N[(t$95$m / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] / N[(N[(z - y), $MachinePrecision] / t$95$m), $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 7 \cdot 10^{+124}:\\
\;\;\;\;\frac{t\_m}{\frac{z - y}{x - y}}\\

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


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

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

    if 7.0000000000000002e124 < t

    1. Initial program 96.9%

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

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

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

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

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

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

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

Alternative 2: 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 -6.5 \cdot 10^{-9}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-161}:\\ \;\;\;\;\frac{t\_m \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 4.15 \cdot 10^{+40}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (let* ((t_2 (* t_m (- 1.0 (/ x y)))))
   (*
    t_s
    (if (<= y -6.5e-9)
      t_2
      (if (<= y -6e-161)
        (/ (* t_m x) (- z y))
        (if (<= y 4.15e+40) (* (- x y) (/ t_m z)) 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 <= -6.5e-9) {
		tmp = t_2;
	} else if (y <= -6e-161) {
		tmp = (t_m * x) / (z - y);
	} else if (y <= 4.15e+40) {
		tmp = (x - y) * (t_m / z);
	} 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 <= (-6.5d-9)) then
        tmp = t_2
    else if (y <= (-6d-161)) then
        tmp = (t_m * x) / (z - y)
    else if (y <= 4.15d+40) then
        tmp = (x - y) * (t_m / z)
    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 <= -6.5e-9) {
		tmp = t_2;
	} else if (y <= -6e-161) {
		tmp = (t_m * x) / (z - y);
	} else if (y <= 4.15e+40) {
		tmp = (x - y) * (t_m / z);
	} 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 <= -6.5e-9:
		tmp = t_2
	elif y <= -6e-161:
		tmp = (t_m * x) / (z - y)
	elif y <= 4.15e+40:
		tmp = (x - y) * (t_m / z)
	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 <= -6.5e-9)
		tmp = t_2;
	elseif (y <= -6e-161)
		tmp = Float64(Float64(t_m * x) / Float64(z - y));
	elseif (y <= 4.15e+40)
		tmp = Float64(Float64(x - y) * Float64(t_m / z));
	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 <= -6.5e-9)
		tmp = t_2;
	elseif (y <= -6e-161)
		tmp = (t_m * x) / (z - y);
	elseif (y <= 4.15e+40)
		tmp = (x - y) * (t_m / z);
	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, -6.5e-9], t$95$2, If[LessEqual[y, -6e-161], N[(N[(t$95$m * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.15e+40], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / z), $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 -6.5 \cdot 10^{-9}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.5000000000000003e-9 or 4.1499999999999999e40 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right) + \left(-\left(-y\right)\right)}}} \]
      5. remove-double-neg80.4%

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

      \[\leadsto \frac{t}{\color{blue}{\frac{y}{\left(-x\right) + y}}} \]
    10. Taylor expanded in y around inf 71.8%

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

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

        \[\leadsto t \cdot 1 + \color{blue}{\left(-\frac{t \cdot x}{y}\right)} \]
      3. associate-/l*80.4%

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

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

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

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

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

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

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

    if -6.5000000000000003e-9 < y < -5.99999999999999977e-161

    1. Initial program 96.8%

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

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

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

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

    if -5.99999999999999977e-161 < y < 4.1499999999999999e40

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.40000000000000015e199 or 3.59999999999999996e40 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -2.40000000000000015e199 < y < -6.5000000000000003e-9

    1. Initial program 99.8%

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

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

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

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

        \[\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.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{t \cdot x}{y}} \]
      2. distribute-frac-neg242.8%

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

        \[\leadsto \color{blue}{t \cdot \frac{x}{-y}} \]
    12. Simplified49.8%

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

    if -6.5000000000000003e-9 < y < 3.59999999999999996e40

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+199}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-9}:\\ \;\;\;\;\frac{x}{y} \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+40}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+73} \lor \neg \left(y \leq 7.2 \cdot 10^{+115}\right):\\
\;\;\;\;\frac{t\_m}{\frac{y}{y - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.60000000000000016e73 or 7.2000000000000001e115 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right) + \left(-\left(-y\right)\right)}}} \]
      5. remove-double-neg84.6%

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

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

      \[\leadsto \frac{t}{\frac{y}{\color{blue}{y + -1 \cdot x}}} \]
    11. Step-by-step derivation
      1. mul-1-neg84.6%

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{y - x}}} \]
    12. Simplified84.6%

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

    if -5.60000000000000016e73 < y < 7.2000000000000001e115

    1. Initial program 93.9%

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

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

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

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

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

Alternative 5: 72.8% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{-10} \lor \neg \left(y \leq 6.3 \cdot 10^{+39}\right):\\ \;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_m \cdot \left(x - y\right)}{z}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= y -2.15e-10) (not (<= y 6.3e+39)))
    (* t_m (- 1.0 (/ x y)))
    (/ (* t_m (- x 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 ((y <= -2.15e-10) || !(y <= 6.3e+39)) {
		tmp = t_m * (1.0 - (x / y));
	} else {
		tmp = (t_m * (x - 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 ((y <= (-2.15d-10)) .or. (.not. (y <= 6.3d+39))) then
        tmp = t_m * (1.0d0 - (x / y))
    else
        tmp = (t_m * (x - 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 ((y <= -2.15e-10) || !(y <= 6.3e+39)) {
		tmp = t_m * (1.0 - (x / y));
	} else {
		tmp = (t_m * (x - 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 (y <= -2.15e-10) or not (y <= 6.3e+39):
		tmp = t_m * (1.0 - (x / y))
	else:
		tmp = (t_m * (x - 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 ((y <= -2.15e-10) || !(y <= 6.3e+39))
		tmp = Float64(t_m * Float64(1.0 - Float64(x / y)));
	else
		tmp = Float64(Float64(t_m * Float64(x - 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 ((y <= -2.15e-10) || ~((y <= 6.3e+39)))
		tmp = t_m * (1.0 - (x / y));
	else
		tmp = (t_m * (x - 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[Or[LessEqual[y, -2.15e-10], N[Not[LessEqual[y, 6.3e+39]], $MachinePrecision]], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$m * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.15000000000000007e-10 or 6.2999999999999996e39 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right) + \left(-\left(-y\right)\right)}}} \]
      5. remove-double-neg80.4%

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

      \[\leadsto \frac{t}{\color{blue}{\frac{y}{\left(-x\right) + y}}} \]
    10. Taylor expanded in y around inf 71.8%

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

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

        \[\leadsto t \cdot 1 + \color{blue}{\left(-\frac{t \cdot x}{y}\right)} \]
      3. associate-/l*80.4%

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

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

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

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

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

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

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

    if -2.15000000000000007e-10 < y < 6.2999999999999996e39

    1. Initial program 92.3%

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

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

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

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

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

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

Alternative 6: 73.0% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{-12} \lor \neg \left(y \leq 4.8 \cdot 10^{+39}\right):\\ \;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t\_m}{z}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= y -2.15e-12) (not (<= y 4.8e+39)))
    (* t_m (- 1.0 (/ x y)))
    (* (- x y) (/ t_m 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 ((y <= -2.15e-12) || !(y <= 4.8e+39)) {
		tmp = t_m * (1.0 - (x / y));
	} else {
		tmp = (x - y) * (t_m / 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 ((y <= (-2.15d-12)) .or. (.not. (y <= 4.8d+39))) then
        tmp = t_m * (1.0d0 - (x / y))
    else
        tmp = (x - y) * (t_m / 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 ((y <= -2.15e-12) || !(y <= 4.8e+39)) {
		tmp = t_m * (1.0 - (x / y));
	} else {
		tmp = (x - y) * (t_m / 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 (y <= -2.15e-12) or not (y <= 4.8e+39):
		tmp = t_m * (1.0 - (x / y))
	else:
		tmp = (x - y) * (t_m / 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 ((y <= -2.15e-12) || !(y <= 4.8e+39))
		tmp = Float64(t_m * Float64(1.0 - Float64(x / y)));
	else
		tmp = Float64(Float64(x - y) * Float64(t_m / 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 ((y <= -2.15e-12) || ~((y <= 4.8e+39)))
		tmp = t_m * (1.0 - (x / y));
	else
		tmp = (x - y) * (t_m / 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[Or[LessEqual[y, -2.15e-12], N[Not[LessEqual[y, 4.8e+39]], $MachinePrecision]], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t$95$m / 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}\;y \leq -2.15 \cdot 10^{-12} \lor \neg \left(y \leq 4.8 \cdot 10^{+39}\right):\\
\;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.14999999999999993e-12 or 4.8000000000000002e39 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right) + \left(-\left(-y\right)\right)}}} \]
      5. remove-double-neg80.4%

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

      \[\leadsto \frac{t}{\color{blue}{\frac{y}{\left(-x\right) + y}}} \]
    10. Taylor expanded in y around inf 71.8%

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

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

        \[\leadsto t \cdot 1 + \color{blue}{\left(-\frac{t \cdot x}{y}\right)} \]
      3. associate-/l*80.4%

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

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

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

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

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

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

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

    if -2.14999999999999993e-12 < y < 4.8000000000000002e39

    1. Initial program 92.3%

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

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

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

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

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

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

Alternative 7: 75.2% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.85000000000000007e-10 or 4.00000000000000012e40 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{y}{\color{blue}{\left(-x\right) + \left(-\left(-y\right)\right)}}} \]
      5. remove-double-neg80.4%

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

      \[\leadsto \frac{t}{\color{blue}{\frac{y}{\left(-x\right) + y}}} \]
    10. Taylor expanded in y around inf 71.8%

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

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

        \[\leadsto t \cdot 1 + \color{blue}{\left(-\frac{t \cdot x}{y}\right)} \]
      3. associate-/l*80.4%

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

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

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

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

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

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

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

    if -1.85000000000000007e-10 < y < 4.00000000000000012e40

    1. Initial program 92.3%

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

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

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

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

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

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

Alternative 8: 69.4% 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 -8 \cdot 10^{-15} \lor \neg \left(y \leq 4.3 \cdot 10^{-63}\right):\\ \;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_m \cdot x}{z}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x y z t_m)
 :precision binary64
 (*
  t_s
  (if (or (<= y -8e-15) (not (<= y 4.3e-63)))
    (* t_m (- 1.0 (/ x y)))
    (/ (* 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 tmp;
	if ((y <= -8e-15) || !(y <= 4.3e-63)) {
		tmp = t_m * (1.0 - (x / y));
	} 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) :: tmp
    if ((y <= (-8d-15)) .or. (.not. (y <= 4.3d-63))) then
        tmp = t_m * (1.0d0 - (x / y))
    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 tmp;
	if ((y <= -8e-15) || !(y <= 4.3e-63)) {
		tmp = t_m * (1.0 - (x / y));
	} 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):
	tmp = 0
	if (y <= -8e-15) or not (y <= 4.3e-63):
		tmp = t_m * (1.0 - (x / y))
	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)
	tmp = 0.0
	if ((y <= -8e-15) || !(y <= 4.3e-63))
		tmp = Float64(t_m * Float64(1.0 - Float64(x / y)));
	else
		tmp = Float64(Float64(t_m * 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)
	tmp = 0.0;
	if ((y <= -8e-15) || ~((y <= 4.3e-63)))
		tmp = t_m * (1.0 - (x / y));
	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_] := N[(t$95$s * If[Or[LessEqual[y, -8e-15], N[Not[LessEqual[y, 4.3e-63]], $MachinePrecision]], N[(t$95$m * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$m * x), $MachinePrecision] / z), $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 -8 \cdot 10^{-15} \lor \neg \left(y \leq 4.3 \cdot 10^{-63}\right):\\
\;\;\;\;t\_m \cdot \left(1 - \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.0000000000000006e-15 or 4.2999999999999999e-63 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{y}{\left(-x\right) + y}}} \]
    10. Taylor expanded in y around inf 67.5%

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

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

        \[\leadsto t \cdot 1 + \color{blue}{\left(-\frac{t \cdot x}{y}\right)} \]
      3. associate-/l*74.8%

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

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

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

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

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

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

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

    if -8.0000000000000006e-15 < y < 4.2999999999999999e-63

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.79999999999999968e113 or 1.6499999999999999e40 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -5.79999999999999968e113 < y < 1.6499999999999999e40

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3000000000000003e113 or 2.54999999999999979e40 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -4.3000000000000003e113 < y < 2.54999999999999979e40

    1. Initial program 93.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+113}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{+40}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5000000000000003e-9 or 6.1999999999999995e40 < y

    1. Initial program 99.9%

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

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

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

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

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

    if -6.5000000000000003e-9 < y < 6.1999999999999995e40

    1. Initial program 92.3%

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

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

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

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

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

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

Alternative 12: 96.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 96.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 14: 34.8% accurate, 9.0× speedup?

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

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

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

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

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

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

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

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

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

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

Reproduce

?
herbie shell --seed 2024165 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

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

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