Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3

Percentage Accurate: 83.9% → 96.6%
Time: 12.6s
Alternatives: 15
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{t - z} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
def code(x, y, z, t):
	return (x * (y - z)) / (t - z)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(y - z)) / Float64(t - z))
end
function tmp = code(x, y, z, t)
	tmp = (x * (y - z)) / (t - z);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 83.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot \left(y - z\right)}{t - z} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
	return (x * (y - z)) / (t - z);
}
def code(x, y, z, t):
	return (x * (y - z)) / (t - z)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(y - z)) / Float64(t - z))
end
function tmp = code(x, y, z, t)
	tmp = (x * (y - z)) / (t - z);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}

Alternative 1: 96.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.4999999999999999e41

    1. Initial program 92.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing

    if 3.4999999999999999e41 < x

    1. Initial program 69.9%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. remove-double-neg69.9%

        \[\leadsto \frac{\color{blue}{-\left(-x \cdot \left(y - z\right)\right)}}{t - z} \]
      2. distribute-lft-neg-out69.9%

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

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

        \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot \left(y - z\right)}{-\left(t - z\right)}} \]
      5. distribute-lft-neg-out69.9%

        \[\leadsto \frac{\color{blue}{-x \cdot \left(y - z\right)}}{-\left(t - z\right)} \]
      6. distribute-rgt-neg-in69.9%

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

        \[\leadsto \frac{x \cdot \left(-\color{blue}{\left(y + \left(-z\right)\right)}\right)}{-\left(t - z\right)} \]
      8. distribute-neg-in69.9%

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

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

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

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

        \[\leadsto \frac{x \cdot \left(z - y\right)}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      13. distribute-neg-in69.9%

        \[\leadsto \frac{x \cdot \left(z - y\right)}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      14. remove-double-neg69.9%

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

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

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

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

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

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

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

Alternative 2: 71.5% accurate, 0.2× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := x\_m \cdot \frac{z}{z - t}\\ t_2 := x\_m \cdot \frac{y - z}{t}\\ t_3 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+170}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.72 \cdot 10^{+124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-44}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 0.00032:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 10^{+47}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+55}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{+191}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (/ z (- z t))))
        (t_2 (* x_m (/ (- y z) t)))
        (t_3 (* x_m (- 1.0 (/ y z)))))
   (*
    x_s
    (if (<= t -1e+170)
      t_2
      (if (<= t -1.72e+124)
        t_1
        (if (<= t -1.7e-44)
          t_2
          (if (<= t 0.00032)
            t_3
            (if (<= t 1e+47)
              t_2
              (if (<= t 1.9e+55) t_3 (if (<= t 1.16e+191) t_1 t_2))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = x_m * (z / (z - t));
	double t_2 = x_m * ((y - z) / t);
	double t_3 = x_m * (1.0 - (y / z));
	double tmp;
	if (t <= -1e+170) {
		tmp = t_2;
	} else if (t <= -1.72e+124) {
		tmp = t_1;
	} else if (t <= -1.7e-44) {
		tmp = t_2;
	} else if (t <= 0.00032) {
		tmp = t_3;
	} else if (t <= 1e+47) {
		tmp = t_2;
	} else if (t <= 1.9e+55) {
		tmp = t_3;
	} else if (t <= 1.16e+191) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x_m * (z / (z - t))
    t_2 = x_m * ((y - z) / t)
    t_3 = x_m * (1.0d0 - (y / z))
    if (t <= (-1d+170)) then
        tmp = t_2
    else if (t <= (-1.72d+124)) then
        tmp = t_1
    else if (t <= (-1.7d-44)) then
        tmp = t_2
    else if (t <= 0.00032d0) then
        tmp = t_3
    else if (t <= 1d+47) then
        tmp = t_2
    else if (t <= 1.9d+55) then
        tmp = t_3
    else if (t <= 1.16d+191) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = x_m * (z / (z - t));
	double t_2 = x_m * ((y - z) / t);
	double t_3 = x_m * (1.0 - (y / z));
	double tmp;
	if (t <= -1e+170) {
		tmp = t_2;
	} else if (t <= -1.72e+124) {
		tmp = t_1;
	} else if (t <= -1.7e-44) {
		tmp = t_2;
	} else if (t <= 0.00032) {
		tmp = t_3;
	} else if (t <= 1e+47) {
		tmp = t_2;
	} else if (t <= 1.9e+55) {
		tmp = t_3;
	} else if (t <= 1.16e+191) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = x_m * (z / (z - t))
	t_2 = x_m * ((y - z) / t)
	t_3 = x_m * (1.0 - (y / z))
	tmp = 0
	if t <= -1e+170:
		tmp = t_2
	elif t <= -1.72e+124:
		tmp = t_1
	elif t <= -1.7e-44:
		tmp = t_2
	elif t <= 0.00032:
		tmp = t_3
	elif t <= 1e+47:
		tmp = t_2
	elif t <= 1.9e+55:
		tmp = t_3
	elif t <= 1.16e+191:
		tmp = t_1
	else:
		tmp = t_2
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(x_m * Float64(z / Float64(z - t)))
	t_2 = Float64(x_m * Float64(Float64(y - z) / t))
	t_3 = Float64(x_m * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (t <= -1e+170)
		tmp = t_2;
	elseif (t <= -1.72e+124)
		tmp = t_1;
	elseif (t <= -1.7e-44)
		tmp = t_2;
	elseif (t <= 0.00032)
		tmp = t_3;
	elseif (t <= 1e+47)
		tmp = t_2;
	elseif (t <= 1.9e+55)
		tmp = t_3;
	elseif (t <= 1.16e+191)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = x_m * (z / (z - t));
	t_2 = x_m * ((y - z) / t);
	t_3 = x_m * (1.0 - (y / z));
	tmp = 0.0;
	if (t <= -1e+170)
		tmp = t_2;
	elseif (t <= -1.72e+124)
		tmp = t_1;
	elseif (t <= -1.7e-44)
		tmp = t_2;
	elseif (t <= 0.00032)
		tmp = t_3;
	elseif (t <= 1e+47)
		tmp = t_2;
	elseif (t <= 1.9e+55)
		tmp = t_3;
	elseif (t <= 1.16e+191)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -1e+170], t$95$2, If[LessEqual[t, -1.72e+124], t$95$1, If[LessEqual[t, -1.7e-44], t$95$2, If[LessEqual[t, 0.00032], t$95$3, If[LessEqual[t, 1e+47], t$95$2, If[LessEqual[t, 1.9e+55], t$95$3, If[LessEqual[t, 1.16e+191], t$95$1, t$95$2]]]]]]]), $MachinePrecision]]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

\mathbf{elif}\;t \leq -1.72 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-44}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 0.00032:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 10^{+47}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+55}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 1.16 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.00000000000000003e170 or -1.71999999999999994e124 < t < -1.70000000000000008e-44 or 3.20000000000000026e-4 < t < 1e47 or 1.15999999999999996e191 < t

    1. Initial program 92.6%

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

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

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

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

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

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

    if -1.00000000000000003e170 < t < -1.71999999999999994e124 or 1.9e55 < t < 1.15999999999999996e191

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac271.3%

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

        \[\leadsto \frac{x \cdot z}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      4. distribute-neg-in71.3%

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

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

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

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

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

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

    if -1.70000000000000008e-44 < t < 3.20000000000000026e-4 or 1e47 < t < 1.9e55

    1. Initial program 84.7%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in86.8%

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

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. sub-neg86.8%

        \[\leadsto x \cdot \frac{-\color{blue}{\left(y + \left(-z\right)\right)}}{z} \]
      6. distribute-neg-in86.8%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z + \left(-y\right)}}{z} \]
      9. sub-neg86.8%

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub86.8%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses86.8%

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

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

