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

Percentage Accurate: 88.6% → 98.3%
Time: 16.5s
Alternatives: 21
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 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.6% 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.3% accurate, 0.0× speedup?

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

\\
x_s \cdot \left(\frac{\sqrt{x_m}}{y - z} \cdot \frac{\sqrt{x_m}}{t - z}\right)
\end{array}
Derivation
  1. Initial program 88.6%

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

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

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

    \[\leadsto \color{blue}{\frac{\sqrt{x}}{y - z} \cdot \frac{\sqrt{x}}{t - z}} \]
  5. Final simplification51.5%

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

Alternative 2: 72.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 := \frac{\frac{-x_m}{z}}{t - z}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+196}:\\ \;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\ \mathbf{elif}\;y \leq -7200000:\\ \;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-205}:\\ \;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+28}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x_m}{t}}{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 (/ (/ (- x_m) z) (- t z))))
   (*
    x_s
    (if (<= y -7.2e+196)
      (/ (/ x_m (- t z)) y)
      (if (<= y -7200000.0)
        (/ x_m (* y (- t z)))
        (if (<= y 1.45e-251)
          t_1
          (if (<= y 8e-205)
            (/ x_m (* (- y z) t))
            (if (<= y 1.1e+28) t_1 (/ (/ x_m t) y)))))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (-x_m / z) / (t - z);
	double tmp;
	if (y <= -7.2e+196) {
		tmp = (x_m / (t - z)) / y;
	} else if (y <= -7200000.0) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 1.45e-251) {
		tmp = t_1;
	} else if (y <= 8e-205) {
		tmp = x_m / ((y - z) * t);
	} else if (y <= 1.1e+28) {
		tmp = t_1;
	} else {
		tmp = (x_m / t) / y;
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-x_m / z) / (t - z)
    if (y <= (-7.2d+196)) then
        tmp = (x_m / (t - z)) / y
    else if (y <= (-7200000.0d0)) then
        tmp = x_m / (y * (t - z))
    else if (y <= 1.45d-251) then
        tmp = t_1
    else if (y <= 8d-205) then
        tmp = x_m / ((y - z) * t)
    else if (y <= 1.1d+28) then
        tmp = t_1
    else
        tmp = (x_m / t) / y
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (-x_m / z) / (t - z);
	double tmp;
	if (y <= -7.2e+196) {
		tmp = (x_m / (t - z)) / y;
	} else if (y <= -7200000.0) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 1.45e-251) {
		tmp = t_1;
	} else if (y <= 8e-205) {
		tmp = x_m / ((y - z) * t);
	} else if (y <= 1.1e+28) {
		tmp = t_1;
	} else {
		tmp = (x_m / t) / y;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = (-x_m / z) / (t - z)
	tmp = 0
	if y <= -7.2e+196:
		tmp = (x_m / (t - z)) / y
	elif y <= -7200000.0:
		tmp = x_m / (y * (t - z))
	elif y <= 1.45e-251:
		tmp = t_1
	elif y <= 8e-205:
		tmp = x_m / ((y - z) * t)
	elif y <= 1.1e+28:
		tmp = t_1
	else:
		tmp = (x_m / t) / y
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(Float64(Float64(-x_m) / z) / Float64(t - z))
	tmp = 0.0
	if (y <= -7.2e+196)
		tmp = Float64(Float64(x_m / Float64(t - z)) / y);
	elseif (y <= -7200000.0)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	elseif (y <= 1.45e-251)
		tmp = t_1;
	elseif (y <= 8e-205)
		tmp = Float64(x_m / Float64(Float64(y - z) * t));
	elseif (y <= 1.1e+28)
		tmp = t_1;
	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)
	t_1 = (-x_m / z) / (t - z);
	tmp = 0.0;
	if (y <= -7.2e+196)
		tmp = (x_m / (t - z)) / y;
	elseif (y <= -7200000.0)
		tmp = x_m / (y * (t - z));
	elseif (y <= 1.45e-251)
		tmp = t_1;
	elseif (y <= 8e-205)
		tmp = x_m / ((y - z) * t);
	elseif (y <= 1.1e+28)
		tmp = t_1;
	else
		tmp = (x_m / t) / y;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[((-x$95$m) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -7.2e+196], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -7200000.0], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-251], t$95$1, If[LessEqual[y, 8e-205], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+28], t$95$1, 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)

\\
\begin{array}{l}
t_1 := \frac{\frac{-x_m}{z}}{t - z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+196}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\

\mathbf{elif}\;y \leq -7200000:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-251}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 8 \cdot 10^{-205}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\

