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

Percentage Accurate: 89.1% → 98.3%
Time: 13.3s
Alternatives: 19
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 19 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: 89.1% 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 90.8%

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

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

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

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

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

Alternative 2: 48.3% 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{\frac{x_m}{t}}{y}\\ t_2 := \frac{-x_m}{y \cdot z}\\ x_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -1.22 \cdot 10^{+190}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{+130}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4 \cdot 10^{+98}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-111}:\\ \;\;\;\;\frac{x_m}{y \cdot t}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-140} \lor \neg \left(y \leq 7 \cdot 10^{-27}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-x_m}{z \cdot t}\\ \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) y)) (t_2 (/ (- x_m) (* y z))))
   (*
    x_s
    (if (<= y -1.22e+190)
      t_2
      (if (<= y -2.7e+130)
        t_1
        (if (<= y -4e+98)
          t_2
          (if (<= y -8.2e-111)
            (/ x_m (* y t))
            (if (or (<= y -1.2e-140) (not (<= y 7e-27)))
              t_1
              (/ (- x_m) (* z t))))))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m / t) / y;
	double t_2 = -x_m / (y * z);
	double tmp;
	if (y <= -1.22e+190) {
		tmp = t_2;
	} else if (y <= -2.7e+130) {
		tmp = t_1;
	} else if (y <= -4e+98) {
		tmp = t_2;
	} else if (y <= -8.2e-111) {
		tmp = x_m / (y * t);
	} else if ((y <= -1.2e-140) || !(y <= 7e-27)) {
		tmp = t_1;
	} else {
		tmp = -x_m / (z * t);
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x_m / t) / y
    t_2 = -x_m / (y * z)
    if (y <= (-1.22d+190)) then
        tmp = t_2
    else if (y <= (-2.7d+130)) then
        tmp = t_1
    else if (y <= (-4d+98)) then
        tmp = t_2
    else if (y <= (-8.2d-111)) then
        tmp = x_m / (y * t)
    else if ((y <= (-1.2d-140)) .or. (.not. (y <= 7d-27))) then
        tmp = t_1
    else
        tmp = -x_m / (z * t)
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m / t) / y;
	double t_2 = -x_m / (y * z);
	double tmp;
	if (y <= -1.22e+190) {
		tmp = t_2;
	} else if (y <= -2.7e+130) {
		tmp = t_1;
	} else if (y <= -4e+98) {
		tmp = t_2;
	} else if (y <= -8.2e-111) {
		tmp = x_m / (y * t);
	} else if ((y <= -1.2e-140) || !(y <= 7e-27)) {
		tmp = t_1;
	} else {
		tmp = -x_m / (z * t);
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = (x_m / t) / y
	t_2 = -x_m / (y * z)
	tmp = 0
	if y <= -1.22e+190:
		tmp = t_2
	elif y <= -2.7e+130:
		tmp = t_1
	elif y <= -4e+98:
		tmp = t_2
	elif y <= -8.2e-111:
		tmp = x_m / (y * t)
	elif (y <= -1.2e-140) or not (y <= 7e-27):
		tmp = t_1
	else:
		tmp = -x_m / (z * t)
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(Float64(x_m / t) / y)
	t_2 = Float64(Float64(-x_m) / Float64(y * z))
	tmp = 0.0
	if (y <= -1.22e+190)
		tmp = t_2;
	elseif (y <= -2.7e+130)
		tmp = t_1;
	elseif (y <= -4e+98)
		tmp = t_2;
	elseif (y <= -8.2e-111)
		tmp = Float64(x_m / Float64(y * t));
	elseif ((y <= -1.2e-140) || !(y <= 7e-27))
		tmp = t_1;
	else
		tmp = Float64(Float64(-x_m) / Float64(z * t));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = (x_m / t) / y;
	t_2 = -x_m / (y * z);
	tmp = 0.0;
	if (y <= -1.22e+190)
		tmp = t_2;
	elseif (y <= -2.7e+130)
		tmp = t_1;
	elseif (y <= -4e+98)
		tmp = t_2;
	elseif (y <= -8.2e-111)
		tmp = x_m / (y * t);
	elseif ((y <= -1.2e-140) || ~((y <= 7e-27)))
		tmp = t_1;
	else
		tmp = -x_m / (z * t);
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -1.22e+190], t$95$2, If[LessEqual[y, -2.7e+130], t$95$1, If[LessEqual[y, -4e+98], t$95$2, If[LessEqual[y, -8.2e-111], N[(x$95$m / N[(y * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.2e-140], N[Not[LessEqual[y, 7e-27]], $MachinePrecision]], t$95$1, N[((-x$95$m) / N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

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

\mathbf{elif}\;y \leq -2.7 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4 \cdot 10^{+98}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -8.2 \cdot 10^{-111}:\\
\;\;\;\;\frac{x_m}{y \cdot t}\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-140} \lor \neg \left(y \leq 7 \cdot 10^{-27}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.21999999999999995e190 or -2.6999999999999998e130 < y < -3.99999999999999999e98

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

    if -1.21999999999999995e190 < y < -2.6999999999999998e130 or -8.19999999999999936e-111 < y < -1.19999999999999993e-140 or 7.0000000000000003e-27 < y

    1. Initial program 84.4%

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

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

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

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

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

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

    if -3.99999999999999999e98 < y < -8.19999999999999936e-111

    1. Initial program 95.6%

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

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

    if -1.19999999999999993e-140 < y < 7.0000000000000003e-27

    1. Initial program 91.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity91.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{t - z}} \]
      4. distribute-neg-frac77.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.22 \cdot 10^{+190}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{+130}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{+98}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-111}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-140} \lor \neg \left(y \leq 7 \cdot 10^{-27}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \end{array} \]

Alternative 3: 66.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+131}:\\
\;\;\;\;-\frac{\frac{x_m}{z}}{y}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.80000000000000011e80 or 3.39999999999999986e131 < z

    1. Initial program 81.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity81.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{-x}{z}}{t - z}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.80000000000000011e80 < z < 2.99999999999999998e-9

    1. Initial program 96.9%

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

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

    if 2.99999999999999998e-9 < z < 3.39999999999999986e131

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+80}:\\ \;\;\;\;\frac{x}{z \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-9}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+131}:\\ \;\;\;\;-\frac{\frac{x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(t - z\right)}\\ \end{array} \]

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+112} \lor \neg \left(z \leq 5.5 \cdot 10^{+136}\right):\\
\;\;\;\;\frac{\frac{-x_m}{z}}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.32e112 or 5.50000000000000039e136 < z

    1. Initial program 80.2%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity80.2%

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

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

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

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

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

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

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

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

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

    if -1.32e112 < z < 5.50000000000000039e136

    1. Initial program 95.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.32 \cdot 10^{+112} \lor \neg \left(z \leq 5.5 \cdot 10^{+136}\right):\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \end{array} \]

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+110}:\\
\;\;\;\;\frac{\frac{-x_m}{z}}{t - z}\\

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

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


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

    1. Initial program 74.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{t - z}} \]
      4. distribute-neg-frac89.7%

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

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

    if -2.45000000000000001e110 < z < 5.60000000000000023e123

    1. Initial program 96.4%

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

    if 5.60000000000000023e123 < z

    1. Initial program 82.1%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt29.5%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{y + \left(-z\right)}}}{t - z} \]
      5. add-sqr-sqrt0.0%

        \[\leadsto \frac{\frac{x}{y + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}}{t - z} \]
      6. sqrt-unprod77.5%

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

        \[\leadsto \frac{\frac{x}{y + \sqrt{\color{blue}{z \cdot z}}}}{t - z} \]
      8. sqrt-unprod77.2%

        \[\leadsto \frac{\frac{x}{y + \color{blue}{\sqrt{z} \cdot \sqrt{z}}}}{t - z} \]
      9. add-sqr-sqrt77.2%

        \[\leadsto \frac{\frac{x}{y + \color{blue}{z}}}{t - z} \]
      10. sub-neg77.2%

        \[\leadsto \frac{\frac{x}{y + z}}{\color{blue}{t + \left(-z\right)}} \]
      11. add-sqr-sqrt0.0%

        \[\leadsto \frac{\frac{x}{y + z}}{t + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      12. sqrt-unprod84.0%

        \[\leadsto \frac{\frac{x}{y + z}}{t + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      13. sqr-neg84.0%

        \[\leadsto \frac{\frac{x}{y + z}}{t + \sqrt{\color{blue}{z \cdot z}}} \]
      14. sqrt-unprod95.0%

        \[\leadsto \frac{\frac{x}{y + z}}{t + \color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      15. add-sqr-sqrt95.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{+110}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+123}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y + z}}{z + t}\\ \end{array} \]

Alternative 6: 71.4% accurate, 0.7× speedup?

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\

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

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


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

    1. Initial program 94.9%

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

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

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

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

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

    if -7.5e-16 < y < 6.50000000000000006e-88

    1. Initial program 92.9%

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

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

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

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

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

    if 6.50000000000000006e-88 < y

    1. Initial program 85.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity85.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-88}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 7: 72.8% accurate, 0.7× speedup?

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\

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

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


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

    1. Initial program 94.9%

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

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

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

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

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

    if -2.2499999999999999e-15 < y < 2.1999999999999999e-165

    1. Initial program 92.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity92.8%

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e-165 < y

    1. Initial program 86.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity86.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{-15}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-165}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 8: 58.4% accurate, 0.8× 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 -6.2 \cdot 10^{-37}:\\ \;\;\;\;\frac{\frac{x_m}{t}}{y}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-145}:\\ \;\;\;\;\frac{-1}{y} \cdot \frac{x_m}{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 -6.2e-37)
    (/ (/ x_m t) y)
    (if (<= t 1.25e-145) (* (/ -1.0 y) (/ x_m 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 <= -6.2e-37) {
		tmp = (x_m / t) / y;
	} else if (t <= 1.25e-145) {
		tmp = (-1.0 / y) * (x_m / 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 <= (-6.2d-37)) then
        tmp = (x_m / t) / y
    else if (t <= 1.25d-145) then
        tmp = ((-1.0d0) / y) * (x_m / 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 <= -6.2e-37) {
		tmp = (x_m / t) / y;
	} else if (t <= 1.25e-145) {
		tmp = (-1.0 / y) * (x_m / 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 <= -6.2e-37:
		tmp = (x_m / t) / y
	elif t <= 1.25e-145:
		tmp = (-1.0 / y) * (x_m / 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 <= -6.2e-37)
		tmp = Float64(Float64(x_m / t) / y);
	elseif (t <= 1.25e-145)
		tmp = Float64(Float64(-1.0 / y) * Float64(x_m / 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 <= -6.2e-37)
		tmp = (x_m / t) / y;
	elseif (t <= 1.25e-145)
		tmp = (-1.0 / y) * (x_m / 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, -6.2e-37], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.25e-145], N[(N[(-1.0 / y), $MachinePrecision] * N[(x$95$m / 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 -6.2 \cdot 10^{-37}:\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-145}:\\
\;\;\;\;\frac{-1}{y} \cdot \frac{x_m}{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 < -6.19999999999999987e-37

    1. Initial program 88.4%

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

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

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

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

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

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

    if -6.19999999999999987e-37 < t < 1.2499999999999999e-145

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t + z}} \]
    9. Taylor expanded in t around 0 23.3%

      \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \]
    10. Step-by-step derivation
      1. *-commutative23.3%

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot y}} \]
    12. Step-by-step derivation
      1. *-commutative23.3%

        \[\leadsto \frac{x}{\color{blue}{y \cdot z}} \]
      2. add-sqr-sqrt9.2%

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

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

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

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

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

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

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

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

    if 1.2499999999999999e-145 < t

    1. Initial program 88.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-37}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-145}:\\ \;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 9: 48.9% accurate, 0.9× speedup?

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-140} \lor \neg \left(y \leq 2.6 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{-x_m}{z \cdot t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25000000000000004e-140 or 2.60000000000000017e-27 < y

    1. Initial program 90.2%

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

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

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

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

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

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

    if -1.25000000000000004e-140 < y < 2.60000000000000017e-27

    1. Initial program 91.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity91.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{t - z}} \]
      4. distribute-neg-frac77.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{-140} \lor \neg \left(y \leq 2.6 \cdot 10^{-27}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \end{array} \]

