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

Percentage Accurate: 88.5% → 98.0%
Time: 16.4s
Alternatives: 20
Speedup: 0.4×

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -1.00000000000000003e-306

    1. Initial program 96.6%

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

    if -1.00000000000000003e-306 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 81.8%

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

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

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

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

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

Alternative 2: 49.6% 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 -1.5 \cdot 10^{+291}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x\_m}{y}\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{+24}:\\ \;\;\;\;\frac{x\_m}{-y \cdot z}\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-66}:\\ \;\;\;\;\frac{x\_m}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;y \leq 14500:\\ \;\;\;\;\frac{\frac{x\_m}{-t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{y \cdot \frac{t}{x\_m}}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= y -1.5e+291)
    (* (/ -1.0 z) (/ x_m y))
    (if (<= y -4.6e+68)
      (/ (/ x_m y) t)
      (if (<= y -1.3e+24)
        (/ x_m (- (* y z)))
        (if (<= y -8.2e-66)
          (* (/ x_m t) (/ 1.0 y))
          (if (<= y 14500.0) (/ (/ x_m (- t)) z) (/ 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 <= -1.5e+291) {
		tmp = (-1.0 / z) * (x_m / y);
	} else if (y <= -4.6e+68) {
		tmp = (x_m / y) / t;
	} else if (y <= -1.3e+24) {
		tmp = x_m / -(y * z);
	} else if (y <= -8.2e-66) {
		tmp = (x_m / t) * (1.0 / y);
	} else if (y <= 14500.0) {
		tmp = (x_m / -t) / z;
	} 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 <= (-1.5d+291)) then
        tmp = ((-1.0d0) / z) * (x_m / y)
    else if (y <= (-4.6d+68)) then
        tmp = (x_m / y) / t
    else if (y <= (-1.3d+24)) then
        tmp = x_m / -(y * z)
    else if (y <= (-8.2d-66)) then
        tmp = (x_m / t) * (1.0d0 / y)
    else if (y <= 14500.0d0) then
        tmp = (x_m / -t) / z
    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 <= -1.5e+291) {
		tmp = (-1.0 / z) * (x_m / y);
	} else if (y <= -4.6e+68) {
		tmp = (x_m / y) / t;
	} else if (y <= -1.3e+24) {
		tmp = x_m / -(y * z);
	} else if (y <= -8.2e-66) {
		tmp = (x_m / t) * (1.0 / y);
	} else if (y <= 14500.0) {
		tmp = (x_m / -t) / z;
	} 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 <= -1.5e+291:
		tmp = (-1.0 / z) * (x_m / y)
	elif y <= -4.6e+68:
		tmp = (x_m / y) / t
	elif y <= -1.3e+24:
		tmp = x_m / -(y * z)
	elif y <= -8.2e-66:
		tmp = (x_m / t) * (1.0 / y)
	elif y <= 14500.0:
		tmp = (x_m / -t) / z
	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 <= -1.5e+291)
		tmp = Float64(Float64(-1.0 / z) * Float64(x_m / y));
	elseif (y <= -4.6e+68)
		tmp = Float64(Float64(x_m / y) / t);
	elseif (y <= -1.3e+24)
		tmp = Float64(x_m / Float64(-Float64(y * z)));
	elseif (y <= -8.2e-66)
		tmp = Float64(Float64(x_m / t) * Float64(1.0 / y));
	elseif (y <= 14500.0)
		tmp = Float64(Float64(x_m / Float64(-t)) / z);
	else
		tmp = Float64(1.0 / Float64(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 <= -1.5e+291)
		tmp = (-1.0 / z) * (x_m / y);
	elseif (y <= -4.6e+68)
		tmp = (x_m / y) / t;
	elseif (y <= -1.3e+24)
		tmp = x_m / -(y * z);
	elseif (y <= -8.2e-66)
		tmp = (x_m / t) * (1.0 / y);
	elseif (y <= 14500.0)
		tmp = (x_m / -t) / z;
	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, -1.5e+291], N[(N[(-1.0 / z), $MachinePrecision] * N[(x$95$m / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.6e+68], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, -1.3e+24], N[(x$95$m / (-N[(y * z), $MachinePrecision])), $MachinePrecision], If[LessEqual[y, -8.2e-66], N[(N[(x$95$m / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 14500.0], N[(N[(x$95$m / (-t)), $MachinePrecision] / z), $MachinePrecision], N[(1.0 / N[(y * N[(t / x$95$m), $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 -1.5 \cdot 10^{+291}:\\
\;\;\;\;\frac{-1}{z} \cdot \frac{x\_m}{y}\\

\mathbf{elif}\;y \leq -4.6 \cdot 10^{+68}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{+24}:\\
\;\;\;\;\frac{x\_m}{-y \cdot z}\\

\mathbf{elif}\;y \leq -8.2 \cdot 10^{-66}:\\
\;\;\;\;\frac{x\_m}{t} \cdot \frac{1}{y}\\

\mathbf{elif}\;y \leq 14500:\\
\;\;\;\;\frac{\frac{x\_m}{-t}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.50000000000000008e291

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\frac{1}{z}}{y - z}} \]
      3. add-sqr-sqrt49.6%

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\frac{1}{z}}{y - z} \]
      5. sqr-neg52.2%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\frac{1}{z}}{y - z} \]
      6. sqrt-unprod26.5%

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

        \[\leadsto \color{blue}{x} \cdot \frac{\frac{1}{z}}{y - z} \]
    9. Applied egg-rr28.6%

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified28.6%

      \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    15. Step-by-step derivation
      1. frac-2neg28.6%

        \[\leadsto \color{blue}{\frac{-x}{-z \cdot y}} \]
      2. neg-mul-128.6%

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

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

        \[\leadsto \color{blue}{\frac{-1}{z} \cdot \frac{x}{-y}} \]
      5. add-sqr-sqrt27.9%

        \[\leadsto \frac{-1}{z} \cdot \frac{x}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}} \]
      6. sqrt-unprod29.4%

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

        \[\leadsto \frac{-1}{z} \cdot \frac{x}{\sqrt{\color{blue}{y \cdot y}}} \]
      8. sqrt-unprod0.0%

        \[\leadsto \frac{-1}{z} \cdot \frac{x}{\color{blue}{\sqrt{y} \cdot \sqrt{y}}} \]
      9. add-sqr-sqrt81.9%

        \[\leadsto \frac{-1}{z} \cdot \frac{x}{\color{blue}{y}} \]
    16. Applied egg-rr81.9%

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

    if -1.50000000000000008e291 < y < -4.6e68

    1. Initial program 81.7%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv99.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
    9. Simplified71.9%

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

    if -4.6e68 < y < -1.2999999999999999e24

    1. Initial program 99.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{y \cdot z}} \]
    9. Step-by-step derivation
      1. mul-1-neg76.2%

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

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

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

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

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

    if -1.2999999999999999e24 < y < -8.19999999999999996e-66

    1. Initial program 78.3%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
      2. div-inv53.4%

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

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

    if -8.19999999999999996e-66 < y < 14500

    1. Initial program 92.7%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{t}}{z}} \]
      3. distribute-neg-frac247.8%

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

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

    if 14500 < y

    1. Initial program 74.5%

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

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    4. Step-by-step derivation
      1. clear-num45.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{t \cdot y}{x}}} \]
      2. inv-pow45.6%

        \[\leadsto \color{blue}{{\left(\frac{t \cdot y}{x}\right)}^{-1}} \]
      3. *-commutative45.6%

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

        \[\leadsto {\color{blue}{\left(y \cdot \frac{t}{x}\right)}}^{-1} \]
    5. Applied egg-rr55.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+291}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{+24}:\\ \;\;\;\;\frac{x}{-y \cdot z}\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-66}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;y \leq 14500:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{y \cdot \frac{t}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 92.5% accurate, 0.3× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{1}{\left(y - z\right) \cdot \frac{t}{x\_m}}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;\frac{x\_m}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - y}\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (- t z))))
   (*
    x_s
    (if (<= t_1 (- INFINITY))
      (/ 1.0 (* (- y z) (/ t x_m)))
      (if (<= t_1 2e+307) (/ x_m t_1) (/ (/ x_m z) (- z y)))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = 1.0 / ((y - z) * (t / x_m));
	} else if (t_1 <= 2e+307) {
		tmp = x_m / t_1;
	} else {
		tmp = (x_m / z) / (z - y);
	}
	return x_s * tmp;
}
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 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = 1.0 / ((y - z) * (t / x_m));
	} else if (t_1 <= 2e+307) {
		tmp = x_m / t_1;
	} else {
		tmp = (x_m / z) / (z - y);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = 1.0 / ((y - z) * (t / x_m))
	elif t_1 <= 2e+307:
		tmp = x_m / t_1
	else:
		tmp = (x_m / z) / (z - y)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(1.0 / Float64(Float64(y - z) * Float64(t / x_m)));
	elseif (t_1 <= 2e+307)
		tmp = Float64(x_m / t_1);
	else
		tmp = Float64(Float64(x_m / z) / Float64(z - y));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = 1.0 / ((y - z) * (t / x_m));
	elseif (t_1 <= 2e+307)
		tmp = x_m / t_1;
	else
		tmp = (x_m / z) / (z - y);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(1.0 / N[(N[(y - z), $MachinePrecision] * N[(t / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+307], N[(x$95$m / t$95$1), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;\frac{x\_m}{t\_1}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0

    1. Initial program 52.8%

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    6. Step-by-step derivation
      1. clear-num77.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{\frac{x}{t}}}} \]
      2. inv-pow77.2%

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

        \[\leadsto {\color{blue}{\left(\left(y - z\right) \cdot \frac{1}{\frac{x}{t}}\right)}}^{-1} \]
      4. clear-num77.2%

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1.99999999999999997e307

    1. Initial program 97.8%

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

    if 1.99999999999999997e307 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

Alternative 4: 93.2% 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 := \left(y - z\right) \cdot \left(t - z\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{1}{\left(y - z\right) \cdot \frac{t}{x\_m}}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;\frac{x\_m}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-1}{z}}{\frac{y - z}{x\_m}}\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (- t z))))
   (*
    x_s
    (if (<= t_1 (- INFINITY))
      (/ 1.0 (* (- y z) (/ t x_m)))
      (if (<= t_1 2e+307) (/ x_m t_1) (/ (/ -1.0 z) (/ (- y z) 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 t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = 1.0 / ((y - z) * (t / x_m));
	} else if (t_1 <= 2e+307) {
		tmp = x_m / t_1;
	} else {
		tmp = (-1.0 / z) / ((y - z) / x_m);
	}
	return x_s * tmp;
}
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 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = 1.0 / ((y - z) * (t / x_m));
	} else if (t_1 <= 2e+307) {
		tmp = x_m / t_1;
	} else {
		tmp = (-1.0 / z) / ((y - z) / 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):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = 1.0 / ((y - z) * (t / x_m))
	elif t_1 <= 2e+307:
		tmp = x_m / t_1
	else:
		tmp = (-1.0 / z) / ((y - z) / 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)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(1.0 / Float64(Float64(y - z) * Float64(t / x_m)));
	elseif (t_1 <= 2e+307)
		tmp = Float64(x_m / t_1);
	else
		tmp = Float64(Float64(-1.0 / z) / Float64(Float64(y - z) / 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)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = 1.0 / ((y - z) * (t / x_m));
	elseif (t_1 <= 2e+307)
		tmp = x_m / t_1;
	else
		tmp = (-1.0 / z) / ((y - z) / 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_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(1.0 / N[(N[(y - z), $MachinePrecision] * N[(t / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+307], N[(x$95$m / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(y - z), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;\frac{x\_m}{t\_1}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0

    1. Initial program 52.8%

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    6. Step-by-step derivation
      1. clear-num77.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{\frac{x}{t}}}} \]
      2. inv-pow77.2%

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

        \[\leadsto {\color{blue}{\left(\left(y - z\right) \cdot \frac{1}{\frac{x}{t}}\right)}}^{-1} \]
      4. clear-num77.2%

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1.99999999999999997e307

    1. Initial program 97.8%

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

    if 1.99999999999999997e307 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 73.7%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv99.8%

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

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

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

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

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

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

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

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

Alternative 5: 69.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}\;t \leq -3.2 \cdot 10^{-275}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-141}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - y}\\ \mathbf{elif}\;t \leq 0.006:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - t}\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{+175}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(y - z\right) \cdot \frac{t}{x\_m}}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -3.2e-275)
    (/ (/ x_m y) (- t z))
    (if (<= t 8.6e-141)
      (/ (/ x_m z) (- z y))
      (if (<= t 0.006)
        (/ (/ x_m z) (- z t))
        (if (<= t 2.95e+175)
          (/ x_m (* (- y z) t))
          (/ 1.0 (* (- y z) (/ 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 (t <= -3.2e-275) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 8.6e-141) {
		tmp = (x_m / z) / (z - y);
	} else if (t <= 0.006) {
		tmp = (x_m / z) / (z - t);
	} else if (t <= 2.95e+175) {
		tmp = x_m / ((y - z) * t);
	} else {
		tmp = 1.0 / ((y - z) * (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 (t <= (-3.2d-275)) then
        tmp = (x_m / y) / (t - z)
    else if (t <= 8.6d-141) then
        tmp = (x_m / z) / (z - y)
    else if (t <= 0.006d0) then
        tmp = (x_m / z) / (z - t)
    else if (t <= 2.95d+175) then
        tmp = x_m / ((y - z) * t)
    else
        tmp = 1.0d0 / ((y - z) * (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 (t <= -3.2e-275) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 8.6e-141) {
		tmp = (x_m / z) / (z - y);
	} else if (t <= 0.006) {
		tmp = (x_m / z) / (z - t);
	} else if (t <= 2.95e+175) {
		tmp = x_m / ((y - z) * t);
	} else {
		tmp = 1.0 / ((y - z) * (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 t <= -3.2e-275:
		tmp = (x_m / y) / (t - z)
	elif t <= 8.6e-141:
		tmp = (x_m / z) / (z - y)
	elif t <= 0.006:
		tmp = (x_m / z) / (z - t)
	elif t <= 2.95e+175:
		tmp = x_m / ((y - z) * t)
	else:
		tmp = 1.0 / ((y - z) * (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 (t <= -3.2e-275)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (t <= 8.6e-141)
		tmp = Float64(Float64(x_m / z) / Float64(z - y));
	elseif (t <= 0.006)
		tmp = Float64(Float64(x_m / z) / Float64(z - t));
	elseif (t <= 2.95e+175)
		tmp = Float64(x_m / Float64(Float64(y - z) * t));
	else
		tmp = Float64(1.0 / Float64(Float64(y - z) * 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 (t <= -3.2e-275)
		tmp = (x_m / y) / (t - z);
	elseif (t <= 8.6e-141)
		tmp = (x_m / z) / (z - y);
	elseif (t <= 0.006)
		tmp = (x_m / z) / (z - t);
	elseif (t <= 2.95e+175)
		tmp = x_m / ((y - z) * t);
	else
		tmp = 1.0 / ((y - z) * (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[t, -3.2e-275], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.6e-141], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.006], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.95e+175], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(y - z), $MachinePrecision] * N[(t / x$95$m), $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}\;t \leq -3.2 \cdot 10^{-275}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

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

\mathbf{elif}\;t \leq 0.006:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{z - t}\\

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

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


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

    1. Initial program 84.7%

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

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

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

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

    if -3.2e-275 < t < 8.59999999999999948e-141

    1. Initial program 79.5%

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

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

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

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

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

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

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

    if 8.59999999999999948e-141 < t < 0.0060000000000000001

    1. Initial program 96.3%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{t - z}} \]
      3. distribute-neg-frac267.9%

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

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

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

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

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

    if 0.0060000000000000001 < t < 2.95000000000000015e175

    1. Initial program 86.5%

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

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

    if 2.95000000000000015e175 < t

    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 83.5%

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{\frac{x}{t}}}} \]
      2. inv-pow99.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-275}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-141}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{elif}\;t \leq 0.006:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{+175}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(y - z\right) \cdot \frac{t}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 70.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}\;t \leq -3.2 \cdot 10^{-275}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-139}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - y}\\ \mathbf{elif}\;t \leq 0.0048:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - t}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+174}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -3.2e-275)
    (/ (/ x_m y) (- t z))
    (if (<= t 3e-139)
      (/ (/ x_m z) (- z y))
      (if (<= t 0.0048)
        (/ (/ x_m z) (- z t))
        (if (<= t 5.8e+174) (/ x_m (* (- y 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 (t <= -3.2e-275) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 3e-139) {
		tmp = (x_m / z) / (z - y);
	} else if (t <= 0.0048) {
		tmp = (x_m / z) / (z - t);
	} else if (t <= 5.8e+174) {
		tmp = x_m / ((y - 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 (t <= (-3.2d-275)) then
        tmp = (x_m / y) / (t - z)
    else if (t <= 3d-139) then
        tmp = (x_m / z) / (z - y)
    else if (t <= 0.0048d0) then
        tmp = (x_m / z) / (z - t)
    else if (t <= 5.8d+174) then
        tmp = x_m / ((y - 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 (t <= -3.2e-275) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 3e-139) {
		tmp = (x_m / z) / (z - y);
	} else if (t <= 0.0048) {
		tmp = (x_m / z) / (z - t);
	} else if (t <= 5.8e+174) {
		tmp = x_m / ((y - 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 t <= -3.2e-275:
		tmp = (x_m / y) / (t - z)
	elif t <= 3e-139:
		tmp = (x_m / z) / (z - y)
	elif t <= 0.0048:
		tmp = (x_m / z) / (z - t)
	elif t <= 5.8e+174:
		tmp = x_m / ((y - 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 (t <= -3.2e-275)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (t <= 3e-139)
		tmp = Float64(Float64(x_m / z) / Float64(z - y));
	elseif (t <= 0.0048)
		tmp = Float64(Float64(x_m / z) / Float64(z - t));
	elseif (t <= 5.8e+174)
		tmp = Float64(x_m / Float64(Float64(y - 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 (t <= -3.2e-275)
		tmp = (x_m / y) / (t - z);
	elseif (t <= 3e-139)
		tmp = (x_m / z) / (z - y);
	elseif (t <= 0.0048)
		tmp = (x_m / z) / (z - t);
	elseif (t <= 5.8e+174)
		tmp = x_m / ((y - 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[t, -3.2e-275], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-139], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.0048], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+174], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * 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}\;t \leq -3.2 \cdot 10^{-275}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

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

\mathbf{elif}\;t \leq 0.0048:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{z - t}\\

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

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


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

    1. Initial program 84.7%

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

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

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

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

    if -3.2e-275 < t < 2.9999999999999999e-139

    1. Initial program 79.5%

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

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

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

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

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

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

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

    if 2.9999999999999999e-139 < t < 0.00479999999999999958

    1. Initial program 96.3%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{t - z}} \]
      3. distribute-neg-frac267.9%

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

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

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

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

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

    if 0.00479999999999999958 < t < 5.7999999999999999e174

    1. Initial program 86.5%

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

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

    if 5.7999999999999999e174 < t

    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 83.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-275}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-139}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{elif}\;t \leq 0.0048:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

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

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.79999999999999965e-106 or 4.59999999999999969e104 < z < 8.5000000000000003e173

    1. Initial program 80.5%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    7. Step-by-step derivation
      1. mul-1-neg43.0%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{t}}{z}} \]
      3. distribute-neg-frac241.9%

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

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

    if -6.79999999999999965e-106 < z < 4.59999999999999969e104

    1. Initial program 89.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv96.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
    9. Simplified67.4%

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

    if 8.5000000000000003e173 < z < 1.8499999999999999e247

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\frac{1}{z}}{y - z}} \]
      3. add-sqr-sqrt46.6%

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\frac{1}{z}}{y - z} \]
      5. sqr-neg76.9%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\frac{1}{z}}{y - z} \]
      6. sqrt-unprod31.6%

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

        \[\leadsto \color{blue}{x} \cdot \frac{\frac{1}{z}}{y - z} \]
    9. Applied egg-rr78.1%

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative43.5%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified43.5%

      \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    15. Taylor expanded in x around 0 43.5%

      \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \]
    16. Step-by-step derivation
      1. *-commutative43.5%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
      2. associate-/r*65.0%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
    17. Simplified65.0%

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

    if 1.8499999999999999e247 < z

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x}{t \cdot z}} \]
      2. distribute-frac-neg53.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{-106}:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+173}:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+247}:\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.5% accurate, 0.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{-186}:\\ \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{-112}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+174}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -2.1e-186)
    (/ x_m (* y (- t z)))
    (if (<= t 3.25e-112)
      (/ x_m (* z (- z y)))
      (if (<= t 5.8e+174) (/ x_m (* (- y 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 (t <= -2.1e-186) {
		tmp = x_m / (y * (t - z));
	} else if (t <= 3.25e-112) {
		tmp = x_m / (z * (z - y));
	} else if (t <= 5.8e+174) {
		tmp = x_m / ((y - 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 (t <= (-2.1d-186)) then
        tmp = x_m / (y * (t - z))
    else if (t <= 3.25d-112) then
        tmp = x_m / (z * (z - y))
    else if (t <= 5.8d+174) then
        tmp = x_m / ((y - 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 (t <= -2.1e-186) {
		tmp = x_m / (y * (t - z));
	} else if (t <= 3.25e-112) {
		tmp = x_m / (z * (z - y));
	} else if (t <= 5.8e+174) {
		tmp = x_m / ((y - 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 t <= -2.1e-186:
		tmp = x_m / (y * (t - z))
	elif t <= 3.25e-112:
		tmp = x_m / (z * (z - y))
	elif t <= 5.8e+174:
		tmp = x_m / ((y - 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 (t <= -2.1e-186)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	elseif (t <= 3.25e-112)
		tmp = Float64(x_m / Float64(z * Float64(z - y)));
	elseif (t <= 5.8e+174)
		tmp = Float64(x_m / Float64(Float64(y - 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 (t <= -2.1e-186)
		tmp = x_m / (y * (t - z));
	elseif (t <= 3.25e-112)
		tmp = x_m / (z * (z - y));
	elseif (t <= 5.8e+174)
		tmp = x_m / ((y - 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[t, -2.1e-186], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.25e-112], N[(x$95$m / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+174], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * 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}\;t \leq -2.1 \cdot 10^{-186}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.1000000000000002e-186

    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 inf 61.9%

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

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

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

    if -2.1000000000000002e-186 < t < 3.24999999999999978e-112

    1. Initial program 83.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{-1 \cdot \left(y \cdot z\right) + {z}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*65.7%

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot y\right)}} \]
      5. mul-1-neg70.6%

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

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

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

    if 3.24999999999999978e-112 < t < 5.7999999999999999e174

    1. Initial program 90.5%

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

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

    if 5.7999999999999999e174 < t

    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 83.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{-186}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{-112}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 68.1% accurate, 0.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{-290}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-111}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+174}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -1.7e-290)
    (/ (/ x_m y) (- t z))
    (if (<= t 9.2e-111)
      (/ x_m (* z (- z y)))
      (if (<= t 5.5e+174) (/ x_m (* (- y 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 (t <= -1.7e-290) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 9.2e-111) {
		tmp = x_m / (z * (z - y));
	} else if (t <= 5.5e+174) {
		tmp = x_m / ((y - 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 (t <= (-1.7d-290)) then
        tmp = (x_m / y) / (t - z)
    else if (t <= 9.2d-111) then
        tmp = x_m / (z * (z - y))
    else if (t <= 5.5d+174) then
        tmp = x_m / ((y - 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 (t <= -1.7e-290) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 9.2e-111) {
		tmp = x_m / (z * (z - y));
	} else if (t <= 5.5e+174) {
		tmp = x_m / ((y - 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 t <= -1.7e-290:
		tmp = (x_m / y) / (t - z)
	elif t <= 9.2e-111:
		tmp = x_m / (z * (z - y))
	elif t <= 5.5e+174:
		tmp = x_m / ((y - 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 (t <= -1.7e-290)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (t <= 9.2e-111)
		tmp = Float64(x_m / Float64(z * Float64(z - y)));
	elseif (t <= 5.5e+174)
		tmp = Float64(x_m / Float64(Float64(y - 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 (t <= -1.7e-290)
		tmp = (x_m / y) / (t - z);
	elseif (t <= 9.2e-111)
		tmp = x_m / (z * (z - y));
	elseif (t <= 5.5e+174)
		tmp = x_m / ((y - 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[t, -1.7e-290], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e-111], N[(x$95$m / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+174], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * 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}\;t \leq -1.7 \cdot 10^{-290}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.69999999999999992e-290

    1. Initial program 84.1%

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

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

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

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

    if -1.69999999999999992e-290 < t < 9.2e-111

    1. Initial program 82.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{-1 \cdot \left(y \cdot z\right) + {z}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*61.6%

        \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot y\right) \cdot z} + {z}^{2}} \]
      2. unpow261.6%

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

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

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

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

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

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

    if 9.2e-111 < t < 5.4999999999999998e174

    1. Initial program 90.2%

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

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

    if 5.4999999999999998e174 < t

    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 83.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{-290}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-111}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 97.6% accurate, 0.4× 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}{\left(y - z\right) \cdot \left(t - z\right)}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-254}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t - z}}{y - z}\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (/ x_m (* (- y z) (- t z)))))
   (* x_s (if (<= t_1 -5e-254) t_1 (/ (/ 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) {
	double t_1 = x_m / ((y - z) * (t - z));
	double tmp;
	if (t_1 <= -5e-254) {
		tmp = t_1;
	} else {
		tmp = (x_m / (t - z)) / (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) :: t_1
    real(8) :: tmp
    t_1 = x_m / ((y - z) * (t - z))
    if (t_1 <= (-5d-254)) then
        tmp = t_1
    else
        tmp = (x_m / (t - z)) / (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 t_1 = x_m / ((y - z) * (t - z));
	double tmp;
	if (t_1 <= -5e-254) {
		tmp = t_1;
	} else {
		tmp = (x_m / (t - z)) / (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):
	t_1 = x_m / ((y - z) * (t - z))
	tmp = 0
	if t_1 <= -5e-254:
		tmp = t_1
	else:
		tmp = (x_m / (t - z)) / (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)
	t_1 = Float64(x_m / Float64(Float64(y - z) * Float64(t - z)))
	tmp = 0.0
	if (t_1 <= -5e-254)
		tmp = t_1;
	else
		tmp = Float64(Float64(x_m / Float64(t - z)) / 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)
	t_1 = x_m / ((y - z) * (t - z));
	tmp = 0.0;
	if (t_1 <= -5e-254)
		tmp = t_1;
	else
		tmp = (x_m / (t - z)) / (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_] := Block[{t$95$1 = N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, -5e-254], t$95$1, 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)

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -5.0000000000000003e-254

    1. Initial program 96.5%

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

    if -5.0000000000000003e-254 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 82.0%

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

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

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

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

Alternative 11: 56.8% 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 -1.75 \cdot 10^{-151}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{elif}\;t \leq 6.9 \cdot 10^{-146}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x\_m}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -1.75e-151)
    (/ (/ x_m y) t)
    (if (<= t 6.9e-146) (* (/ -1.0 z) (/ x_m y)) (/ 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 <= -1.75e-151) {
		tmp = (x_m / y) / t;
	} else if (t <= 6.9e-146) {
		tmp = (-1.0 / z) * (x_m / y);
	} 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 <= (-1.75d-151)) then
        tmp = (x_m / y) / t
    else if (t <= 6.9d-146) then
        tmp = ((-1.0d0) / z) * (x_m / y)
    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 <= -1.75e-151) {
		tmp = (x_m / y) / t;
	} else if (t <= 6.9e-146) {
		tmp = (-1.0 / z) * (x_m / y);
	} 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 <= -1.75e-151:
		tmp = (x_m / y) / t
	elif t <= 6.9e-146:
		tmp = (-1.0 / z) * (x_m / y)
	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 <= -1.75e-151)
		tmp = Float64(Float64(x_m / y) / t);
	elseif (t <= 6.9e-146)
		tmp = Float64(Float64(-1.0 / z) * Float64(x_m / y));
	else
		tmp = Float64(x_m / Float64(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 <= -1.75e-151)
		tmp = (x_m / y) / t;
	elseif (t <= 6.9e-146)
		tmp = (-1.0 / z) * (x_m / y);
	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, -1.75e-151], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 6.9e-146], N[(N[(-1.0 / z), $MachinePrecision] * N[(x$95$m / y), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $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}\;t \leq -1.75 \cdot 10^{-151}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\

\mathbf{elif}\;t \leq 6.9 \cdot 10^{-146}:\\
\;\;\;\;\frac{-1}{z} \cdot \frac{x\_m}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.74999999999999998e-151

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv98.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
    9. Simplified60.0%

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

    if -1.74999999999999998e-151 < t < 6.9000000000000002e-146

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\frac{1}{z}}{y - z}} \]
      3. add-sqr-sqrt42.9%

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\frac{1}{z}}{y - z} \]
      5. sqr-neg46.8%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\frac{1}{z}}{y - z} \]
      6. sqrt-unprod11.6%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\frac{1}{z}}{y - z} \]
      7. add-sqr-sqrt28.0%

        \[\leadsto \color{blue}{x} \cdot \frac{\frac{1}{z}}{y - z} \]
    9. Applied egg-rr28.0%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 1}{z \cdot \left(y - z\right)}} \]
      3. *-rgt-identity28.0%

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

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

      \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative21.8%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified21.8%

      \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    15. Step-by-step derivation
      1. frac-2neg21.8%

        \[\leadsto \color{blue}{\frac{-x}{-z \cdot y}} \]
      2. neg-mul-121.8%

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

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

        \[\leadsto \color{blue}{\frac{-1}{z} \cdot \frac{x}{-y}} \]
      5. add-sqr-sqrt7.6%

        \[\leadsto \frac{-1}{z} \cdot \frac{x}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}} \]
      6. sqrt-unprod26.7%

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

        \[\leadsto \frac{-1}{z} \cdot \frac{x}{\sqrt{\color{blue}{y \cdot y}}} \]
      8. sqrt-unprod26.6%

        \[\leadsto \frac{-1}{z} \cdot \frac{x}{\color{blue}{\sqrt{y} \cdot \sqrt{y}}} \]
      9. add-sqr-sqrt57.1%

        \[\leadsto \frac{-1}{z} \cdot \frac{x}{\color{blue}{y}} \]
    16. Applied egg-rr57.1%

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

    if 6.9000000000000002e-146 < t

    1. Initial program 88.3%

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

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

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

Alternative 12: 66.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}\;t \leq -3 \cdot 10^{-151}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-111}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -3e-151)
    (/ (/ x_m y) t)
    (if (<= t 8.5e-111) (/ x_m (* z (- z y))) (/ 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 <= -3e-151) {
		tmp = (x_m / y) / t;
	} else if (t <= 8.5e-111) {
		tmp = x_m / (z * (z - y));
	} 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 <= (-3d-151)) then
        tmp = (x_m / y) / t
    else if (t <= 8.5d-111) then
        tmp = x_m / (z * (z - y))
    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 <= -3e-151) {
		tmp = (x_m / y) / t;
	} else if (t <= 8.5e-111) {
		tmp = x_m / (z * (z - y));
	} 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 <= -3e-151:
		tmp = (x_m / y) / t
	elif t <= 8.5e-111:
		tmp = x_m / (z * (z - y))
	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 <= -3e-151)
		tmp = Float64(Float64(x_m / y) / t);
	elseif (t <= 8.5e-111)
		tmp = Float64(x_m / Float64(z * Float64(z - y)));
	else
		tmp = Float64(x_m / Float64(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 <= -3e-151)
		tmp = (x_m / y) / t;
	elseif (t <= 8.5e-111)
		tmp = x_m / (z * (z - y));
	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, -3e-151], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 8.5e-111], N[(x$95$m / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $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}\;t \leq -3 \cdot 10^{-151}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t}\\

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

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


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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv98.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
    9. Simplified60.0%

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

    if -3e-151 < t < 8.5000000000000003e-111

    1. Initial program 86.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{-1 \cdot \left(y \cdot z\right) + {z}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*67.6%

        \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot y\right) \cdot z} + {z}^{2}} \]
      2. unpow267.6%

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot \left(-1 \cdot y + z\right)}} \]
      4. +-commutative73.0%

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-y\right)}\right)} \]
      6. unsub-neg73.0%

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

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

    if 8.5000000000000003e-111 < t

    1. Initial program 88.1%

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

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

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