\mathbf{elif}\;y \leq 1.1 \cdot 10^{+28}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -7.20000000000000015e196

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

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

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

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

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

    if -7.20000000000000015e196 < y < -7.2e6

    1. Initial program 84.8%

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

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

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

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

    if -7.2e6 < y < 1.45e-251 or 8e-205 < y < 1.09999999999999993e28

    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. add-sqr-sqrt49.3%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{y - z}}}{t - z} \]
      3. add-sqr-sqrt98.3%

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

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

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

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

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

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

    if 1.45e-251 < y < 8e-205

    1. Initial program 99.4%

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

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

    if 1.09999999999999993e28 < y

    1. Initial program 89.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+196}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -7200000:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-251}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-205}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+28}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+184}:\\
\;\;\;\;\frac{\frac{-x_m}{y}}{z}\\

\mathbf{elif}\;y \leq -5.6 \cdot 10^{+65}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\

\mathbf{elif}\;y \leq -2.8 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.8499999999999999e184

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{y \cdot z}} \]
    11. Step-by-step derivation
      1. mul-1-neg60.3%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{y}}{z}} \]
      3. distribute-neg-frac79.1%

        \[\leadsto \color{blue}{\frac{-\frac{x}{y}}{z}} \]
      4. distribute-frac-neg79.1%

        \[\leadsto \frac{\color{blue}{\frac{-x}{y}}}{z} \]
    12. Simplified79.1%

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

    if -1.8499999999999999e184 < y < -5.5999999999999998e65

    1. Initial program 75.7%

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

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

    if -5.5999999999999998e65 < y < -2.8000000000000002e-24

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000002e-24 < y < 2.2e16

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

    if 2.2e16 < y

    1. Initial program 90.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{+184}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{+65}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-24}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+16}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 46.9% accurate, 0.3× speedup?

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{+190}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y}\\

\mathbf{elif}\;y \leq -1.05 \cdot 10^{+66}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\

\mathbf{elif}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -9.7999999999999993e190

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

    if -9.7999999999999993e190 < y < -1.05000000000000003e66

    1. Initial program 75.7%

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

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

    if -1.05000000000000003e66 < y < -3.29999999999999984e-24

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999984e-24 < y < 2.2e16

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

    if 2.2e16 < y

    1. Initial program 90.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{+190}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{+66}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-24}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+16}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+194}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y}\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{+66}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x_m}}\\

\mathbf{elif}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.40000000000000042e194

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

    if -6.40000000000000042e194 < y < -1.30000000000000006e66

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

    if -1.30000000000000006e66 < y < -3.29999999999999984e-24

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999984e-24 < y < 6.4e16

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

    if 6.4e16 < y

    1. Initial program 90.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{+194}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{+66}:\\ \;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-24}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+16}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.3% 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}{t - z}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+197}:\\ \;\;\;\;\frac{t_1}{y}\\ \mathbf{elif}\;y \leq -8200000:\\ \;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+32}:\\ \;\;\;\;\frac{-1}{z} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x_m}{t}}{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 (/ x_m (- t z))))
   (*
    x_s
    (if (<= y -2.6e+197)
      (/ t_1 y)
      (if (<= y -8200000.0)
        (/ x_m (* y (- t z)))
        (if (<= y 3.9e+32) (* (/ -1.0 z) t_1) (/ (/ x_m t) y)))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = x_m / (t - z);
	double tmp;
	if (y <= -2.6e+197) {
		tmp = t_1 / y;
	} else if (y <= -8200000.0) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 3.9e+32) {
		tmp = (-1.0 / z) * t_1;
	} else {
		tmp = (x_m / t) / y;
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x_m / (t - z)
    if (y <= (-2.6d+197)) then
        tmp = t_1 / y
    else if (y <= (-8200000.0d0)) then
        tmp = x_m / (y * (t - z))
    else if (y <= 3.9d+32) then
        tmp = ((-1.0d0) / z) * t_1
    else
        tmp = (x_m / t) / y
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = x_m / (t - z);
	double tmp;
	if (y <= -2.6e+197) {
		tmp = t_1 / y;
	} else if (y <= -8200000.0) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 3.9e+32) {
		tmp = (-1.0 / z) * t_1;
	} else {
		tmp = (x_m / t) / y;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = x_m / (t - z)
	tmp = 0
	if y <= -2.6e+197:
		tmp = t_1 / y
	elif y <= -8200000.0:
		tmp = x_m / (y * (t - z))
	elif y <= 3.9e+32:
		tmp = (-1.0 / z) * t_1
	else:
		tmp = (x_m / t) / y
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(x_m / Float64(t - z))
	tmp = 0.0
	if (y <= -2.6e+197)
		tmp = Float64(t_1 / y);
	elseif (y <= -8200000.0)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	elseif (y <= 3.9e+32)
		tmp = Float64(Float64(-1.0 / z) * t_1);
	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)
	t_1 = x_m / (t - z);
	tmp = 0.0;
	if (y <= -2.6e+197)
		tmp = t_1 / y;
	elseif (y <= -8200000.0)
		tmp = x_m / (y * (t - z));
	elseif (y <= 3.9e+32)
		tmp = (-1.0 / z) * t_1;
	else
		tmp = (x_m / t) / y;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -2.6e+197], N[(t$95$1 / y), $MachinePrecision], If[LessEqual[y, -8200000.0], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+32], N[(N[(-1.0 / z), $MachinePrecision] * t$95$1), $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)

