Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B

Percentage Accurate: 88.8% → 98.4%
Time: 10.1s
Alternatives: 16
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \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(x / Float64(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[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\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 16 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: 88.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \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(x / Float64(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[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.4% accurate, 0.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(\frac{\sqrt{x\_m}}{y - z} \cdot \frac{\sqrt{x\_m}}{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 (* (/ (sqrt x_m) (- y z)) (/ (sqrt x_m) (- 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 * ((sqrt(x_m) / (y - z)) * (sqrt(x_m) / (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 * ((sqrt(x_m) / (y - z)) * (sqrt(x_m) / (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 * ((Math.sqrt(x_m) / (y - z)) * (Math.sqrt(x_m) / (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 * ((math.sqrt(x_m) / (y - z)) * (math.sqrt(x_m) / (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(Float64(sqrt(x_m) / Float64(y - z)) * Float64(sqrt(x_m) / 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 * ((sqrt(x_m) / (y - z)) * (sqrt(x_m) / (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[(N[(N[Sqrt[x$95$m], $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[x$95$m], $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(\frac{\sqrt{x\_m}}{y - z} \cdot \frac{\sqrt{x\_m}}{t - z}\right)
\end{array}
Derivation
  1. Initial program 86.9%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrt40.8%

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

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

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

Alternative 2: 70.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 := \frac{x\_m}{z \cdot \left(z - y\right)}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{-77}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-120}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.22 \cdot 10^{-100}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+14}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{y - z}}{t}\\ \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 y)))))
   (*
    x_s
    (if (<= t -1.05e-77)
      (/ (/ x_m y) (- t z))
      (if (<= t 8.5e-120)
        t_1
        (if (<= t 2.22e-100)
          (/ (/ x_m t) (- y z))
          (if (<= t 8e-91)
            t_1
            (if (<= t 7e+14)
              (/ x_m (* z (- z t)))
              (/ (/ x_m (- y 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 t_1 = x_m / (z * (z - y));
	double tmp;
	if (t <= -1.05e-77) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 8.5e-120) {
		tmp = t_1;
	} else if (t <= 2.22e-100) {
		tmp = (x_m / t) / (y - z);
	} else if (t <= 8e-91) {
		tmp = t_1;
	} else if (t <= 7e+14) {
		tmp = x_m / (z * (z - t));
	} else {
		tmp = (x_m / (y - 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) :: t_1
    real(8) :: tmp
    t_1 = x_m / (z * (z - y))
    if (t <= (-1.05d-77)) then
        tmp = (x_m / y) / (t - z)
    else if (t <= 8.5d-120) then
        tmp = t_1
    else if (t <= 2.22d-100) then
        tmp = (x_m / t) / (y - z)
    else if (t <= 8d-91) then
        tmp = t_1
    else if (t <= 7d+14) then
        tmp = x_m / (z * (z - t))
    else
        tmp = (x_m / (y - 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 t_1 = x_m / (z * (z - y));
	double tmp;
	if (t <= -1.05e-77) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 8.5e-120) {
		tmp = t_1;
	} else if (t <= 2.22e-100) {
		tmp = (x_m / t) / (y - z);
	} else if (t <= 8e-91) {
		tmp = t_1;
	} else if (t <= 7e+14) {
		tmp = x_m / (z * (z - t));
	} else {
		tmp = (x_m / (y - 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):
	t_1 = x_m / (z * (z - y))
	tmp = 0
	if t <= -1.05e-77:
		tmp = (x_m / y) / (t - z)
	elif t <= 8.5e-120:
		tmp = t_1
	elif t <= 2.22e-100:
		tmp = (x_m / t) / (y - z)
	elif t <= 8e-91:
		tmp = t_1
	elif t <= 7e+14:
		tmp = x_m / (z * (z - t))
	else:
		tmp = (x_m / (y - 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)
	t_1 = Float64(x_m / Float64(z * Float64(z - y)))
	tmp = 0.0
	if (t <= -1.05e-77)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (t <= 8.5e-120)
		tmp = t_1;
	elseif (t <= 2.22e-100)
		tmp = Float64(Float64(x_m / t) / Float64(y - z));
	elseif (t <= 8e-91)
		tmp = t_1;
	elseif (t <= 7e+14)
		tmp = Float64(x_m / Float64(z * Float64(z - t)));
	else
		tmp = Float64(Float64(x_m / Float64(y - 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)
	t_1 = x_m / (z * (z - y));
	tmp = 0.0;
	if (t <= -1.05e-77)
		tmp = (x_m / y) / (t - z);
	elseif (t <= 8.5e-120)
		tmp = t_1;
	elseif (t <= 2.22e-100)
		tmp = (x_m / t) / (y - z);
	elseif (t <= 8e-91)
		tmp = t_1;
	elseif (t <= 7e+14)
		tmp = x_m / (z * (z - t));
	else
		tmp = (x_m / (y - 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_] := Block[{t$95$1 = N[(x$95$m / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -1.05e-77], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-120], t$95$1, If[LessEqual[t, 2.22e-100], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-91], t$95$1, If[LessEqual[t, 7e+14], N[(x$95$m / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-120}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 8 \cdot 10^{-91}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.05000000000000008e-77

    1. Initial program 89.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*98.5%

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

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

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

    if -1.05000000000000008e-77 < t < 8.50000000000000059e-120 or 2.2199999999999999e-100 < t < 8.00000000000000018e-91

    1. Initial program 90.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*97.6%

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

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

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

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

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

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

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

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

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

    if 8.50000000000000059e-120 < t < 2.2199999999999999e-100

    1. Initial program 89.2%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 78.5%

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

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

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

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

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

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

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

    if 8.00000000000000018e-91 < t < 7e14

    1. Initial program 94.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 48.6%

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(0 - \left(t - z\right)\right)}} \]
      5. associate--r-48.6%

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot t\right)}} \]
      9. mul-1-neg48.6%

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

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

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

    if 7e14 < t

    1. Initial program 74.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 71.6%

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

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

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

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

Alternative 3: 68.0% accurate, 0.3× 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}\;y \leq -2.25 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-215}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-299} \lor \neg \left(y \leq 6 \cdot 10^{-156}\right):\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - t\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 (<= y -2.25e-7)
    (/ (/ x_m y) (- t z))
    (if (<= y -9.5e-215)
      (/ x_m (* z (- z y)))
      (if (or (<= y -3.2e-299) (not (<= y 6e-156)))
        (/ (/ x_m t) (- y z))
        (/ x_m (* z (- 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 (y <= -2.25e-7) {
		tmp = (x_m / y) / (t - z);
	} else if (y <= -9.5e-215) {
		tmp = x_m / (z * (z - y));
	} else if ((y <= -3.2e-299) || !(y <= 6e-156)) {
		tmp = (x_m / t) / (y - z);
	} else {
		tmp = x_m / (z * (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 (y <= (-2.25d-7)) then
        tmp = (x_m / y) / (t - z)
    else if (y <= (-9.5d-215)) then
        tmp = x_m / (z * (z - y))
    else if ((y <= (-3.2d-299)) .or. (.not. (y <= 6d-156))) then
        tmp = (x_m / t) / (y - z)
    else
        tmp = x_m / (z * (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 (y <= -2.25e-7) {
		tmp = (x_m / y) / (t - z);
	} else if (y <= -9.5e-215) {
		tmp = x_m / (z * (z - y));
	} else if ((y <= -3.2e-299) || !(y <= 6e-156)) {
		tmp = (x_m / t) / (y - z);
	} else {
		tmp = x_m / (z * (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 y <= -2.25e-7:
		tmp = (x_m / y) / (t - z)
	elif y <= -9.5e-215:
		tmp = x_m / (z * (z - y))
	elif (y <= -3.2e-299) or not (y <= 6e-156):
		tmp = (x_m / t) / (y - z)
	else:
		tmp = x_m / (z * (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 (y <= -2.25e-7)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (y <= -9.5e-215)
		tmp = Float64(x_m / Float64(z * Float64(z - y)));
	elseif ((y <= -3.2e-299) || !(y <= 6e-156))
		tmp = Float64(Float64(x_m / t) / Float64(y - z));
	else
		tmp = Float64(x_m / Float64(z * 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 (y <= -2.25e-7)
		tmp = (x_m / y) / (t - z);
	elseif (y <= -9.5e-215)
		tmp = x_m / (z * (z - y));
	elseif ((y <= -3.2e-299) || ~((y <= 6e-156)))
		tmp = (x_m / t) / (y - z);
	else
		tmp = x_m / (z * (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[y, -2.25e-7], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.5e-215], N[(x$95$m / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.2e-299], N[Not[LessEqual[y, 6e-156]], $MachinePrecision]], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(z * 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}\;y \leq -2.25 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

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

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-299} \lor \neg \left(y \leq 6 \cdot 10^{-156}\right):\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.2499999999999999e-7

    1. Initial program 81.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*98.2%

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

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

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

    if -2.2499999999999999e-7 < y < -9.5000000000000007e-215

    1. Initial program 94.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*97.7%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. clear-num97.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{x}{y - z}}}} \]
    4. Applied egg-rr97.7%

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

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

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

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

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

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

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

    if -9.5000000000000007e-215 < y < -3.20000000000000008e-299 or 6e-156 < y

    1. Initial program 84.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 54.9%

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

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

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

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

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

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

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

    if -3.20000000000000008e-299 < y < 6e-156

    1. Initial program 92.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 86.5%

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in86.5%

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(0 - \left(t - z\right)\right)}} \]
      5. associate--r-86.5%

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot t\right)}} \]
      9. mul-1-neg86.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-215}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-299} \lor \neg \left(y \leq 6 \cdot 10^{-156}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.9% accurate, 0.3× 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}\;y \leq -2.25 \cdot 10^{-7}:\\ \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-215}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-301} \lor \neg \left(y \leq 4.2 \cdot 10^{-155}\right):\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - t\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 (<= y -2.25e-7)
    (/ x_m (* y (- t z)))
    (if (<= y -4.6e-215)
      (/ x_m (* z (- z y)))
      (if (or (<= y -1.2e-301) (not (<= y 4.2e-155)))
        (/ (/ x_m t) (- y z))
        (/ x_m (* z (- 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 (y <= -2.25e-7) {
		tmp = x_m / (y * (t - z));
	} else if (y <= -4.6e-215) {
		tmp = x_m / (z * (z - y));
	} else if ((y <= -1.2e-301) || !(y <= 4.2e-155)) {
		tmp = (x_m / t) / (y - z);
	} else {
		tmp = x_m / (z * (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 (y <= (-2.25d-7)) then
        tmp = x_m / (y * (t - z))
    else if (y <= (-4.6d-215)) then
        tmp = x_m / (z * (z - y))
    else if ((y <= (-1.2d-301)) .or. (.not. (y <= 4.2d-155))) then
        tmp = (x_m / t) / (y - z)
    else
        tmp = x_m / (z * (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 (y <= -2.25e-7) {
		tmp = x_m / (y * (t - z));
	} else if (y <= -4.6e-215) {
		tmp = x_m / (z * (z - y));
	} else if ((y <= -1.2e-301) || !(y <= 4.2e-155)) {
		tmp = (x_m / t) / (y - z);
	} else {
		tmp = x_m / (z * (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 y <= -2.25e-7:
		tmp = x_m / (y * (t - z))
	elif y <= -4.6e-215:
		tmp = x_m / (z * (z - y))
	elif (y <= -1.2e-301) or not (y <= 4.2e-155):
		tmp = (x_m / t) / (y - z)
	else:
		tmp = x_m / (z * (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 (y <= -2.25e-7)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	elseif (y <= -4.6e-215)
		tmp = Float64(x_m / Float64(z * Float64(z - y)));
	elseif ((y <= -1.2e-301) || !(y <= 4.2e-155))
		tmp = Float64(Float64(x_m / t) / Float64(y - z));
	else
		tmp = Float64(x_m / Float64(z * 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 (y <= -2.25e-7)
		tmp = x_m / (y * (t - z));
	elseif (y <= -4.6e-215)
		tmp = x_m / (z * (z - y));
	elseif ((y <= -1.2e-301) || ~((y <= 4.2e-155)))
		tmp = (x_m / t) / (y - z);
	else
		tmp = x_m / (z * (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[y, -2.25e-7], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.6e-215], N[(x$95$m / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.2e-301], N[Not[LessEqual[y, 4.2e-155]], $MachinePrecision]], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(z * 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}\;y \leq -2.25 \cdot 10^{-7}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\

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

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-301} \lor \neg \left(y \leq 4.2 \cdot 10^{-155}\right):\\
\;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.2499999999999999e-7

    1. Initial program 81.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 77.9%

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

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

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

    if -2.2499999999999999e-7 < y < -4.5999999999999998e-215

    1. Initial program 94.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*97.7%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. clear-num97.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{x}{y - z}}}} \]
    4. Applied egg-rr97.7%

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

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

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

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

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

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

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

    if -4.5999999999999998e-215 < y < -1.19999999999999996e-301 or 4.2000000000000003e-155 < y

    1. Initial program 84.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 54.9%

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

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

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

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

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

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

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

    if -1.19999999999999996e-301 < y < 4.2000000000000003e-155

    1. Initial program 92.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 86.5%

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in86.5%

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(0 - \left(t - z\right)\right)}} \]
      5. associate--r-86.5%

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot t\right)}} \]
      9. mul-1-neg86.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{-7}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-215}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-301} \lor \neg \left(y \leq 4.2 \cdot 10^{-155}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 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 := \frac{x\_m}{z \cdot \left(z - t\right)}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-113}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-68} \lor \neg \left(z \leq 1.25 \cdot 10^{-52}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{y \cdot t}\\ \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)))))
   (*
    x_s
    (if (<= z -1.5e-62)
      t_1
      (if (<= z 6.8e-113)
        (/ (/ x_m y) t)
        (if (or (<= z 4.5e-68) (not (<= z 1.25e-52))) t_1 (/ x_m (* y 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 t_1 = x_m / (z * (z - t));
	double tmp;
	if (z <= -1.5e-62) {
		tmp = t_1;
	} else if (z <= 6.8e-113) {
		tmp = (x_m / y) / t;
	} else if ((z <= 4.5e-68) || !(z <= 1.25e-52)) {
		tmp = t_1;
	} else {
		tmp = x_m / (y * 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) :: t_1
    real(8) :: tmp
    t_1 = x_m / (z * (z - t))
    if (z <= (-1.5d-62)) then
        tmp = t_1
    else if (z <= 6.8d-113) then
        tmp = (x_m / y) / t
    else if ((z <= 4.5d-68) .or. (.not. (z <= 1.25d-52))) then
        tmp = t_1
    else
        tmp = x_m / (y * 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 t_1 = x_m / (z * (z - t));
	double tmp;
	if (z <= -1.5e-62) {
		tmp = t_1;
	} else if (z <= 6.8e-113) {
		tmp = (x_m / y) / t;
	} else if ((z <= 4.5e-68) || !(z <= 1.25e-52)) {
		tmp = t_1;
	} else {
		tmp = x_m / (y * 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):
	t_1 = x_m / (z * (z - t))
	tmp = 0
	if z <= -1.5e-62:
		tmp = t_1
	elif z <= 6.8e-113:
		tmp = (x_m / y) / t
	elif (z <= 4.5e-68) or not (z <= 1.25e-52):
		tmp = t_1
	else:
		tmp = x_m / (y * t)
	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)))
	tmp = 0.0
	if (z <= -1.5e-62)
		tmp = t_1;
	elseif (z <= 6.8e-113)
		tmp = Float64(Float64(x_m / y) / t);
	elseif ((z <= 4.5e-68) || !(z <= 1.25e-52))
		tmp = t_1;
	else
		tmp = Float64(x_m / Float64(y * 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)
	t_1 = x_m / (z * (z - t));
	tmp = 0.0;
	if (z <= -1.5e-62)
		tmp = t_1;
	elseif (z <= 6.8e-113)
		tmp = (x_m / y) / t;
	elseif ((z <= 4.5e-68) || ~((z <= 1.25e-52)))
		tmp = t_1;
	else
		tmp = x_m / (y * 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_] := Block[{t$95$1 = N[(x$95$m / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.5e-62], t$95$1, If[LessEqual[z, 6.8e-113], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, 4.5e-68], N[Not[LessEqual[z, 1.25e-52]], $MachinePrecision]], t$95$1, N[(x$95$m / N[(y * t), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-68} \lor \neg \left(z \leq 1.25 \cdot 10^{-52}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.5000000000000001e-62 or 6.8000000000000005e-113 < z < 4.49999999999999999e-68 or 1.25e-52 < z

    1. Initial program 83.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 69.3%

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(0 - \left(t - z\right)\right)}} \]
      5. associate--r-69.3%

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot t\right)}} \]
      9. mul-1-neg69.3%

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

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

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

    if -1.5000000000000001e-62 < z < 6.8000000000000005e-113

    1. Initial program 91.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 83.4%

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

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

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

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

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

    if 4.49999999999999999e-68 < z < 1.25e-52

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-113}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-68} \lor \neg \left(z \leq 1.25 \cdot 10^{-52}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 83.5% accurate, 0.5× 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}\;t \leq -2.8 \cdot 10^{+22}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+121}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{y - 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 (<= t -2.8e+22)
    (/ (/ x_m y) (- t z))
    (if (<= t 2.7e+121) (/ x_m (* (- y z) (- t z))) (/ (/ x_m (- y 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 (t <= -2.8e+22) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 2.7e+121) {
		tmp = x_m / ((y - z) * (t - z));
	} else {
		tmp = (x_m / (y - 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 (t <= (-2.8d+22)) then
        tmp = (x_m / y) / (t - z)
    else if (t <= 2.7d+121) then
        tmp = x_m / ((y - z) * (t - z))
    else
        tmp = (x_m / (y - 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 (t <= -2.8e+22) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 2.7e+121) {
		tmp = x_m / ((y - z) * (t - z));
	} else {
		tmp = (x_m / (y - 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 t <= -2.8e+22:
		tmp = (x_m / y) / (t - z)
	elif t <= 2.7e+121:
		tmp = x_m / ((y - z) * (t - z))
	else:
		tmp = (x_m / (y - 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 (t <= -2.8e+22)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (t <= 2.7e+121)
		tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z)));
	else
		tmp = Float64(Float64(x_m / Float64(y - 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 (t <= -2.8e+22)
		tmp = (x_m / y) / (t - z);
	elseif (t <= 2.7e+121)
		tmp = x_m / ((y - z) * (t - z));
	else
		tmp = (x_m / (y - 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[t, -2.8e+22], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+121], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $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}\;t \leq -2.8 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.8e22

    1. Initial program 88.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*98.3%

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

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

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

    if -2.8e22 < t < 2.7000000000000002e121

    1. Initial program 89.3%

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

    if 2.7000000000000002e121 < t

    1. Initial program 74.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 74.0%

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

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

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

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

Alternative 7: 74.3% accurate, 0.5× 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}\;y \leq -2.15 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-155}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - 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 (<= y -2.15e-5)
    (/ (/ x_m y) (- t z))
    (if (<= y 2.3e-155) (/ (/ x_m z) (- z t)) (/ (/ x_m t) (- 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 (y <= -2.15e-5) {
		tmp = (x_m / y) / (t - z);
	} else if (y <= 2.3e-155) {
		tmp = (x_m / z) / (z - t);
	} else {
		tmp = (x_m / t) / (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 (y <= (-2.15d-5)) then
        tmp = (x_m / y) / (t - z)
    else if (y <= 2.3d-155) then
        tmp = (x_m / z) / (z - t)
    else
        tmp = (x_m / t) / (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 (y <= -2.15e-5) {
		tmp = (x_m / y) / (t - z);
	} else if (y <= 2.3e-155) {
		tmp = (x_m / z) / (z - t);
	} else {
		tmp = (x_m / t) / (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 y <= -2.15e-5:
		tmp = (x_m / y) / (t - z)
	elif y <= 2.3e-155:
		tmp = (x_m / z) / (z - t)
	else:
		tmp = (x_m / t) / (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 (y <= -2.15e-5)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (y <= 2.3e-155)
		tmp = Float64(Float64(x_m / z) / Float64(z - t));
	else
		tmp = Float64(Float64(x_m / t) / 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 (y <= -2.15e-5)
		tmp = (x_m / y) / (t - z);
	elseif (y <= 2.3e-155)
		tmp = (x_m / z) / (z - t);
	else
		tmp = (x_m / t) / (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[y, -2.15e-5], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-155], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - 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}\;y \leq -2.15 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.1500000000000001e-5

    1. Initial program 81.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*98.2%

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

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

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

    if -2.1500000000000001e-5 < y < 2.30000000000000005e-155

    1. Initial program 92.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*97.7%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-1 \cdot x}{z}}}{t - z} \]
      2. neg-mul-184.1%

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

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

    if 2.30000000000000005e-155 < y

    1. Initial program 85.1%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 54.2%

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

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

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

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

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

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

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

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

Alternative 8: 68.4% accurate, 0.5× 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}\;y \leq -4 \cdot 10^{-7}:\\ \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-119}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{y}}{\frac{t}{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 (<= y -4e-7)
    (/ x_m (* y (- t z)))
    (if (<= y 5.2e-119) (/ x_m (* z (- z t))) (/ (/ 1.0 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 (y <= -4e-7) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 5.2e-119) {
		tmp = x_m / (z * (z - t));
	} else {
		tmp = (1.0 / y) / (t / 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 (y <= (-4d-7)) then
        tmp = x_m / (y * (t - z))
    else if (y <= 5.2d-119) then
        tmp = x_m / (z * (z - t))
    else
        tmp = (1.0d0 / y) / (t / 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 (y <= -4e-7) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 5.2e-119) {
		tmp = x_m / (z * (z - t));
	} else {
		tmp = (1.0 / y) / (t / 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 y <= -4e-7:
		tmp = x_m / (y * (t - z))
	elif y <= 5.2e-119:
		tmp = x_m / (z * (z - t))
	else:
		tmp = (1.0 / y) / (t / 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 (y <= -4e-7)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	elseif (y <= 5.2e-119)
		tmp = Float64(x_m / Float64(z * Float64(z - t)));
	else
		tmp = Float64(Float64(1.0 / y) / Float64(t / 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 (y <= -4e-7)
		tmp = x_m / (y * (t - z));
	elseif (y <= 5.2e-119)
		tmp = x_m / (z * (z - t));
	else
		tmp = (1.0 / y) / (t / 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[y, -4e-7], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-119], N[(x$95$m / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] / N[(t / x$95$m), $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}\;y \leq -4 \cdot 10^{-7}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.9999999999999998e-7

    1. Initial program 81.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 77.9%

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

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

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

    if -3.9999999999999998e-7 < y < 5.20000000000000023e-119

    1. Initial program 92.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 80.5%

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in80.5%

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(0 - \left(t - z\right)\right)}} \]
      5. associate--r-80.5%

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

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

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

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

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

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

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

    if 5.20000000000000023e-119 < y

    1. Initial program 84.2%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 46.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    5. Applied egg-rr49.3%

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

        \[\leadsto \color{blue}{\frac{x}{t} \cdot \frac{1}{y}} \]
      2. clear-num49.2%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{y}}}{\frac{t}{x}} \]
    7. Applied egg-rr50.2%

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

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

Alternative 9: 68.3% accurate, 0.5× 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}\;y \leq -2.3 \cdot 10^{-7}:\\ \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-121}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y}\\ \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 (<= y -2.3e-7)
    (/ x_m (* y (- t z)))
    (if (<= y 8.2e-121) (/ x_m (* z (- z t))) (/ (/ 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 tmp;
	if (y <= -2.3e-7) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 8.2e-121) {
		tmp = x_m / (z * (z - t));
	} 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) :: tmp
    if (y <= (-2.3d-7)) then
        tmp = x_m / (y * (t - z))
    else if (y <= 8.2d-121) then
        tmp = x_m / (z * (z - t))
    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 tmp;
	if (y <= -2.3e-7) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 8.2e-121) {
		tmp = x_m / (z * (z - t));
	} 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):
	tmp = 0
	if y <= -2.3e-7:
		tmp = x_m / (y * (t - z))
	elif y <= 8.2e-121:
		tmp = x_m / (z * (z - t))
	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)
	tmp = 0.0
	if (y <= -2.3e-7)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	elseif (y <= 8.2e-121)
		tmp = Float64(x_m / Float64(z * Float64(z - t)));
	else
		tmp = Float64(Float64(x_m / 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)
	tmp = 0.0;
	if (y <= -2.3e-7)
		tmp = x_m / (y * (t - z));
	elseif (y <= 8.2e-121)
		tmp = x_m / (z * (z - t));
	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_] := N[(x$95$s * If[LessEqual[y, -2.3e-7], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e-121], N[(x$95$m / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / y), $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}\;y \leq -2.3 \cdot 10^{-7}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.29999999999999995e-7

    1. Initial program 81.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 77.9%

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

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

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

    if -2.29999999999999995e-7 < y < 8.19999999999999965e-121

    1. Initial program 92.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 81.3%

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(0 - \left(t - z\right)\right)}} \]
      5. associate--r-81.3%

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot t\right)}} \]
      9. mul-1-neg81.3%

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

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

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

    if 8.19999999999999965e-121 < y

    1. Initial program 84.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 46.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    5. Applied egg-rr49.8%

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

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

Alternative 10: 52.7% 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}\;y \leq -4.05 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-121}:\\ \;\;\;\;\frac{\frac{x\_m}{-z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y}\\ \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 (<= y -4.05e-109)
    (/ (/ x_m y) t)
    (if (<= y 4e-121) (/ (/ x_m (- z)) t) (/ (/ 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 tmp;
	if (y <= -4.05e-109) {
		tmp = (x_m / y) / t;
	} else if (y <= 4e-121) {
		tmp = (x_m / -z) / t;
	} 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) :: tmp
    if (y <= (-4.05d-109)) then
        tmp = (x_m / y) / t
    else if (y <= 4d-121) then
        tmp = (x_m / -z) / t
    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 tmp;
	if (y <= -4.05e-109) {
		tmp = (x_m / y) / t;
	} else if (y <= 4e-121) {
		tmp = (x_m / -z) / t;
	} 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):
	tmp = 0
	if y <= -4.05e-109:
		tmp = (x_m / y) / t
	elif y <= 4e-121:
		tmp = (x_m / -z) / t
	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)
	tmp = 0.0
	if (y <= -4.05e-109)
		tmp = Float64(Float64(x_m / y) / t);
	elseif (y <= 4e-121)
		tmp = Float64(Float64(x_m / Float64(-z)) / t);
	else
		tmp = Float64(Float64(x_m / 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)
	tmp = 0.0;
	if (y <= -4.05e-109)
		tmp = (x_m / y) / t;
	elseif (y <= 4e-121)
		tmp = (x_m / -z) / t;
	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_] := N[(x$95$s * If[LessEqual[y, -4.05e-109], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 4e-121], N[(N[(x$95$m / (-z)), $MachinePrecision] / t), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / y), $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}\;y \leq -4.05 \cdot 10^{-109}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.0500000000000001e-109

    1. Initial program 83.9%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 58.8%

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

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

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

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

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

    if -4.0500000000000001e-109 < y < 3.9999999999999999e-121

    1. Initial program 93.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 58.5%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-1 \cdot x}{z}}}{t - z} \]
      2. neg-mul-190.5%

        \[\leadsto \frac{\frac{\color{blue}{-x}}{z}}{t - z} \]
    8. Simplified56.1%

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

    if 3.9999999999999999e-121 < y

    1. Initial program 84.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 46.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    5. Applied egg-rr49.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.05 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-121}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 51.8% 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}\;y \leq -1.06 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-121}:\\ \;\;\;\;\frac{-x\_m}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y}\\ \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 (<= y -1.06e-108)
    (/ (/ x_m y) t)
    (if (<= y 5.4e-121) (/ (- x_m) (* z t)) (/ (/ 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 tmp;
	if (y <= -1.06e-108) {
		tmp = (x_m / y) / t;
	} else if (y <= 5.4e-121) {
		tmp = -x_m / (z * t);
	} 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) :: tmp
    if (y <= (-1.06d-108)) then
        tmp = (x_m / y) / t
    else if (y <= 5.4d-121) then
        tmp = -x_m / (z * t)
    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 tmp;
	if (y <= -1.06e-108) {
		tmp = (x_m / y) / t;
	} else if (y <= 5.4e-121) {
		tmp = -x_m / (z * t);
	} 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):
	tmp = 0
	if y <= -1.06e-108:
		tmp = (x_m / y) / t
	elif y <= 5.4e-121:
		tmp = -x_m / (z * t)
	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)
	tmp = 0.0
	if (y <= -1.06e-108)
		tmp = Float64(Float64(x_m / y) / t);
	elseif (y <= 5.4e-121)
		tmp = Float64(Float64(-x_m) / Float64(z * t));
	else
		tmp = Float64(Float64(x_m / 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)
	tmp = 0.0;
	if (y <= -1.06e-108)
		tmp = (x_m / y) / t;
	elseif (y <= 5.4e-121)
		tmp = -x_m / (z * t);
	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_] := N[(x$95$s * If[LessEqual[y, -1.06e-108], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 5.4e-121], N[((-x$95$m) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / y), $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}\;y \leq -1.06 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.06e-108

    1. Initial program 83.9%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 58.8%

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

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

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

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

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

    if -1.06e-108 < y < 5.4000000000000004e-121

    1. Initial program 93.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 58.5%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{t \cdot z}} \]
      2. neg-mul-153.0%

        \[\leadsto \frac{\color{blue}{-x}}{t \cdot z} \]
    8. Simplified53.0%

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

    if 5.4000000000000004e-121 < y

    1. Initial program 84.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 46.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    5. Applied egg-rr49.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-121}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 44.5% accurate, 0.9× 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}\;y \leq -3 \cdot 10^{-92}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y}\\ \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 (<= y -3e-92) (/ (/ x_m y) t) (/ (/ 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 tmp;
	if (y <= -3e-92) {
		tmp = (x_m / y) / t;
	} 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) :: tmp
    if (y <= (-3d-92)) then
        tmp = (x_m / y) / t
    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 tmp;
	if (y <= -3e-92) {
		tmp = (x_m / y) / t;
	} 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):
	tmp = 0
	if y <= -3e-92:
		tmp = (x_m / y) / t
	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)
	tmp = 0.0
	if (y <= -3e-92)
		tmp = Float64(Float64(x_m / y) / t);
	else
		tmp = Float64(Float64(x_m / 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)
	tmp = 0.0;
	if (y <= -3e-92)
		tmp = (x_m / y) / t;
	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_] := N[(x$95$s * If[LessEqual[y, -3e-92], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / y), $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}\;y \leq -3 \cdot 10^{-92}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.00000000000000013e-92

    1. Initial program 83.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 58.0%

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

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

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

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

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

    if -3.00000000000000013e-92 < y

    1. Initial program 88.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 34.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    5. Applied egg-rr40.5%

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

Alternative 13: 97.2% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{\frac{x\_m}{y - z}}{t - z} \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(Float64(x_m / 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[(N[(x$95$m / N[(y - z), $MachinePrecision]), $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 \frac{\frac{x\_m}{y - z}}{t - z}
\end{array}
Derivation
  1. Initial program 86.9%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-/r*98.2%

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

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

Alternative 14: 97.1% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{\frac{x\_m}{t - z}}{y - z} \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 (- t z)) (- 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) {
	return x_s * ((x_m / (t - z)) / (y - 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 / (t - z)) / (y - 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 / (t - z)) / (y - 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 / (t - z)) / (y - 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(Float64(x_m / Float64(t - z)) / Float64(y - 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 / (t - z)) / (y - 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[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0 86.9%

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

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

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

Alternative 15: 43.6% accurate, 1.8× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{\frac{x\_m}{t}}{y} \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 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) {
	return x_s * ((x_m / t) / y);
}
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 / t) / y)
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 / t) / y);
}
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 / t) / y)
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	return Float64(x_s * Float64(Float64(x_m / t) / y))
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 / t) / y);
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[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in z around 0 39.3%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
  5. Applied egg-rr44.8%

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

Alternative 16: 39.8% accurate, 1.8× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{x\_m}{y \cdot t} \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 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) {
	return x_s * (x_m / (y * t));
}
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 * t))
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 * t));
}
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 * t))
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(y * t)))
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 * t));
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[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

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

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in z around 0 39.3%

    \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
  4. Final simplification39.3%

    \[\leadsto \frac{x}{y \cdot t} \]
  5. Add Preprocessing

Developer target: 87.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;\frac{x}{t\_1} < 0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (- t z))))
   (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if ((x / t_1) < 0.0) {
		tmp = (x / (y - z)) / (t - z);
	} else {
		tmp = x * (1.0 / t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (t - z)
    if ((x / t_1) < 0.0d0) then
        tmp = (x / (y - z)) / (t - z)
    else
        tmp = x * (1.0d0 / t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if ((x / t_1) < 0.0) {
		tmp = (x / (y - z)) / (t - z);
	} else {
		tmp = x * (1.0 / t_1);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if (x / t_1) < 0.0:
		tmp = (x / (y - z)) / (t - z)
	else:
		tmp = x * (1.0 / t_1)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (Float64(x / t_1) < 0.0)
		tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z));
	else
		tmp = Float64(x * Float64(1.0 / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if ((x / t_1) < 0.0)
		tmp = (x / (y - z)) / (t - z);
	else
		tmp = x * (1.0 / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t\_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t\_1}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024095 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :alt
  (if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))

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