Alternative 13: 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}\;t \leq -1.2 \cdot 10^{-186}:\\ \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-112}:\\ \;\;\;\;\frac{x\_m}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -1.2e-186)
    (/ x_m (* y (- t z)))
    (if (<= t 4.5e-112) (/ x_m (* z (- z y))) (/ 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 <= -1.2e-186) {
		tmp = x_m / (y * (t - z));
	} else if (t <= 4.5e-112) {
		tmp = x_m / (z * (z - y));
	} 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 <= (-1.2d-186)) then
        tmp = x_m / (y * (t - z))
    else if (t <= 4.5d-112) then
        tmp = x_m / (z * (z - y))
    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 <= -1.2e-186) {
		tmp = x_m / (y * (t - z));
	} else if (t <= 4.5e-112) {
		tmp = x_m / (z * (z - y));
	} 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 <= -1.2e-186:
		tmp = x_m / (y * (t - z))
	elif t <= 4.5e-112:
		tmp = x_m / (z * (z - y))
	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 <= -1.2e-186)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	elseif (t <= 4.5e-112)
		tmp = Float64(x_m / Float64(z * Float64(z - y)));
	else
		tmp = Float64(x_m / Float64(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 <= -1.2e-186)
		tmp = x_m / (y * (t - z));
	elseif (t <= 4.5e-112)
		tmp = x_m / (z * (z - y));
	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, -1.2e-186], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-112], N[(x$95$m / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $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}\;t \leq -1.2 \cdot 10^{-186}:\\
\;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.20000000000000002e-186

    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 inf 61.9%

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

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

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

    if -1.20000000000000002e-186 < t < 4.50000000000000012e-112

    1. Initial program 83.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{-1 \cdot \left(y \cdot z\right) + {z}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*65.7%

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot y\right)}} \]
      5. mul-1-neg70.6%

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

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

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

    if 4.50000000000000012e-112 < t

    1. Initial program 88.4%

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

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

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