\\
\begin{array}{l}
t_1 := \frac{x_m}{t - z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+197}:\\
\;\;\;\;\frac{t_1}{y}\\

\mathbf{elif}\;y \leq -8200000:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{z} \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\


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

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

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

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

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

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

    if -2.59999999999999987e197 < y < -8.2e6

    1. Initial program 84.8%

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

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

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

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

    if -8.2e6 < y < 3.8999999999999999e32

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

    if 3.8999999999999999e32 < y

    1. Initial program 89.5%

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

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

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

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

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

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

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

Alternative 7: 70.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}\;y \leq -3 \cdot 10^{+200}:\\ \;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\ \mathbf{elif}\;y \leq -10000000:\\ \;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.62 \cdot 10^{-59}:\\ \;\;\;\;\frac{-x_m}{z \cdot \left(t - z\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 (<= y -3e+200)
    (/ (/ x_m (- t z)) y)
    (if (<= y -10000000.0)
      (/ x_m (* y (- t z)))
      (if (<= y 1.62e-59) (/ (- x_m) (* z (- t z))) (/ x_m (* (- y z) t)))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (y <= -3e+200) {
		tmp = (x_m / (t - z)) / y;
	} else if (y <= -10000000.0) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 1.62e-59) {
		tmp = -x_m / (z * (t - z));
	} else {
		tmp = x_m / ((y - z) * t);
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-3d+200)) then
        tmp = (x_m / (t - z)) / y
    else if (y <= (-10000000.0d0)) then
        tmp = x_m / (y * (t - z))
    else if (y <= 1.62d-59) then
        tmp = -x_m / (z * (t - z))
    else
        tmp = x_m / ((y - z) * t)
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (y <= -3e+200) {
		tmp = (x_m / (t - z)) / y;
	} else if (y <= -10000000.0) {
		tmp = x_m / (y * (t - z));
	} else if (y <= 1.62e-59) {
		tmp = -x_m / (z * (t - z));
	} else {
		tmp = x_m / ((y - z) * t);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if y <= -3e+200:
		tmp = (x_m / (t - z)) / y
	elif y <= -10000000.0:
		tmp = x_m / (y * (t - z))
	elif y <= 1.62e-59:
		tmp = -x_m / (z * (t - z))
	else:
		tmp = x_m / ((y - z) * t)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (y <= -3e+200)
		tmp = Float64(Float64(x_m / Float64(t - z)) / y);
	elseif (y <= -10000000.0)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	elseif (y <= 1.62e-59)
		tmp = Float64(Float64(-x_m) / Float64(z * Float64(t - z)));
	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 (y <= -3e+200)
		tmp = (x_m / (t - z)) / y;
	elseif (y <= -10000000.0)
		tmp = x_m / (y * (t - z));
	elseif (y <= 1.62e-59)
		tmp = -x_m / (z * (t - z));
	else
		tmp = x_m / ((y - z) * t);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -3e+200], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -10000000.0], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.62e-59], N[((-x$95$m) / N[(z * N[(t - z), $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}\;y \leq -3 \cdot 10^{+200}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\

\mathbf{elif}\;y \leq -10000000:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\

\mathbf{elif}\;y \leq 1.62 \cdot 10^{-59}:\\
\;\;\;\;\frac{-x_m}{z \cdot \left(t - z\right)}\\

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


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

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

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

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

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

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

    if -2.99999999999999991e200 < y < -1e7

    1. Initial program 84.8%

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

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

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

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

    if -1e7 < y < 1.61999999999999989e-59

    1. Initial program 90.9%

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

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

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

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

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

    if 1.61999999999999989e-59 < y

    1. Initial program 88.2%

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

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

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

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+66}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t}\\

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x_m}{y \cdot z}\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+16}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

    if -1.4e66 < y < -2.6e-24

    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

    if -2.6e-24 < y < 3.6e16

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

    if 3.6e16 < y

    1. Initial program 90.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+66}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-24}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+16}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 92.7% accurate, 0.5× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{-x_m}{z}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{+81}:\\ \;\;\;\;\frac{t_1}{t - z}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+65}:\\ \;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{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) z)))
   (*
    x_s
    (if (<= z -2.45e+81)
      (/ t_1 (- t z))
      (if (<= z 6e+65) (/ x_m (* (- y z) (- t z))) (/ t_1 (- 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 / z;
	double tmp;
	if (z <= -2.45e+81) {
		tmp = t_1 / (t - z);
	} else if (z <= 6e+65) {
		tmp = x_m / ((y - z) * (t - z));
	} else {
		tmp = t_1 / (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 / z
    if (z <= (-2.45d+81)) then
        tmp = t_1 / (t - z)
    else if (z <= 6d+65) then
        tmp = x_m / ((y - z) * (t - z))
    else
        tmp = t_1 / (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 / z;
	double tmp;
	if (z <= -2.45e+81) {
		tmp = t_1 / (t - z);
	} else if (z <= 6e+65) {
		tmp = x_m / ((y - z) * (t - z));
	} else {
		tmp = t_1 / (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 / z
	tmp = 0
	if z <= -2.45e+81:
		tmp = t_1 / (t - z)
	elif z <= 6e+65:
		tmp = x_m / ((y - z) * (t - z))
	else:
		tmp = t_1 / (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(Float64(-x_m) / z)
	tmp = 0.0
	if (z <= -2.45e+81)
		tmp = Float64(t_1 / Float64(t - z));
	elseif (z <= 6e+65)
		tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z)));
	else
		tmp = Float64(t_1 / 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 / z;
	tmp = 0.0;
	if (z <= -2.45e+81)
		tmp = t_1 / (t - z);
	elseif (z <= 6e+65)
		tmp = x_m / ((y - z) * (t - z));
	else
		tmp = t_1 / (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) / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -2.45e+81], N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+65], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / 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}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+81}:\\
\;\;\;\;\frac{t_1}{t - z}\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+65}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{t_1}{y - z}\\


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

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.45000000000000011e81 < z < 6.0000000000000004e65

    1. Initial program 97.0%

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

    if 6.0000000000000004e65 < z

    1. Initial program 77.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y - z}} \]
      4. distribute-frac-neg89.9%

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

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

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

Alternative 10: 92.7% 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}\;z \leq -2.65 \cdot 10^{+81}:\\ \;\;\;\;\frac{\frac{-1}{z}}{\frac{t - z}{x_m}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+65}:\\ \;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x_m}{z}}{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 (<= z -2.65e+81)
    (/ (/ -1.0 z) (/ (- t z) x_m))
    (if (<= z 6e+65) (/ x_m (* (- y z) (- t z))) (/ (/ (- x_m) 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 tmp;
	if (z <= -2.65e+81) {
		tmp = (-1.0 / z) / ((t - z) / x_m);
	} else if (z <= 6e+65) {
		tmp = x_m / ((y - z) * (t - z));
	} else {
		tmp = (-x_m / 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) :: tmp
    if (z <= (-2.65d+81)) then
        tmp = ((-1.0d0) / z) / ((t - z) / x_m)
    else if (z <= 6d+65) then
        tmp = x_m / ((y - z) * (t - z))
    else
        tmp = (-x_m / 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 tmp;
	if (z <= -2.65e+81) {
		tmp = (-1.0 / z) / ((t - z) / x_m);
	} else if (z <= 6e+65) {
		tmp = x_m / ((y - z) * (t - z));
	} else {
		tmp = (-x_m / 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):
	tmp = 0
	if z <= -2.65e+81:
		tmp = (-1.0 / z) / ((t - z) / x_m)
	elif z <= 6e+65:
		tmp = x_m / ((y - z) * (t - z))
	else:
		tmp = (-x_m / 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)
	tmp = 0.0
	if (z <= -2.65e+81)
		tmp = Float64(Float64(-1.0 / z) / Float64(Float64(t - z) / x_m));
	elseif (z <= 6e+65)
		tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z)));
	else
		tmp = Float64(Float64(Float64(-x_m) / 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)
	tmp = 0.0;
	if (z <= -2.65e+81)
		tmp = (-1.0 / z) / ((t - z) / x_m);
	elseif (z <= 6e+65)
		tmp = x_m / ((y - z) * (t - z));
	else
		tmp = (-x_m / 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_] := N[(x$95$s * If[LessEqual[z, -2.65e+81], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+65], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-x$95$m) / z), $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}\;z \leq -2.65 \cdot 10^{+81}:\\
\;\;\;\;\frac{\frac{-1}{z}}{\frac{t - z}{x_m}}\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+65}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y - z}\\


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

    1. Initial program 75.6%

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

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{x}}{y - z} \cdot \frac{\sqrt{x}}{t - z}} \]
    5. Step-by-step derivation
      1. frac-times35.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{t - z}{x}}}}{y - z} \]
      5. associate-/l/99.8%

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

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

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

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

    if -2.65000000000000014e81 < z < 6.0000000000000004e65

    1. Initial program 97.0%

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

    if 6.0000000000000004e65 < z

    1. Initial program 77.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y - z}} \]
      4. distribute-frac-neg89.9%

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

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

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

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