Alternative 3: 69.6% accurate, 0.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+91}:\\ \;\;\;\;x\_m \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-121}:\\ \;\;\;\;\frac{x\_m \cdot y}{t}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-97} \lor \neg \left(z \leq 2.65 \cdot 10^{-36}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{\frac{t}{y}}\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* x_m (- 1.0 (/ y z)))))
   (*
    x_s
    (if (<= z -8.5e+91)
      (* x_m (/ z (- z t)))
      (if (<= z -5.2e-23)
        t_1
        (if (<= z 3.8e-121)
          (/ (* x_m y) t)
          (if (or (<= z 6.8e-97) (not (<= z 2.65e-36)))
            t_1
            (/ x_m (/ t y)))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = x_m * (1.0 - (y / z));
	double tmp;
	if (z <= -8.5e+91) {
		tmp = x_m * (z / (z - t));
	} else if (z <= -5.2e-23) {
		tmp = t_1;
	} else if (z <= 3.8e-121) {
		tmp = (x_m * y) / t;
	} else if ((z <= 6.8e-97) || !(z <= 2.65e-36)) {
		tmp = t_1;
	} else {
		tmp = x_m / (t / y);
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x_m * (1.0d0 - (y / z))
    if (z <= (-8.5d+91)) then
        tmp = x_m * (z / (z - t))
    else if (z <= (-5.2d-23)) then
        tmp = t_1
    else if (z <= 3.8d-121) then
        tmp = (x_m * y) / t
    else if ((z <= 6.8d-97) .or. (.not. (z <= 2.65d-36))) then
        tmp = t_1
    else
        tmp = x_m / (t / y)
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = x_m * (1.0 - (y / z));
	double tmp;
	if (z <= -8.5e+91) {
		tmp = x_m * (z / (z - t));
	} else if (z <= -5.2e-23) {
		tmp = t_1;
	} else if (z <= 3.8e-121) {
		tmp = (x_m * y) / t;
	} else if ((z <= 6.8e-97) || !(z <= 2.65e-36)) {
		tmp = t_1;
	} else {
		tmp = x_m / (t / y);
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = x_m * (1.0 - (y / z))
	tmp = 0
	if z <= -8.5e+91:
		tmp = x_m * (z / (z - t))
	elif z <= -5.2e-23:
		tmp = t_1
	elif z <= 3.8e-121:
		tmp = (x_m * y) / t
	elif (z <= 6.8e-97) or not (z <= 2.65e-36):
		tmp = t_1
	else:
		tmp = x_m / (t / y)
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(x_m * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -8.5e+91)
		tmp = Float64(x_m * Float64(z / Float64(z - t)));
	elseif (z <= -5.2e-23)
		tmp = t_1;
	elseif (z <= 3.8e-121)
		tmp = Float64(Float64(x_m * y) / t);
	elseif ((z <= 6.8e-97) || !(z <= 2.65e-36))
		tmp = t_1;
	else
		tmp = Float64(x_m / Float64(t / y));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = x_m * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -8.5e+91)
		tmp = x_m * (z / (z - t));
	elseif (z <= -5.2e-23)
		tmp = t_1;
	elseif (z <= 3.8e-121)
		tmp = (x_m * y) / t;
	elseif ((z <= 6.8e-97) || ~((z <= 2.65e-36)))
		tmp = t_1;
	else
		tmp = x_m / (t / y);
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -8.5e+91], N[(x$95$m * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-23], t$95$1, If[LessEqual[z, 3.8e-121], N[(N[(x$95$m * y), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, 6.8e-97], N[Not[LessEqual[z, 2.65e-36]], $MachinePrecision]], t$95$1, N[(x$95$m / N[(t / y), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

\mathbf{elif}\;z \leq -5.2 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-97} \lor \neg \left(z \leq 2.65 \cdot 10^{-36}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.4999999999999995e91

    1. Initial program 62.3%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac250.3%

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

        \[\leadsto \frac{x \cdot z}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      4. distribute-neg-in50.3%

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

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

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

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

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

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

    if -8.4999999999999995e91 < z < -5.2e-23 or 3.8000000000000001e-121 < z < 6.7999999999999998e-97 or 2.6499999999999999e-36 < z

    1. Initial program 89.2%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in80.9%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg80.9%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. sub-neg80.9%

        \[\leadsto x \cdot \frac{-\color{blue}{\left(y + \left(-z\right)\right)}}{z} \]
      6. distribute-neg-in80.9%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}{z} \]
      7. remove-double-neg80.9%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub80.9%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses80.9%

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

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

    if -5.2e-23 < z < 3.8000000000000001e-121

    1. Initial program 95.0%

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

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

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

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

    if 6.7999999999999998e-97 < z < 2.6499999999999999e-36

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity93.6%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Simplified99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-23}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-121}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-97} \lor \neg \left(z \leq 2.65 \cdot 10^{-36}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 69.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := x\_m \cdot \left(1 - \frac{y}{z}\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 6 \cdot 10^{-97} \lor \neg \left(z \leq 5.7 \cdot 10^{-37}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05000000000000004e-22 or 3.9999999999999999e-121 < z < 6.00000000000000048e-97 or 5.69999999999999973e-37 < z

    1. Initial program 81.5%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in78.7%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg78.7%

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

        \[\leadsto x \cdot \frac{-\color{blue}{\left(y + \left(-z\right)\right)}}{z} \]
      6. distribute-neg-in78.7%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}{z} \]
      7. remove-double-neg78.7%

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

        \[\leadsto x \cdot \frac{\color{blue}{z + \left(-y\right)}}{z} \]
      9. sub-neg78.7%

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub78.7%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses78.7%

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

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

    if -1.05000000000000004e-22 < z < 3.9999999999999999e-121

    1. Initial program 95.0%

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

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

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

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

    if 6.00000000000000048e-97 < z < 5.69999999999999973e-37

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity93.6%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Simplified99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-22}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-121}:\\ \;\;\;\;\frac{x \cdot y}{t}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-97} \lor \neg \left(z \leq 5.7 \cdot 10^{-37}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -1200000:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.45e92

    1. Initial program 62.3%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac250.3%

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

        \[\leadsto \frac{x \cdot z}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      4. distribute-neg-in50.3%

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

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

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

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

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

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

    if -1.45e92 < z < -1.2e6 or 1.2e-33 < z

    1. Initial program 87.8%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in83.2%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg83.2%

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

        \[\leadsto x \cdot \frac{-\color{blue}{\left(y + \left(-z\right)\right)}}{z} \]
      6. distribute-neg-in83.2%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}{z} \]
      7. remove-double-neg83.2%

        \[\leadsto x \cdot \frac{\left(-y\right) + \color{blue}{z}}{z} \]
      8. +-commutative83.2%

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub83.3%

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

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

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

    if -1.2e6 < z < 3.0999999999999998e-124

    1. Initial program 95.2%

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

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

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

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

        \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{\left(t - z\right) \cdot 1}} \]
      2. times-frac96.0%

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity96.0%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num84.5%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{t}}{y - z}} \]
      3. associate-/r/79.4%

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

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

    if 3.0999999999999998e-124 < z < 1.2e-33

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity90.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Simplified99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+92}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq -1200000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-124}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-33}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -1200000:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.4999999999999995e91

    1. Initial program 62.3%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac250.3%

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

        \[\leadsto \frac{x \cdot z}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      4. distribute-neg-in50.3%

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

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

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

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

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

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

    if -8.4999999999999995e91 < z < -1.2e6 or 6.8000000000000005e-35 < z

    1. Initial program 87.8%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in83.2%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg83.2%

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

        \[\leadsto x \cdot \frac{-\color{blue}{\left(y + \left(-z\right)\right)}}{z} \]
      6. distribute-neg-in83.2%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}{z} \]
      7. remove-double-neg83.2%

        \[\leadsto x \cdot \frac{\left(-y\right) + \color{blue}{z}}{z} \]
      8. +-commutative83.2%

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub83.3%

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

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

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

    if -1.2e6 < z < -3.79999999999999976e-246

    1. Initial program 94.3%

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

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

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

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

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

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

    if -3.79999999999999976e-246 < z < 6.8000000000000005e-35

    1. Initial program 97.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity95.7%

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    8. Step-by-step derivation
      1. clear-num84.3%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\color{blue}{t}}{y - z}} \]
      3. associate-/r/84.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \frac{z}{z - t}\\ \mathbf{elif}\;z \leq -1200000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-246}:\\ \;\;\;\;x \cdot \frac{y - z}{t}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-35}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -13000000:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.69999999999999999e92

    1. Initial program 62.3%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac250.3%

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

        \[\leadsto \frac{x \cdot z}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      4. distribute-neg-in50.3%

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

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

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

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

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

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

    if -3.69999999999999999e92 < z < -1.3e7 or 1.45000000000000001e-33 < z

    1. Initial program 87.8%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in83.2%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg83.2%

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

        \[\leadsto x \cdot \frac{-\color{blue}{\left(y + \left(-z\right)\right)}}{z} \]
      6. distribute-neg-in83.2%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}{z} \]
      7. remove-double-neg83.2%

        \[\leadsto x \cdot \frac{\left(-y\right) + \color{blue}{z}}{z} \]
      8. +-commutative83.2%

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub83.3%

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

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

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

    if -1.3e7 < z < -9.50000000000000063e-204

    1. Initial program 93.2%

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

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

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

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

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

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

    if -9.50000000000000063e-204 < z < 1.45000000000000001e-33

    1. Initial program 97.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity96.1%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}} \]
    7. Simplified86.0%

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

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

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

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

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