Alternative 14: 48.1% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-106} \lor \neg \left(z \leq 7.8 \cdot 10^{+94}\right):\\ \;\;\;\;\frac{x\_m}{z \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -8e-106) (not (<= z 7.8e+94)))
    (/ x_m (* z (- t)))
    (/ (/ 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 tmp;
	if ((z <= -8e-106) || !(z <= 7.8e+94)) {
		tmp = x_m / (z * -t);
	} 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) :: tmp
    if ((z <= (-8d-106)) .or. (.not. (z <= 7.8d+94))) then
        tmp = x_m / (z * -t)
    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 tmp;
	if ((z <= -8e-106) || !(z <= 7.8e+94)) {
		tmp = x_m / (z * -t);
	} 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):
	tmp = 0
	if (z <= -8e-106) or not (z <= 7.8e+94):
		tmp = x_m / (z * -t)
	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)
	tmp = 0.0
	if ((z <= -8e-106) || !(z <= 7.8e+94))
		tmp = Float64(x_m / Float64(z * Float64(-t)));
	else
		tmp = Float64(Float64(x_m / 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)
	tmp = 0.0;
	if ((z <= -8e-106) || ~((z <= 7.8e+94)))
		tmp = x_m / (z * -t);
	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_] := N[(x$95$s * If[Or[LessEqual[z, -8e-106], N[Not[LessEqual[z, 7.8e+94]], $MachinePrecision]], N[(x$95$m / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / y), $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}\;z \leq -8 \cdot 10^{-106} \lor \neg \left(z \leq 7.8 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{x\_m}{z \cdot \left(-t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.99999999999999953e-106 or 7.79999999999999971e94 < z

    1. Initial program 81.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    9. Step-by-step derivation
      1. mul-1-neg43.8%

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

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

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

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

    if -7.99999999999999953e-106 < z < 7.79999999999999971e94

    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*96.7%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv96.6%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 45.6% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+88} \lor \neg \left(z \leq 7.8 \cdot 10^{+93}\right):\\ \;\;\;\;\frac{x\_m}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{y \cdot t}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -3.4e+88) (not (<= z 7.8e+93)))
    (/ x_m (* y z))
    (/ 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 tmp;
	if ((z <= -3.4e+88) || !(z <= 7.8e+93)) {
		tmp = x_m / (y * z);
	} 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) :: tmp
    if ((z <= (-3.4d+88)) .or. (.not. (z <= 7.8d+93))) then
        tmp = x_m / (y * z)
    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 tmp;
	if ((z <= -3.4e+88) || !(z <= 7.8e+93)) {
		tmp = x_m / (y * z);
	} 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):
	tmp = 0
	if (z <= -3.4e+88) or not (z <= 7.8e+93):
		tmp = x_m / (y * z)
	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)
	tmp = 0.0
	if ((z <= -3.4e+88) || !(z <= 7.8e+93))
		tmp = Float64(x_m / Float64(y * z));
	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)
	tmp = 0.0;
	if ((z <= -3.4e+88) || ~((z <= 7.8e+93)))
		tmp = x_m / (y * z);
	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_] := N[(x$95$s * If[Or[LessEqual[z, -3.4e+88], N[Not[LessEqual[z, 7.8e+93]], $MachinePrecision]], N[(x$95$m / N[(y * z), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+88} \lor \neg \left(z \leq 7.8 \cdot 10^{+93}\right):\\
\;\;\;\;\frac{x\_m}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.40000000000000004e88 or 7.8000000000000005e93 < z

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\frac{1}{z}}{y - z}} \]
      3. add-sqr-sqrt43.6%

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\frac{1}{z}}{y - z} \]
      5. sqr-neg69.4%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\frac{1}{z}}{y - z} \]
      6. sqrt-unprod28.2%

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

        \[\leadsto \color{blue}{x} \cdot \frac{\frac{1}{z}}{y - z} \]
    9. Applied egg-rr69.3%

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative42.8%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified42.8%

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

    if -3.40000000000000004e88 < z < 7.8000000000000005e93

    1. Initial program 89.8%

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

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

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