\mathbf{elif}\;t \leq 1.85 \cdot 10^{+48}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y - z}\\

\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 < -8.4999999999999995e-116

    1. Initial program 88.0%

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

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

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

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

    if -8.4999999999999995e-116 < t < 1.85e48

    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. add-sqr-sqrt44.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y - z}} \]
      4. distribute-frac-neg79.9%

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

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

    if 1.85e48 < t

    1. Initial program 87.7%

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

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

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

Alternative 12: 66.5% accurate, 0.5× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{-117} \lor \neg \left(t \leq 3 \cdot 10^{-130}\right):\\ \;\;\;\;\frac{x_m}{\left(y - z\right) \cdot 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 (or (<= t -1.55e-117) (not (<= t 3e-130)))
    (/ x_m (* (- y z) 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 ((t <= -1.55e-117) || !(t <= 3e-130)) {
		tmp = x_m / ((y - z) * 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 ((t <= (-1.55d-117)) .or. (.not. (t <= 3d-130))) then
        tmp = x_m / ((y - z) * 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 ((t <= -1.55e-117) || !(t <= 3e-130)) {
		tmp = x_m / ((y - z) * 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 (t <= -1.55e-117) or not (t <= 3e-130):
		tmp = x_m / ((y - z) * 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 ((t <= -1.55e-117) || !(t <= 3e-130))
		tmp = Float64(x_m / Float64(Float64(y - z) * t));
	else
		tmp = Float64(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 ((t <= -1.55e-117) || ~((t <= 3e-130)))
		tmp = x_m / ((y - z) * 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[Or[LessEqual[t, -1.55e-117], N[Not[LessEqual[t, 3e-130]], $MachinePrecision]], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $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}\;t \leq -1.55 \cdot 10^{-117} \lor \neg \left(t \leq 3 \cdot 10^{-130}\right):\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.55000000000000005e-117 or 2.99999999999999986e-130 < t

    1. Initial program 88.8%

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

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

    if -1.55000000000000005e-117 < t < 2.99999999999999986e-130

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 66.6% 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}\;z \leq -2.75 \cdot 10^{+130} \lor \neg \left(z \leq 1.5 \cdot 10^{+71}\right):\\ \;\;\;\;\frac{x_m}{z \cdot \left(t - z\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 (or (<= z -2.75e+130) (not (<= z 1.5e+71)))
    (/ x_m (* z (- t z)))
    (/ x_m (* (- y z) t)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -2.75e+130) || !(z <= 1.5e+71)) {
		tmp = x_m / (z * (t - z));
	} else {
		tmp = x_m / ((y - z) * t);
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-2.75d+130)) .or. (.not. (z <= 1.5d+71))) then
        tmp = x_m / (z * (t - z))
    else
        tmp = x_m / ((y - z) * t)
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if ((z <= -2.75e+130) || !(z <= 1.5e+71)) {
		tmp = x_m / (z * (t - z));
	} else {
		tmp = x_m / ((y - z) * t);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if (z <= -2.75e+130) or not (z <= 1.5e+71):
		tmp = x_m / (z * (t - z))
	else:
		tmp = x_m / ((y - z) * t)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if ((z <= -2.75e+130) || !(z <= 1.5e+71))
		tmp = Float64(x_m / Float64(z * Float64(t - z)));
	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 ((z <= -2.75e+130) || ~((z <= 1.5e+71)))
		tmp = x_m / (z * (t - z));
	else
		tmp = x_m / ((y - z) * t);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -2.75e+130], N[Not[LessEqual[z, 1.5e+71]], $MachinePrecision]], N[(x$95$m / N[(z * N[(t - z), $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}\;z \leq -2.75 \cdot 10^{+130} \lor \neg \left(z \leq 1.5 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{x_m}{z \cdot \left(t - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.7499999999999999e130 or 1.50000000000000006e71 < z

    1. Initial program 76.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z \cdot \left(t - z\right)}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u74.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{-x}{z \cdot \left(t - z\right)}\right)\right)} \]
      2. expm1-udef72.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{-x}{z \cdot \left(t - z\right)}\right)} - 1} \]
      3. add-sqr-sqrt34.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      4. sqrt-unprod57.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      5. sqr-neg57.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      6. sqrt-unprod37.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      7. add-sqr-sqrt71.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      8. associate-/r*71.4%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\frac{x}{z}}{t - z}}\right)} - 1 \]
    7. Applied egg-rr71.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{x}{z}}{t - z}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def68.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{x}{z}}{t - z}\right)\right)} \]
      2. expm1-log1p68.9%

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

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

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

    if -2.7499999999999999e130 < z < 1.50000000000000006e71

    1. Initial program 94.9%

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

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

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