Alternative 10: 52.6% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8e80 or 1.3e-11 < z

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

    if -8e80 < z < 1.3e-11

    1. Initial program 96.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+80} \lor \neg \left(z \leq 1.3 \cdot 10^{-11}\right):\\ \;\;\;\;-\frac{\frac{x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 11: 46.3% accurate, 1.0× 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 -9 \cdot 10^{+80} \lor \neg \left(z \leq 0.04\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 -9e+80) (not (<= z 0.04))) (/ 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 <= -9e+80) || !(z <= 0.04)) {
		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 <= (-9d+80)) .or. (.not. (z <= 0.04d0))) 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 <= -9e+80) || !(z <= 0.04)) {
		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 <= -9e+80) or not (z <= 0.04):
		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 <= -9e+80) || !(z <= 0.04))
		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 <= -9e+80) || ~((z <= 0.04)))
		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, -9e+80], N[Not[LessEqual[z, 0.04]], $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 -9 \cdot 10^{+80} \lor \neg \left(z \leq 0.04\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.00000000000000013e80 or 0.0400000000000000008 < z

    1. Initial program 83.3%

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

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

        \[\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}} \]
    4. Simplified52.7%

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    5. Step-by-step derivation
      1. expm1-log1p-u52.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t + z}} \]
    9. Taylor expanded in t around 0 34.8%

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

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

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

    if -9.00000000000000013e80 < z < 0.0400000000000000008

    1. Initial program 97.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+80} \lor \neg \left(z \leq 0.04\right):\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]