Alternative 16: 47.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}\;z \leq -1.7 \cdot 10^{+136} \lor \neg \left(z \leq 1.05 \cdot 10^{+113}\right):\\ \;\;\;\;\frac{x\_m}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (or (<= z -1.7e+136) (not (<= z 1.05e+113)))
    (/ x_m (* y z))
    (/ (/ 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 ((z <= -1.7e+136) || !(z <= 1.05e+113)) {
		tmp = x_m / (y * z);
	} 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 ((z <= (-1.7d+136)) .or. (.not. (z <= 1.05d+113))) then
        tmp = x_m / (y * z)
    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 ((z <= -1.7e+136) || !(z <= 1.05e+113)) {
		tmp = x_m / (y * z);
	} 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 (z <= -1.7e+136) or not (z <= 1.05e+113):
		tmp = x_m / (y * z)
	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 ((z <= -1.7e+136) || !(z <= 1.05e+113))
		tmp = Float64(x_m / Float64(y * z));
	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 ((z <= -1.7e+136) || ~((z <= 1.05e+113)))
		tmp = x_m / (y * z);
	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[Or[LessEqual[z, -1.7e+136], N[Not[LessEqual[z, 1.05e+113]], $MachinePrecision]], N[(x$95$m / N[(y * z), $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}\;z \leq -1.7 \cdot 10^{+136} \lor \neg \left(z \leq 1.05 \cdot 10^{+113}\right):\\
\;\;\;\;\frac{x\_m}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.69999999999999998e136 or 1.0499999999999999e113 < z

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\frac{1}{z}}{y - z}} \]
      3. add-sqr-sqrt44.9%

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

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

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\frac{1}{z}}{y - z} \]
      6. sqrt-unprod28.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 1}{z \cdot \left(y - z\right)}} \]
      3. *-rgt-identity71.8%

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

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

      \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative43.8%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified43.8%

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

    if -1.69999999999999998e136 < z < 1.0499999999999999e113

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