Alternative 14: 66.6% 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}\;z \leq -1.35 \cdot 10^{+130}:\\ \;\;\;\;\frac{x_m}{z \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+65}:\\ \;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x_m}{z \cdot \left(y - z\right)}\\ \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 -1.35e+130)
    (/ x_m (* z (- t z)))
    (if (<= z 2.5e+65) (/ x_m (* (- y z) t)) (/ x_m (* 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 tmp;
	if (z <= -1.35e+130) {
		tmp = x_m / (z * (t - z));
	} else if (z <= 2.5e+65) {
		tmp = x_m / ((y - z) * t);
	} else {
		tmp = x_m / (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) :: tmp
    if (z <= (-1.35d+130)) then
        tmp = x_m / (z * (t - z))
    else if (z <= 2.5d+65) then
        tmp = x_m / ((y - z) * t)
    else
        tmp = x_m / (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 tmp;
	if (z <= -1.35e+130) {
		tmp = x_m / (z * (t - z));
	} else if (z <= 2.5e+65) {
		tmp = x_m / ((y - z) * t);
	} else {
		tmp = x_m / (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):
	tmp = 0
	if z <= -1.35e+130:
		tmp = x_m / (z * (t - z))
	elif z <= 2.5e+65:
		tmp = x_m / ((y - z) * t)
	else:
		tmp = x_m / (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)
	tmp = 0.0
	if (z <= -1.35e+130)
		tmp = Float64(x_m / Float64(z * Float64(t - z)));
	elseif (z <= 2.5e+65)
		tmp = Float64(x_m / Float64(Float64(y - z) * t));
	else
		tmp = Float64(x_m / Float64(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)
	tmp = 0.0;
	if (z <= -1.35e+130)
		tmp = x_m / (z * (t - z));
	elseif (z <= 2.5e+65)
		tmp = x_m / ((y - z) * t);
	else
		tmp = x_m / (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_] := N[(x$95$s * If[LessEqual[z, -1.35e+130], N[(x$95$m / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+65], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x$95$m / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+130}:\\
\;\;\;\;\frac{x_m}{z \cdot \left(t - z\right)}\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+65}:\\
\;\;\;\;\frac{x_m}{\left(y - z\right) \cdot t}\\

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


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

    1. Initial program 74.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z \cdot \left(t - z\right)}} \]
    6. Step-by-step derivation
      1. expm1-log1p-u74.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{-x}{z \cdot \left(t - z\right)}\right)\right)} \]
      2. expm1-udef74.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{-x}{z \cdot \left(t - z\right)}\right)} - 1} \]
      3. add-sqr-sqrt40.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      4. sqrt-unprod52.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      5. sqr-neg52.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      6. sqrt-unprod34.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      7. add-sqr-sqrt74.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{z \cdot \left(t - z\right)}\right)} - 1 \]
      8. associate-/r*74.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\frac{x}{z}}{t - z}}\right)} - 1 \]
    7. Applied egg-rr74.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{x}{z}}{t - z}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def71.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{x}{z}}{t - z}\right)\right)} \]
      2. expm1-log1p71.7%

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

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

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

    if -1.3499999999999999e130 < z < 2.49999999999999986e65

    1. Initial program 95.4%

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

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

    if 2.49999999999999986e65 < z

    1. Initial program 77.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y - z}} \]
      4. distribute-frac-neg89.9%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y - z}\right)\right)} \]
      2. expm1-udef68.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y - z}\right)} - 1} \]
      3. associate-/l/67.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{\left(y - z\right) \cdot z}}\right)} - 1 \]
      4. add-sqr-sqrt28.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{\left(y - z\right) \cdot z}\right)} - 1 \]
      5. sqrt-unprod57.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{\left(y - z\right) \cdot z}\right)} - 1 \]
      6. sqr-neg57.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{\left(y - z\right) \cdot z}\right)} - 1 \]
      7. sqrt-unprod37.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{\left(y - z\right) \cdot z}\right)} - 1 \]
      8. add-sqr-sqrt66.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{\left(y - z\right) \cdot z}\right)} - 1 \]
      9. *-commutative66.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{\color{blue}{z \cdot \left(y - z\right)}}\right)} - 1 \]
    9. Applied egg-rr66.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{z \cdot \left(y - z\right)}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def65.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{z \cdot \left(y - z\right)}\right)\right)} \]
      2. expm1-log1p65.8%

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

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

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