Alternative 12: 50.4% accurate, 1.0× 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 -9.5 \cdot 10^{+80} \lor \neg \left(z \leq 1.76 \cdot 10^{+105}\right):\\ \;\;\;\;\frac{\frac{x_m}{z}}{y}\\ \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 -9.5e+80) (not (<= z 1.76e+105)))
    (/ (/ x_m z) y)
    (/ (/ 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 <= -9.5e+80) || !(z <= 1.76e+105)) {
		tmp = (x_m / z) / y;
	} 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 <= (-9.5d+80)) .or. (.not. (z <= 1.76d+105))) then
        tmp = (x_m / z) / y
    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 <= -9.5e+80) || !(z <= 1.76e+105)) {
		tmp = (x_m / z) / y;
	} 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 <= -9.5e+80) or not (z <= 1.76e+105):
		tmp = (x_m / z) / y
	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 <= -9.5e+80) || !(z <= 1.76e+105))
		tmp = Float64(Float64(x_m / z) / y);
	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 <= -9.5e+80) || ~((z <= 1.76e+105)))
		tmp = (x_m / z) / y;
	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, -9.5e+80], N[Not[LessEqual[z, 1.76e+105]], $MachinePrecision]], N[(N[(x$95$m / z), $MachinePrecision] / y), $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 -9.5 \cdot 10^{+80} \lor \neg \left(z \leq 1.76 \cdot 10^{+105}\right):\\
\;\;\;\;\frac{\frac{x_m}{z}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.499999999999999e80 or 1.76e105 < z

    1. Initial program 81.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    5. Step-by-step derivation
      1. expm1-log1p-u54.3%

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

        \[\leadsto \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{x}{t - z}\right)} - 1}}{y} \]
      3. sub-neg68.2%

        \[\leadsto \frac{e^{\mathsf{log1p}\left(\frac{x}{\color{blue}{t + \left(-z\right)}}\right)} - 1}{y} \]
      4. add-sqr-sqrt29.0%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{x}{t + z}}}{y} \]
    9. Taylor expanded in t around 0 47.5%

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

    if -9.499999999999999e80 < z < 1.76e105

    1. Initial program 96.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+80} \lor \neg \left(z \leq 1.76 \cdot 10^{+105}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 13: 62.9% accurate, 1.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{-109}:\\ \;\;\;\;\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.5e-109) (/ 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.5e-109) {
		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.5d-109)) 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.5e-109) {
		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.5e-109:
		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.5e-109)
		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.5e-109)
		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.5e-109], 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.5 \cdot 10^{-109}:\\