Alternative 17: 49.0% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+136}:\\ \;\;\;\;\frac{x\_m}{y \cdot z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+95}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{y}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= z -6.6e+136)
    (/ x_m (* y z))
    (if (<= z 6.8e+95) (/ (/ x_m t) y) (/ (/ x_m z) 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 (z <= -6.6e+136) {
		tmp = x_m / (y * z);
	} else if (z <= 6.8e+95) {
		tmp = (x_m / t) / y;
	} else {
		tmp = (x_m / z) / 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 (z <= (-6.6d+136)) then
        tmp = x_m / (y * z)
    else if (z <= 6.8d+95) then
        tmp = (x_m / t) / y
    else
        tmp = (x_m / z) / 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 (z <= -6.6e+136) {
		tmp = x_m / (y * z);
	} else if (z <= 6.8e+95) {
		tmp = (x_m / t) / y;
	} else {
		tmp = (x_m / z) / 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 z <= -6.6e+136:
		tmp = x_m / (y * z)
	elif z <= 6.8e+95:
		tmp = (x_m / t) / y
	else:
		tmp = (x_m / z) / 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 (z <= -6.6e+136)
		tmp = Float64(x_m / Float64(y * z));
	elseif (z <= 6.8e+95)
		tmp = Float64(Float64(x_m / t) / y);
	else
		tmp = Float64(Float64(x_m / z) / 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 (z <= -6.6e+136)
		tmp = x_m / (y * z);
	elseif (z <= 6.8e+95)
		tmp = (x_m / t) / y;
	else
		tmp = (x_m / z) / 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[z, -6.6e+136], N[(x$95$m / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+95], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x$95$m / z), $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}\;z \leq -6.6 \cdot 10^{+136}:\\
\;\;\;\;\frac{x\_m}{y \cdot z}\\

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

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


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

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\frac{1}{z}}{y - z} \]
      5. sqr-neg73.9%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\frac{1}{z}}{y - z} \]
      6. sqrt-unprod32.8%

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

        \[\leadsto \color{blue}{x} \cdot \frac{\frac{1}{z}}{y - z} \]
    9. Applied egg-rr75.1%

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

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

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

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

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

      \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative45.0%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified45.0%

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

    if -6.59999999999999984e136 < z < 6.80000000000000043e95

    1. Initial program 89.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    8. Simplified57.4%

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

    if 6.80000000000000043e95 < z

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\frac{1}{z}}{y - z}} \]
      3. add-sqr-sqrt42.6%

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

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

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\frac{1}{z}}{y - z} \]
      6. sqrt-unprod28.8%

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

        \[\leadsto \color{blue}{x} \cdot \frac{\frac{1}{z}}{y - z} \]
    9. Applied egg-rr68.7%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 1}{z \cdot \left(y - z\right)}} \]
      3. *-rgt-identity68.8%

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

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

      \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative44.7%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified44.7%

      \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    15. Taylor expanded in x around 0 44.7%

      \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \]
    16. Step-by-step derivation
      1. *-commutative44.7%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
      2. associate-/r*48.2%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
    17. Simplified48.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+136}:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+95}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 48.9% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{x\_m}{-y \cdot z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+96}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{y}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= z -4.2e-51)
    (/ x_m (- (* y z)))
    (if (<= z 2.7e+96) (/ (/ x_m y) t) (/ (/ x_m z) 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 (z <= -4.2e-51) {
		tmp = x_m / -(y * z);
	} else if (z <= 2.7e+96) {
		tmp = (x_m / y) / t;
	} else {
		tmp = (x_m / z) / 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 (z <= (-4.2d-51)) then
        tmp = x_m / -(y * z)
    else if (z <= 2.7d+96) then
        tmp = (x_m / y) / t
    else
        tmp = (x_m / z) / 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 (z <= -4.2e-51) {
		tmp = x_m / -(y * z);
	} else if (z <= 2.7e+96) {
		tmp = (x_m / y) / t;
	} else {
		tmp = (x_m / z) / 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 z <= -4.2e-51:
		tmp = x_m / -(y * z)
	elif z <= 2.7e+96:
		tmp = (x_m / y) / t
	else:
		tmp = (x_m / z) / 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 (z <= -4.2e-51)
		tmp = Float64(x_m / Float64(-Float64(y * z)));
	elseif (z <= 2.7e+96)
		tmp = Float64(Float64(x_m / y) / t);
	else
		tmp = Float64(Float64(x_m / z) / 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 (z <= -4.2e-51)
		tmp = x_m / -(y * z);
	elseif (z <= 2.7e+96)
		tmp = (x_m / y) / t;
	else
		tmp = (x_m / z) / 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[z, -4.2e-51], N[(x$95$m / (-N[(y * z), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 2.7e+96], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], N[(N[(x$95$m / z), $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}\;z \leq -4.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{x\_m}{-y \cdot z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.20000000000000003e-51

    1. Initial program 82.6%

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{-x}}{z}}{y - z} \]
    7. Simplified85.4%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{y \cdot z}} \]
    9. Step-by-step derivation
      1. mul-1-neg36.8%

        \[\leadsto \color{blue}{-\frac{x}{y \cdot z}} \]
      2. distribute-neg-frac236.8%

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

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

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

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

    if -4.20000000000000003e-51 < z < 2.70000000000000022e96

    1. Initial program 89.4%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    5. Step-by-step derivation
      1. *-commutative96.2%

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

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

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

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

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

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

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

    if 2.70000000000000022e96 < z

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\frac{1}{z}}{y - z}} \]
      3. add-sqr-sqrt42.6%

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

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

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\frac{1}{z}}{y - z} \]
      6. sqrt-unprod28.8%

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

        \[\leadsto \color{blue}{x} \cdot \frac{\frac{1}{z}}{y - z} \]
    9. Applied egg-rr68.7%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 1}{z \cdot \left(y - z\right)}} \]
      3. *-rgt-identity68.8%

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

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

      \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative44.7%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified44.7%

      \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    15. Taylor expanded in x around 0 44.7%

      \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \]
    16. Step-by-step derivation
      1. *-commutative44.7%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
      2. associate-/r*48.2%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
    17. Simplified48.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{x}{-y \cdot z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+96}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 69.8% accurate, 0.7× 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 -5.2 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - t}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (* x_s (if (<= y -5.2e-63) (/ (/ x_m y) (- t 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 <= -5.2e-63) {
		tmp = (x_m / y) / (t - 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 <= (-5.2d-63)) then
        tmp = (x_m / y) / (t - 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 <= -5.2e-63) {
		tmp = (x_m / y) / (t - 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 <= -5.2e-63:
		tmp = (x_m / y) / (t - 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 <= -5.2e-63)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	else
		tmp = Float64(Float64(x_m / 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 <= -5.2e-63)
		tmp = (x_m / y) / (t - 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, -5.2e-63], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - t), $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 -5.2 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

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


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

    1. Initial program 81.8%

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

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

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

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

    if -5.2000000000000003e-63 < y

    1. Initial program 86.7%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{t - z}} \]
      3. distribute-neg-frac264.8%

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

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

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

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

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

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

Alternative 20: 39.1% 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 1 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 85.2%

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

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

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

Developer target: 87.4% 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 2024039 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :herbie-target
  (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))))