Alternative 15: 64.4% accurate, 0.5× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+198}:\\ \;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\ \mathbf{elif}\;y \leq -1.46 \cdot 10^{-30}:\\ \;\;\;\;\frac{x_m}{y \cdot \left(t - z\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 (<= y -1.7e+198)
    (/ (/ x_m (- t z)) y)
    (if (<= y -1.46e-30) (/ x_m (* y (- t z))) (/ x_m (* (- y z) t))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (y <= -1.7e+198) {
		tmp = (x_m / (t - z)) / y;
	} else if (y <= -1.46e-30) {
		tmp = x_m / (y * (t - z));
	} else {
		tmp = x_m / ((y - z) * t);
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-1.7d+198)) then
        tmp = (x_m / (t - z)) / y
    else if (y <= (-1.46d-30)) then
        tmp = x_m / (y * (t - z))
    else
        tmp = x_m / ((y - z) * t)
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (y <= -1.7e+198) {
		tmp = (x_m / (t - z)) / y;
	} else if (y <= -1.46e-30) {
		tmp = x_m / (y * (t - z));
	} else {
		tmp = x_m / ((y - z) * t);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if y <= -1.7e+198:
		tmp = (x_m / (t - z)) / y
	elif y <= -1.46e-30:
		tmp = x_m / (y * (t - z))
	else:
		tmp = x_m / ((y - z) * t)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (y <= -1.7e+198)
		tmp = Float64(Float64(x_m / Float64(t - z)) / y);
	elseif (y <= -1.46e-30)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	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 (y <= -1.7e+198)
		tmp = (x_m / (t - z)) / y;
	elseif (y <= -1.46e-30)
		tmp = x_m / (y * (t - z));
	else
		tmp = x_m / ((y - z) * t);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[y, -1.7e+198], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.46e-30], N[(x$95$m / N[(y * N[(t - z), $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}\;y \leq -1.7 \cdot 10^{+198}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\

\mathbf{elif}\;y \leq -1.46 \cdot 10^{-30}:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\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 y < -1.7e198

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

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

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

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

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

    if -1.7e198 < y < -1.4600000000000001e-30

    1. Initial program 87.2%

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

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

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

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

    if -1.4600000000000001e-30 < y

    1. Initial program 89.4%

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

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

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

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -22000 \lor \neg \left(z \leq 1.8 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -22000 or 1.8e-51 < z

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

    if -22000 < z < 1.8e-51

    1. Initial program 96.1%

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

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

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

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

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

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

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

Alternative 17: 46.5% 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 \cdot 10^{+61} \lor \neg \left(z \leq 1.7 \cdot 10^{+63}\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 -1e+61) (not (<= z 1.7e+63)))
    (/ 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 <= -1e+61) || !(z <= 1.7e+63)) {
		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 <= (-1d+61)) .or. (.not. (z <= 1.7d+63))) 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 <= -1e+61) || !(z <= 1.7e+63)) {
		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 <= -1e+61) or not (z <= 1.7e+63):
		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 <= -1e+61) || !(z <= 1.7e+63))
		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 <= -1e+61) || ~((z <= 1.7e+63)))
		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, -1e+61], N[Not[LessEqual[z, 1.7e+63]], $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 -1 \cdot 10^{+61} \lor \neg \left(z \leq 1.7 \cdot 10^{+63}\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 < -9.99999999999999949e60 or 1.6999999999999999e63 < z

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    9. Step-by-step derivation
      1. expm1-log1p-u42.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)\right)} \]
      2. expm1-udef52.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)} - 1} \]
      3. associate-/l/52.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{y \cdot z}}\right)} - 1 \]
      4. add-sqr-sqrt26.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z}\right)} - 1 \]
      5. sqrt-unprod44.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y \cdot z}\right)} - 1 \]
      6. sqr-neg44.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{y \cdot z}\right)} - 1 \]
      7. sqrt-unprod25.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y \cdot z}\right)} - 1 \]
      8. add-sqr-sqrt52.6%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{y \cdot z}\right)} - 1 \]
    10. Applied egg-rr52.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def37.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)\right)} \]
      2. expm1-log1p38.1%

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    12. Simplified38.1%

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

    if -9.99999999999999949e60 < z < 1.6999999999999999e63

    1. Initial program 96.8%

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

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

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