\;\;\;\;\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 y < -1.50000000000000011e-109

    1. Initial program 96.3%

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

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

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

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

    if -1.50000000000000011e-109 < y

    1. Initial program 88.1%

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

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

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

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

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

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


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

    1. Initial program 96.3%

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

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

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

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

    if -6.49999999999999956e-112 < y

    1. Initial program 88.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity88.0%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 64.1% accurate, 1.0× speedup?

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t - z}\\

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


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

    1. Initial program 96.3%

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

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

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

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

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

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

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

    if -5.5e-112 < y

    1. Initial program 88.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity88.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{-112}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{x_m}{t - z}}{y}\\

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


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

    1. Initial program 96.8%

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

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

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

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

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

    if -7.7999999999999997e-171 < y

    1. Initial program 87.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity87.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{-171}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

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

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

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Step-by-step derivation
    1. *-un-lft-identity90.8%

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

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

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

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

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

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

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

Alternative 18: 45.7% accurate, 1.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}\;z \leq -1.05 \cdot 10^{+81}:\\ \;\;\;\;\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 (<= z -1.05e+81) (/ x_m (* y z)) (/ (/ x_m t) y))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.05e+81) {
		tmp = x_m / (y * z);
	} else {
		tmp = (x_m / t) / y;
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.05d+81)) then
        tmp = x_m / (y * z)
    else
        tmp = (x_m / t) / y
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (z <= -1.05e+81) {
		tmp = x_m / (y * z);
	} else {
		tmp = (x_m / t) / y;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if z <= -1.05e+81:
		tmp = x_m / (y * z)
	else:
		tmp = (x_m / t) / y
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (z <= -1.05e+81)
		tmp = Float64(x_m / Float64(y * z));
	else
		tmp = Float64(Float64(x_m / t) / y);
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (z <= -1.05e+81)
		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[LessEqual[z, -1.05e+81], N[(x$95$m / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)

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

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


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

    1. Initial program 78.0%

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    5. Step-by-step derivation
      1. expm1-log1p-u49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t + z}} \]
    9. Taylor expanded in t around 0 33.8%

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

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

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

    if -1.0499999999999999e81 < z

    1. Initial program 93.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+81}:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 19: 39.5% 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 90.8%

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

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

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

Developer target: 87.9% 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 2023321 
(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))))