Alternative 8: 75.5% accurate, 0.4× speedup?

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

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+91}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\

\mathbf{elif}\;z \leq -3 \cdot 10^{-22} \lor \neg \left(z \leq 1.85 \cdot 10^{-33}\right):\\
\;\;\;\;x\_m \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.50000000000000001e91

    1. Initial program 62.3%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac250.3%

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

        \[\leadsto \frac{x \cdot z}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      4. distribute-neg-in50.3%

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

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

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

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

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

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

    if -3.50000000000000001e91 < z < -2.9999999999999999e-22 or 1.85000000000000007e-33 < z

    1. Initial program 88.5%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in81.2%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg81.2%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(y - z\right)}{z}} \]
      5. sub-neg81.2%

        \[\leadsto x \cdot \frac{-\color{blue}{\left(y + \left(-z\right)\right)}}{z} \]
      6. distribute-neg-in81.2%

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}{z} \]
      7. remove-double-neg81.2%

        \[\leadsto x \cdot \frac{\left(-y\right) + \color{blue}{z}}{z} \]
      8. +-commutative81.2%

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

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub81.2%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses81.2%

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

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

    if -2.9999999999999999e-22 < z < 1.85000000000000007e-33

    1. Initial program 95.8%

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

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

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

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

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

Alternative 9: 73.9% accurate, 0.4× speedup?

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

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+90}:\\
\;\;\;\;x\_m \cdot \frac{z}{z - t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.42e90

    1. Initial program 63.2%

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot z}{t - z}} \]
      2. distribute-neg-frac251.5%

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

        \[\leadsto \frac{x \cdot z}{-\color{blue}{\left(t + \left(-z\right)\right)}} \]
      4. distribute-neg-in51.5%

        \[\leadsto \frac{x \cdot z}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \]
      5. remove-double-neg51.5%

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

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

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

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

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

    if -1.42e90 < z < -2.29999999999999999e-95

    1. Initial program 87.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{y - z}{1}} \]
      3. /-rgt-identity97.9%

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

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

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

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

    if -2.29999999999999999e-95 < z < 8.20000000000000052e-35

    1. Initial program 97.1%

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

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

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

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

    if 8.20000000000000052e-35 < z

    1. Initial program 88.1%

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in84.7%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y - z}{z}\right)} \]
      4. distribute-frac-neg84.7%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}{z} \]
      7. remove-double-neg84.7%

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

        \[\leadsto x \cdot \frac{\color{blue}{z + \left(-y\right)}}{z} \]
      9. sub-neg84.7%

        \[\leadsto x \cdot \frac{\color{blue}{z - y}}{z} \]
      10. div-sub84.7%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{z} - \frac{y}{z}\right)} \]
      11. *-inverses84.7%

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

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