Alternative 18: 48.7% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+105} \lor \neg \left(z \leq 2.2 \cdot 10^{+65}\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 -5.4e+105) (not (<= z 2.2e+65)))
    (/ 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 <= -5.4e+105) || !(z <= 2.2e+65)) {
		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 <= (-5.4d+105)) .or. (.not. (z <= 2.2d+65))) 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 <= -5.4e+105) || !(z <= 2.2e+65)) {
		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 <= -5.4e+105) or not (z <= 2.2e+65):
		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 <= -5.4e+105) || !(z <= 2.2e+65))
		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 <= -5.4e+105) || ~((z <= 2.2e+65)))
		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, -5.4e+105], N[Not[LessEqual[z, 2.2e+65]], $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 -5.4 \cdot 10^{+105} \lor \neg \left(z \leq 2.2 \cdot 10^{+65}\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 < -5.40000000000000033e105 or 2.1999999999999998e65 < z

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    9. Step-by-step derivation
      1. expm1-log1p-u44.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)\right)} \]
      2. expm1-udef57.3%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)} - 1} \]
      3. associate-/l/57.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{y \cdot z}}\right)} - 1 \]
      4. add-sqr-sqrt28.5%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z}\right)} - 1 \]
      5. sqrt-unprod47.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y \cdot z}\right)} - 1 \]
      6. sqr-neg47.4%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y \cdot z}\right)} - 1 \]
      8. add-sqr-sqrt56.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{y \cdot z}\right)} - 1 \]
    10. Applied egg-rr56.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def41.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)\right)} \]
      2. expm1-log1p41.3%

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    12. Simplified41.3%

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

    if -5.40000000000000033e105 < z < 2.1999999999999998e65

    1. Initial program 95.3%

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

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

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

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

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

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

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

