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

Percentage Accurate: 89.1% → 98.4%
Time: 11.0s
Alternatives: 16
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 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.4% accurate, 0.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x_s \cdot \left(\frac{\sqrt{x_m}}{y - z} \cdot \frac{\sqrt{x_m}}{t - z}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 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 91.4%

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

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

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

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

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

Alternative 2: 97.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{1}{\frac{y - z}{x_m}}}{t - z}\\

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


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

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 98.5%

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

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

Alternative 3: 97.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 99.7%

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

    if -3.99999999999999991e-256 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x_m}{y - z}}{t - z}\\

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


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

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

    if 0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 98.5%

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

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

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

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

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


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

    1. Initial program 97.7%

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

    if 2e303 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

Alternative 6: 49.9% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ x_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2.15 \cdot 10^{-146}:\\ \;\;\;\;\frac{\frac{x_m}{y}}{t}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-91}:\\ \;\;\;\;\frac{-x_m}{y \cdot z}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+150} \lor \neg \left(t \leq 1.96 \cdot 10^{+205}\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 (<= t -2.15e-146)
    (/ (/ x_m y) t)
    (if (<= t 7.5e-91)
      (/ (- x_m) (* y z))
      (if (or (<= t 5e+150) (not (<= t 1.96e+205)))
        (/ (/ 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 (t <= -2.15e-146) {
		tmp = (x_m / y) / t;
	} else if (t <= 7.5e-91) {
		tmp = -x_m / (y * z);
	} else if ((t <= 5e+150) || !(t <= 1.96e+205)) {
		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 (t <= (-2.15d-146)) then
        tmp = (x_m / y) / t
    else if (t <= 7.5d-91) then
        tmp = -x_m / (y * z)
    else if ((t <= 5d+150) .or. (.not. (t <= 1.96d+205))) 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 (t <= -2.15e-146) {
		tmp = (x_m / y) / t;
	} else if (t <= 7.5e-91) {
		tmp = -x_m / (y * z);
	} else if ((t <= 5e+150) || !(t <= 1.96e+205)) {
		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 t <= -2.15e-146:
		tmp = (x_m / y) / t
	elif t <= 7.5e-91:
		tmp = -x_m / (y * z)
	elif (t <= 5e+150) or not (t <= 1.96e+205):
		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 (t <= -2.15e-146)
		tmp = Float64(Float64(x_m / y) / t);
	elseif (t <= 7.5e-91)
		tmp = Float64(Float64(-x_m) / Float64(y * z));
	elseif ((t <= 5e+150) || !(t <= 1.96e+205))
		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 (t <= -2.15e-146)
		tmp = (x_m / y) / t;
	elseif (t <= 7.5e-91)
		tmp = -x_m / (y * z);
	elseif ((t <= 5e+150) || ~((t <= 1.96e+205)))
		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[LessEqual[t, -2.15e-146], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 7.5e-91], N[((-x$95$m) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 5e+150], N[Not[LessEqual[t, 1.96e+205]], $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}\;t \leq -2.15 \cdot 10^{-146}:\\
\;\;\;\;\frac{\frac{x_m}{y}}{t}\\

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

\mathbf{elif}\;t \leq 5 \cdot 10^{+150} \lor \neg \left(t \leq 1.96 \cdot 10^{+205}\right):\\
\;\;\;\;\frac{\frac{x_m}{t}}{y}\\

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


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

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

    if -2.15e-146 < t < 7.50000000000000051e-91

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

    if 7.50000000000000051e-91 < t < 5.00000000000000009e150 or 1.9599999999999999e205 < t

    1. Initial program 89.5%

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

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

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

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

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

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

    if 5.00000000000000009e150 < t < 1.9599999999999999e205

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.15 \cdot 10^{-146}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-91}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+150} \lor \neg \left(t \leq 1.96 \cdot 10^{+205}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \end{array} \]

Alternative 7: 78.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.75999999999999992e-9 or 7.4999999999999996e-15 < z

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

    if -1.75999999999999992e-9 < z < 4.7999999999999999e-131

    1. Initial program 96.0%

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

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

    if 4.7999999999999999e-131 < z < 7.4999999999999996e-15

    1. Initial program 96.2%

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

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

        \[\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}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.76 \cdot 10^{-9}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-131}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-15}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \end{array} \]

Alternative 8: 79.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-x_m}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -0.054:\\
\;\;\;\;\frac{t_1}{t - z}\\

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

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

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


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

    1. Initial program 81.9%

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

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

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

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

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

        \[\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} \]
    5. Applied egg-rr99.9%

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

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

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

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

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

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

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

    if -0.0539999999999999994 < z < 2.0500000000000001e-131

    1. Initial program 96.1%

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

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

    if 2.0500000000000001e-131 < z < 1.1e-16

    1. Initial program 96.2%

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

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

        \[\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}} \]

    if 1.1e-16 < z

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+29} \lor \neg \left(z \leq 2.9 \cdot 10^{+102}\right):\\
\;\;\;\;\frac{x_m}{z \cdot \left(t - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1500000000000001e29 or 2.9000000000000002e102 < z

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1500000000000001e29 < z < 2.9000000000000002e102

    1. Initial program 96.8%

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

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

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

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

\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+29} \lor \neg \left(z \leq 7.8 \cdot 10^{+77}\right):\\
\;\;\;\;\frac{x_m}{z \cdot \left(y - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1500000000000001e29 or 7.7999999999999995e77 < z

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1500000000000001e29 < z < 7.7999999999999995e77

    1. Initial program 96.7%

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

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

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

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-91}:\\
\;\;\;\;\frac{-x_m}{y \cdot 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 < -5.9000000000000003e-146

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

    if -5.9000000000000003e-146 < t < 8.49999999999999985e-91

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

    if 8.49999999999999985e-91 < t

    1. Initial program 89.0%

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

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

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

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

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

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

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


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

    1. Initial program 89.6%

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t \cdot y} \cdot x} \]
      3. *-commutative54.6%

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

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

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

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

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

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

    if -1.26e-104 < y < 1.25999999999999994e-172

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

    if 1.25999999999999994e-172 < y

    1. Initial program 90.5%

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

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

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

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

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

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

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

Alternative 13: 63.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}\;y \leq -4.4 \cdot 10^{-97}:\\ \;\;\;\;\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 -4.4e-97) (/ 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 <= -4.4e-97) {
		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 <= (-4.4d-97)) 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 <= -4.4e-97) {
		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 <= -4.4e-97:
		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 <= -4.4e-97)
		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 <= -4.4e-97)
		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, -4.4e-97], 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 -4.4 \cdot 10^{-97}:\\
\;\;\;\;\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 < -4.3999999999999998e-97

    1. Initial program 89.4%

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

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

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

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

    if -4.3999999999999998e-97 < y

    1. Initial program 92.5%

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.4e73

    1. Initial program 84.3%

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

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    3. Step-by-step derivation
      1. clear-num61.5%

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

        \[\leadsto \color{blue}{\frac{1}{t \cdot y} \cdot x} \]
      3. *-commutative60.7%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{1}{y \cdot t}} \]
      2. div-inv60.8%

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

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

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

    if -4.4e73 < y

    1. Initial program 93.3%

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

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

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

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

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

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

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

Alternative 15: 39.3% 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 91.4%

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

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

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

Alternative 16: 43.1% accurate, 1.8× speedup?

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

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

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
  6. Final simplification46.7%

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

Developer target: 88.0% 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 2023322 
(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))))