Alternative 10: 60.0% accurate, 0.6× speedup?

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

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-22}:\\
\;\;\;\;x\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.9999999999999999e-22 or 5.1999999999999999e-34 < z

    1. Initial program 80.7%

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

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

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

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

    if -2.9999999999999999e-22 < z < 5.1999999999999999e-34

    1. Initial program 95.8%

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

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

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

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

Alternative 11: 60.6% accurate, 0.6× speedup?

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

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-22}:\\
\;\;\;\;x\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.9999999999999999e-22 or 1.85000000000000007e-33 < z

    1. Initial program 80.7%

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

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

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

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

    if -2.9999999999999999e-22 < z < 1.85000000000000007e-33

    1. Initial program 95.8%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{t}} \]
    7. Simplified64.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    9. Applied egg-rr64.7%

      \[\leadsto \color{blue}{\frac{x}{\frac{t}{y}}} \]
    10. Step-by-step derivation
      1. associate-/r/65.7%

        \[\leadsto \color{blue}{\frac{x}{t} \cdot y} \]
    11. Simplified65.7%

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

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

Alternative 12: 61.2% accurate, 0.6× speedup?

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

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-22}:\\
\;\;\;\;x\_m\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.9999999999999999e-22 or 3.29999999999999983e-34 < z

    1. Initial program 80.7%

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

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

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

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

    if -2.9999999999999999e-22 < z < 3.29999999999999983e-34

    1. Initial program 95.8%

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{t}} \]
    7. Simplified64.8%

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

Alternative 13: 96.6% accurate, 0.6× speedup?

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

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 2 \cdot 10^{-11}:\\
\;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.99999999999999988e-11

    1. Initial program 92.5%

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

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

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

    if 1.99999999999999988e-11 < x

    1. Initial program 74.4%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Step-by-step derivation
      1. remove-double-neg74.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(\left(-y\right) + \left(-\left(-z\right)\right)\right)}}{-\left(t - z\right)} \]
      9. remove-double-neg74.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 96.5% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 15: 35.8% accurate, 9.0× speedup?

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

\\
x\_s \cdot x\_m
\end{array}
Derivation
  1. Initial program 87.9%

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

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

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

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

Developer target: 96.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x}{\frac{t - z}{y - z}} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
	return x / ((t - z) / (y - z));
}
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 / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
	return x / ((t - z) / (y - z));
}
def code(x, y, z, t):
	return x / ((t - z) / (y - z))
function code(x, y, z, t)
	return Float64(x / Float64(Float64(t - z) / Float64(y - z)))
end
function tmp = code(x, y, z, t)
	tmp = x / ((t - z) / (y - z));
end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Reproduce

?
herbie shell --seed 2024110 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

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

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