Alternative 19: 64.0% 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}\;t \leq 8.5 \cdot 10^{-101}:\\ \;\;\;\;\frac{x_m}{y \cdot \left(t - z\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 8.5e-101) (/ x_m (* y (- t z))) (/ x_m (* (- y z) t)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (t <= 8.5e-101) {
		tmp = x_m / (y * (t - z));
	} else {
		tmp = x_m / ((y - z) * t);
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= 8.5d-101) then
        tmp = x_m / (y * (t - z))
    else
        tmp = x_m / ((y - z) * t)
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (t <= 8.5e-101) {
		tmp = x_m / (y * (t - z));
	} else {
		tmp = x_m / ((y - z) * t);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if t <= 8.5e-101:
		tmp = x_m / (y * (t - z))
	else:
		tmp = x_m / ((y - z) * t)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (t <= 8.5e-101)
		tmp = Float64(x_m / Float64(y * Float64(t - z)));
	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 <= 8.5e-101)
		tmp = x_m / (y * (t - z));
	else
		tmp = x_m / ((y - z) * t);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, 8.5e-101], N[(x$95$m / N[(y * N[(t - z), $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 8.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{x_m}{y \cdot \left(t - z\right)}\\

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


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

    1. Initial program 88.5%

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

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

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

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

    if 8.49999999999999941e-101 < t

    1. Initial program 88.9%

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

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

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

Alternative 20: 96.7% accurate, 1.0× speedup?

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

\\
x_s \cdot \frac{\frac{x_m}{y - z}}{t - z}
\end{array}
Derivation
  1. Initial program 88.6%

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{y - z}}}{t - z} \]
    3. add-sqr-sqrt96.8%

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

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

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

Alternative 21: 39.4% 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 88.6%

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

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

    \[\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 2024019 
(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))))