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

Percentage Accurate: 89.2% → 98.1%
Time: 10.9s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 89.2% 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.1% accurate, 0.5× speedup?

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

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

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


\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 83.8%

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

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

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

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

    1. Initial program 99.5%

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

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

Alternative 2: 93.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ t_2 := \frac{x}{t - z}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{t_2}{y}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+305}:\\ \;\;\;\;\frac{x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \frac{-1}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (- t z))) (t_2 (/ x (- t z))))
   (if (<= t_1 (- INFINITY))
     (/ t_2 y)
     (if (<= t_1 4e+305) (/ x t_1) (* t_2 (/ -1.0 z))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double t_2 = x / (t - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2 / y;
	} else if (t_1 <= 4e+305) {
		tmp = x / t_1;
	} else {
		tmp = t_2 * (-1.0 / z);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double t_2 = x / (t - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_2 / y;
	} else if (t_1 <= 4e+305) {
		tmp = x / t_1;
	} else {
		tmp = t_2 * (-1.0 / z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	t_2 = x / (t - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_2 / y
	elif t_1 <= 4e+305:
		tmp = x / t_1
	else:
		tmp = t_2 * (-1.0 / z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	t_2 = Float64(x / Float64(t - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(t_2 / y);
	elseif (t_1 <= 4e+305)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(t_2 * Float64(-1.0 / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	t_2 = x / (t - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_2 / y;
	elseif (t_1 <= 4e+305)
		tmp = x / t_1;
	else
		tmp = t_2 * (-1.0 / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t$95$2 / y), $MachinePrecision], If[LessEqual[t$95$1, 4e+305], N[(x / t$95$1), $MachinePrecision], N[(t$95$2 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 70.5%

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 3.9999999999999998e305

    1. Initial program 99.1%

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

    if 3.9999999999999998e305 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

Alternative 3: 93.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{+305}:\\ \;\;\;\;\frac{x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-1}{z}}{\frac{t - z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (- t z))))
   (if (<= t_1 (- INFINITY))
     (/ (/ x (- t z)) y)
     (if (<= t_1 4e+305) (/ x t_1) (/ (/ -1.0 z) (/ (- t z) x))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x / (t - z)) / y;
	} else if (t_1 <= 4e+305) {
		tmp = x / t_1;
	} else {
		tmp = (-1.0 / z) / ((t - z) / x);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x / (t - z)) / y;
	} else if (t_1 <= 4e+305) {
		tmp = x / t_1;
	} else {
		tmp = (-1.0 / z) / ((t - z) / x);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x / (t - z)) / y
	elif t_1 <= 4e+305:
		tmp = x / t_1
	else:
		tmp = (-1.0 / z) / ((t - z) / x)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (t_1 <= 4e+305)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(-1.0 / z) / Float64(Float64(t - z) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x / (t - z)) / y;
	elseif (t_1 <= 4e+305)
		tmp = x / t_1;
	else
		tmp = (-1.0 / z) / ((t - z) / x);
	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[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 4e+305], N[(x / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 70.5%

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 3.9999999999999998e305

    1. Initial program 99.1%

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

    if 3.9999999999999998e305 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 73.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-x}{z}\\ \mathbf{if}\;y \leq -1.15 \cdot 10^{+210}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-112}:\\ \;\;\;\;\frac{t_1}{y - z}\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-133} \lor \neg \left(y \leq 1.12 \cdot 10^{-98}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{t - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (- x) z)))
   (if (<= y -1.15e+210)
     (/ (/ x (- t z)) y)
     (if (<= y -2.4e-5)
       (/ x (* y (- t z)))
       (if (<= y -1.15e-112)
         (/ t_1 (- y z))
         (if (or (<= y -5.6e-133) (not (<= y 1.12e-98)))
           (/ (/ x t) (- y z))
           (/ t_1 (- t z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = -x / z;
	double tmp;
	if (y <= -1.15e+210) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -2.4e-5) {
		tmp = x / (y * (t - z));
	} else if (y <= -1.15e-112) {
		tmp = t_1 / (y - z);
	} else if ((y <= -5.6e-133) || !(y <= 1.12e-98)) {
		tmp = (x / t) / (y - z);
	} else {
		tmp = t_1 / (t - z);
	}
	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 = -x / z
    if (y <= (-1.15d+210)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-2.4d-5)) then
        tmp = x / (y * (t - z))
    else if (y <= (-1.15d-112)) then
        tmp = t_1 / (y - z)
    else if ((y <= (-5.6d-133)) .or. (.not. (y <= 1.12d-98))) then
        tmp = (x / t) / (y - z)
    else
        tmp = t_1 / (t - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = -x / z;
	double tmp;
	if (y <= -1.15e+210) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -2.4e-5) {
		tmp = x / (y * (t - z));
	} else if (y <= -1.15e-112) {
		tmp = t_1 / (y - z);
	} else if ((y <= -5.6e-133) || !(y <= 1.12e-98)) {
		tmp = (x / t) / (y - z);
	} else {
		tmp = t_1 / (t - z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = -x / z
	tmp = 0
	if y <= -1.15e+210:
		tmp = (x / (t - z)) / y
	elif y <= -2.4e-5:
		tmp = x / (y * (t - z))
	elif y <= -1.15e-112:
		tmp = t_1 / (y - z)
	elif (y <= -5.6e-133) or not (y <= 1.12e-98):
		tmp = (x / t) / (y - z)
	else:
		tmp = t_1 / (t - z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / z)
	tmp = 0.0
	if (y <= -1.15e+210)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -2.4e-5)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= -1.15e-112)
		tmp = Float64(t_1 / Float64(y - z));
	elseif ((y <= -5.6e-133) || !(y <= 1.12e-98))
		tmp = Float64(Float64(x / t) / Float64(y - z));
	else
		tmp = Float64(t_1 / Float64(t - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = -x / z;
	tmp = 0.0;
	if (y <= -1.15e+210)
		tmp = (x / (t - z)) / y;
	elseif (y <= -2.4e-5)
		tmp = x / (y * (t - z));
	elseif (y <= -1.15e-112)
		tmp = t_1 / (y - z);
	elseif ((y <= -5.6e-133) || ~((y <= 1.12e-98)))
		tmp = (x / t) / (y - z);
	else
		tmp = t_1 / (t - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-x) / z), $MachinePrecision]}, If[LessEqual[y, -1.15e+210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -2.4e-5], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.15e-112], N[(t$95$1 / N[(y - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.6e-133], N[Not[LessEqual[y, 1.12e-98]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-x}{z}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+210}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

\mathbf{elif}\;y \leq -1.15 \cdot 10^{-112}:\\
\;\;\;\;\frac{t_1}{y - z}\\

\mathbf{elif}\;y \leq -5.6 \cdot 10^{-133} \lor \neg \left(y \leq 1.12 \cdot 10^{-98}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\

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


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

    1. Initial program 77.6%

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

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

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

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

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

    if -1.1499999999999999e210 < y < -2.4000000000000001e-5

    1. Initial program 91.6%

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

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

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

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

    if -2.4000000000000001e-5 < y < -1.14999999999999995e-112

    1. Initial program 94.1%

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

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

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

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

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

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

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

    if -1.14999999999999995e-112 < y < -5.5999999999999997e-133 or 1.12e-98 < y

    1. Initial program 83.9%

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

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

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

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

    if -5.5999999999999997e-133 < y < 1.12e-98

    1. Initial program 91.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{+210}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-112}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-133} \lor \neg \left(y \leq 1.12 \cdot 10^{-98}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \end{array} \]

Alternative 5: 73.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-x}{z}\\ \mathbf{if}\;y \leq -1.3 \cdot 10^{+210}:\\ \;\;\;\;\frac{x}{t - z} \cdot \frac{1}{y}\\ \mathbf{elif}\;y \leq -0.00012:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-110}:\\ \;\;\;\;\frac{t_1}{y - z}\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-132} \lor \neg \left(y \leq 2.2 \cdot 10^{-93}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{t - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (- x) z)))
   (if (<= y -1.3e+210)
     (* (/ x (- t z)) (/ 1.0 y))
     (if (<= y -0.00012)
       (/ x (* y (- t z)))
       (if (<= y -2.3e-110)
         (/ t_1 (- y z))
         (if (or (<= y -3e-132) (not (<= y 2.2e-93)))
           (/ (/ x t) (- y z))
           (/ t_1 (- t z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = -x / z;
	double tmp;
	if (y <= -1.3e+210) {
		tmp = (x / (t - z)) * (1.0 / y);
	} else if (y <= -0.00012) {
		tmp = x / (y * (t - z));
	} else if (y <= -2.3e-110) {
		tmp = t_1 / (y - z);
	} else if ((y <= -3e-132) || !(y <= 2.2e-93)) {
		tmp = (x / t) / (y - z);
	} else {
		tmp = t_1 / (t - z);
	}
	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 = -x / z
    if (y <= (-1.3d+210)) then
        tmp = (x / (t - z)) * (1.0d0 / y)
    else if (y <= (-0.00012d0)) then
        tmp = x / (y * (t - z))
    else if (y <= (-2.3d-110)) then
        tmp = t_1 / (y - z)
    else if ((y <= (-3d-132)) .or. (.not. (y <= 2.2d-93))) then
        tmp = (x / t) / (y - z)
    else
        tmp = t_1 / (t - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = -x / z;
	double tmp;
	if (y <= -1.3e+210) {
		tmp = (x / (t - z)) * (1.0 / y);
	} else if (y <= -0.00012) {
		tmp = x / (y * (t - z));
	} else if (y <= -2.3e-110) {
		tmp = t_1 / (y - z);
	} else if ((y <= -3e-132) || !(y <= 2.2e-93)) {
		tmp = (x / t) / (y - z);
	} else {
		tmp = t_1 / (t - z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = -x / z
	tmp = 0
	if y <= -1.3e+210:
		tmp = (x / (t - z)) * (1.0 / y)
	elif y <= -0.00012:
		tmp = x / (y * (t - z))
	elif y <= -2.3e-110:
		tmp = t_1 / (y - z)
	elif (y <= -3e-132) or not (y <= 2.2e-93):
		tmp = (x / t) / (y - z)
	else:
		tmp = t_1 / (t - z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / z)
	tmp = 0.0
	if (y <= -1.3e+210)
		tmp = Float64(Float64(x / Float64(t - z)) * Float64(1.0 / y));
	elseif (y <= -0.00012)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= -2.3e-110)
		tmp = Float64(t_1 / Float64(y - z));
	elseif ((y <= -3e-132) || !(y <= 2.2e-93))
		tmp = Float64(Float64(x / t) / Float64(y - z));
	else
		tmp = Float64(t_1 / Float64(t - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = -x / z;
	tmp = 0.0;
	if (y <= -1.3e+210)
		tmp = (x / (t - z)) * (1.0 / y);
	elseif (y <= -0.00012)
		tmp = x / (y * (t - z));
	elseif (y <= -2.3e-110)
		tmp = t_1 / (y - z);
	elseif ((y <= -3e-132) || ~((y <= 2.2e-93)))
		tmp = (x / t) / (y - z);
	else
		tmp = t_1 / (t - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-x) / z), $MachinePrecision]}, If[LessEqual[y, -1.3e+210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.00012], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.3e-110], N[(t$95$1 / N[(y - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3e-132], N[Not[LessEqual[y, 2.2e-93]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-x}{z}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+210}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{1}{y}\\

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

\mathbf{elif}\;y \leq -2.3 \cdot 10^{-110}:\\
\;\;\;\;\frac{t_1}{y - z}\\

\mathbf{elif}\;y \leq -3 \cdot 10^{-132} \lor \neg \left(y \leq 2.2 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\

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


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

    1. Initial program 77.6%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{t - z} \cdot x}}{y} \]
      4. div-inv95.9%

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

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

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

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

    if -1.29999999999999995e210 < y < -1.20000000000000003e-4

    1. Initial program 91.6%

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

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

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

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

    if -1.20000000000000003e-4 < y < -2.3000000000000001e-110

    1. Initial program 94.1%

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

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

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

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

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

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

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

    if -2.3000000000000001e-110 < y < -3e-132 or 2.19999999999999996e-93 < y

    1. Initial program 84.7%

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

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

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

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

    if -3e-132 < y < 2.19999999999999996e-93

    1. Initial program 90.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+210}:\\ \;\;\;\;\frac{x}{t - z} \cdot \frac{1}{y}\\ \mathbf{elif}\;y \leq -0.00012:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-110}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-132} \lor \neg \left(y \leq 2.2 \cdot 10^{-93}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \end{array} \]

Alternative 6: 66.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{1}{t \cdot \frac{y}{x}}\\ \mathbf{if}\;z \leq -3.05:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2050000000000:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+61}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ 1.0 (* t (/ y x)))))
   (if (<= z -3.05)
     (* (/ x z) (/ 1.0 z))
     (if (<= z 2.35e-48)
       t_1
       (if (<= z 2050000000000.0)
         (/ (- x) (* y z))
         (if (<= z 1.02e+61) t_1 (/ (/ x z) z)))))))
double code(double x, double y, double z, double t) {
	double t_1 = 1.0 / (t * (y / x));
	double tmp;
	if (z <= -3.05) {
		tmp = (x / z) * (1.0 / z);
	} else if (z <= 2.35e-48) {
		tmp = t_1;
	} else if (z <= 2050000000000.0) {
		tmp = -x / (y * z);
	} else if (z <= 1.02e+61) {
		tmp = t_1;
	} else {
		tmp = (x / z) / z;
	}
	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 = 1.0d0 / (t * (y / x))
    if (z <= (-3.05d0)) then
        tmp = (x / z) * (1.0d0 / z)
    else if (z <= 2.35d-48) then
        tmp = t_1
    else if (z <= 2050000000000.0d0) then
        tmp = -x / (y * z)
    else if (z <= 1.02d+61) then
        tmp = t_1
    else
        tmp = (x / z) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = 1.0 / (t * (y / x));
	double tmp;
	if (z <= -3.05) {
		tmp = (x / z) * (1.0 / z);
	} else if (z <= 2.35e-48) {
		tmp = t_1;
	} else if (z <= 2050000000000.0) {
		tmp = -x / (y * z);
	} else if (z <= 1.02e+61) {
		tmp = t_1;
	} else {
		tmp = (x / z) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = 1.0 / (t * (y / x))
	tmp = 0
	if z <= -3.05:
		tmp = (x / z) * (1.0 / z)
	elif z <= 2.35e-48:
		tmp = t_1
	elif z <= 2050000000000.0:
		tmp = -x / (y * z)
	elif z <= 1.02e+61:
		tmp = t_1
	else:
		tmp = (x / z) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(1.0 / Float64(t * Float64(y / x)))
	tmp = 0.0
	if (z <= -3.05)
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	elseif (z <= 2.35e-48)
		tmp = t_1;
	elseif (z <= 2050000000000.0)
		tmp = Float64(Float64(-x) / Float64(y * z));
	elseif (z <= 1.02e+61)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / z) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = 1.0 / (t * (y / x));
	tmp = 0.0;
	if (z <= -3.05)
		tmp = (x / z) * (1.0 / z);
	elseif (z <= 2.35e-48)
		tmp = t_1;
	elseif (z <= 2050000000000.0)
		tmp = -x / (y * z);
	elseif (z <= 1.02e+61)
		tmp = t_1;
	else
		tmp = (x / z) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.05], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e-48], t$95$1, If[LessEqual[z, 2050000000000.0], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+61], t$95$1, N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{if}\;z \leq -3.05:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\

\mathbf{elif}\;z \leq 2.35 \cdot 10^{-48}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2050000000000:\\
\;\;\;\;\frac{-x}{y \cdot z}\\

\mathbf{elif}\;z \leq 1.02 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 87.0%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow269.5%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      2. div-inv74.4%

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

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

    if -3.0499999999999998 < z < 2.3499999999999999e-48 or 2.05e12 < z < 1.01999999999999999e61

    1. Initial program 89.7%

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

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

        \[\leadsto \color{blue}{\frac{-x}{-y \cdot t}} \]
      2. neg-sub055.7%

        \[\leadsto \frac{\color{blue}{0 - x}}{-y \cdot t} \]
      3. metadata-eval55.7%

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

        \[\leadsto \color{blue}{\frac{\log 1}{-y \cdot t} - \frac{x}{-y \cdot t}} \]
      5. metadata-eval53.2%

        \[\leadsto \frac{\color{blue}{0}}{-y \cdot t} - \frac{x}{-y \cdot t} \]
      6. distribute-rgt-neg-in53.2%

        \[\leadsto \frac{0}{\color{blue}{y \cdot \left(-t\right)}} - \frac{x}{-y \cdot t} \]
      7. add-sqr-sqrt26.5%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-y \cdot t} \]
      8. sqrt-unprod33.9%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-y \cdot t} \]
      9. sqr-neg33.9%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-y \cdot t} \]
      10. sqrt-unprod7.8%

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-y \cdot t} \]
      12. frac-2neg21.7%

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{\frac{x}{y}}{t}} \]
    4. Applied egg-rr23.9%

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

        \[\leadsto \color{blue}{0} - \frac{\frac{x}{y}}{t} \]
      2. neg-sub024.8%

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

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

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

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

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

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

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

        \[\leadsto {\left(t \cdot \color{blue}{\frac{y}{-x}}\right)}^{-1} \]
      5. add-sqr-sqrt10.2%

        \[\leadsto {\left(t \cdot \frac{y}{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}\right)}^{-1} \]
      6. sqrt-unprod35.0%

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

        \[\leadsto {\left(t \cdot \frac{y}{\sqrt{\color{blue}{x \cdot x}}}\right)}^{-1} \]
      8. sqrt-unprod32.8%

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

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

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

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

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

    if 2.3499999999999999e-48 < z < 2.05e12

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if 1.01999999999999999e61 < z

    1. Initial program 80.7%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow268.3%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified84.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.05:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-48}:\\ \;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\ \mathbf{elif}\;z \leq 2050000000000:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+61}:\\ \;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 7: 72.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{if}\;z \leq -4.3 \cdot 10^{+55}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1400000000000:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* (- y z) t))))
   (if (<= z -4.3e+55)
     (* (/ x z) (/ 1.0 z))
     (if (<= z 4.2e-48)
       t_1
       (if (<= z 1400000000000.0)
         (/ (- x) (* y z))
         (if (<= z 3.3e+66) t_1 (/ (/ x z) z)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / ((y - z) * t);
	double tmp;
	if (z <= -4.3e+55) {
		tmp = (x / z) * (1.0 / z);
	} else if (z <= 4.2e-48) {
		tmp = t_1;
	} else if (z <= 1400000000000.0) {
		tmp = -x / (y * z);
	} else if (z <= 3.3e+66) {
		tmp = t_1;
	} else {
		tmp = (x / z) / z;
	}
	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 = x / ((y - z) * t)
    if (z <= (-4.3d+55)) then
        tmp = (x / z) * (1.0d0 / z)
    else if (z <= 4.2d-48) then
        tmp = t_1
    else if (z <= 1400000000000.0d0) then
        tmp = -x / (y * z)
    else if (z <= 3.3d+66) then
        tmp = t_1
    else
        tmp = (x / z) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x / ((y - z) * t);
	double tmp;
	if (z <= -4.3e+55) {
		tmp = (x / z) * (1.0 / z);
	} else if (z <= 4.2e-48) {
		tmp = t_1;
	} else if (z <= 1400000000000.0) {
		tmp = -x / (y * z);
	} else if (z <= 3.3e+66) {
		tmp = t_1;
	} else {
		tmp = (x / z) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / ((y - z) * t)
	tmp = 0
	if z <= -4.3e+55:
		tmp = (x / z) * (1.0 / z)
	elif z <= 4.2e-48:
		tmp = t_1
	elif z <= 1400000000000.0:
		tmp = -x / (y * z)
	elif z <= 3.3e+66:
		tmp = t_1
	else:
		tmp = (x / z) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(Float64(y - z) * t))
	tmp = 0.0
	if (z <= -4.3e+55)
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	elseif (z <= 4.2e-48)
		tmp = t_1;
	elseif (z <= 1400000000000.0)
		tmp = Float64(Float64(-x) / Float64(y * z));
	elseif (z <= 3.3e+66)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / z) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / ((y - z) * t);
	tmp = 0.0;
	if (z <= -4.3e+55)
		tmp = (x / z) * (1.0 / z);
	elseif (z <= 4.2e-48)
		tmp = t_1;
	elseif (z <= 1400000000000.0)
		tmp = -x / (y * z);
	elseif (z <= 3.3e+66)
		tmp = t_1;
	else
		tmp = (x / z) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e+55], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-48], t$95$1, If[LessEqual[z, 1400000000000.0], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+66], t$95$1, N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+55}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-48}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1400000000000:\\
\;\;\;\;\frac{-x}{y \cdot z}\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{+66}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 84.3%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow275.5%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified75.5%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      2. div-inv81.4%

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

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

    if -4.2999999999999999e55 < z < 4.19999999999999977e-48 or 1.4e12 < z < 3.3000000000000001e66

    1. Initial program 90.7%

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

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

    if 4.19999999999999977e-48 < z < 1.4e12

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if 3.3000000000000001e66 < z

    1. Initial program 80.4%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow269.7%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified86.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+55}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 1400000000000:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+66}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 8: 72.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+210}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-27}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-94}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1e+210)
   (/ (/ x (- t z)) y)
   (if (<= y -1.35e-27)
     (/ x (* y (- t z)))
     (if (<= y 4.8e-94) (/ (- x) (* z (- t z))) (/ (/ x t) (- y z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1e+210) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -1.35e-27) {
		tmp = x / (y * (t - z));
	} else if (y <= 4.8e-94) {
		tmp = -x / (z * (t - z));
	} else {
		tmp = (x / t) / (y - z);
	}
	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) :: tmp
    if (y <= (-1d+210)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-1.35d-27)) then
        tmp = x / (y * (t - z))
    else if (y <= 4.8d-94) then
        tmp = -x / (z * (t - z))
    else
        tmp = (x / t) / (y - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1e+210) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -1.35e-27) {
		tmp = x / (y * (t - z));
	} else if (y <= 4.8e-94) {
		tmp = -x / (z * (t - z));
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1e+210:
		tmp = (x / (t - z)) / y
	elif y <= -1.35e-27:
		tmp = x / (y * (t - z))
	elif y <= 4.8e-94:
		tmp = -x / (z * (t - z))
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1e+210)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -1.35e-27)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 4.8e-94)
		tmp = Float64(Float64(-x) / Float64(z * Float64(t - z)));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1e+210)
		tmp = (x / (t - z)) / y;
	elseif (y <= -1.35e-27)
		tmp = x / (y * (t - z));
	elseif (y <= 4.8e-94)
		tmp = -x / (z * (t - z));
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.35e-27], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-94], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+210}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

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

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


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

    1. Initial program 77.6%

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

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

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

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

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

    if -9.99999999999999927e209 < y < -1.34999999999999994e-27

    1. Initial program 92.3%

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

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

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

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

    if -1.34999999999999994e-27 < y < 4.8e-94

    1. Initial program 91.5%

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

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

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

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

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

    if 4.8e-94 < y

    1. Initial program 83.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+210}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-27}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-94}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 9: 74.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.1 \cdot 10^{+210}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-28}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -5.1e+210)
   (/ (/ x (- t z)) y)
   (if (<= y -6e-28)
     (/ x (* y (- t z)))
     (if (<= y 8e-95) (/ (/ (- x) z) (- t z)) (/ (/ x t) (- y z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -5.1e+210) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -6e-28) {
		tmp = x / (y * (t - z));
	} else if (y <= 8e-95) {
		tmp = (-x / z) / (t - z);
	} else {
		tmp = (x / t) / (y - z);
	}
	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) :: tmp
    if (y <= (-5.1d+210)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-6d-28)) then
        tmp = x / (y * (t - z))
    else if (y <= 8d-95) then
        tmp = (-x / z) / (t - z)
    else
        tmp = (x / t) / (y - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -5.1e+210) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -6e-28) {
		tmp = x / (y * (t - z));
	} else if (y <= 8e-95) {
		tmp = (-x / z) / (t - z);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -5.1e+210:
		tmp = (x / (t - z)) / y
	elif y <= -6e-28:
		tmp = x / (y * (t - z))
	elif y <= 8e-95:
		tmp = (-x / z) / (t - z)
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -5.1e+210)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -6e-28)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 8e-95)
		tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -5.1e+210)
		tmp = (x / (t - z)) / y;
	elseif (y <= -6e-28)
		tmp = x / (y * (t - z));
	elseif (y <= 8e-95)
		tmp = (-x / z) / (t - z);
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.1e+210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -6e-28], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-95], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+210}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

\mathbf{elif}\;y \leq 8 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\

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


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

    1. Initial program 77.6%

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

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

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

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

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

    if -5.1000000000000001e210 < y < -6.00000000000000005e-28

    1. Initial program 92.3%

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

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

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

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

    if -6.00000000000000005e-28 < y < 7.99999999999999992e-95

    1. Initial program 92.3%

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

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

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

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

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

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

    if 7.99999999999999992e-95 < y

    1. Initial program 82.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.1 \cdot 10^{+210}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-28}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 10: 62.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 3.55 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+24}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 3.55e-270)
   (/ x (* y (- t z)))
   (if (<= t 8.2e+24) (/ (/ x z) z) (/ x (* (- y z) t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 3.55e-270) {
		tmp = x / (y * (t - z));
	} else if (t <= 8.2e+24) {
		tmp = (x / z) / z;
	} else {
		tmp = x / ((y - z) * t);
	}
	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) :: tmp
    if (t <= 3.55d-270) then
        tmp = x / (y * (t - z))
    else if (t <= 8.2d+24) then
        tmp = (x / z) / z
    else
        tmp = x / ((y - z) * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 3.55e-270) {
		tmp = x / (y * (t - z));
	} else if (t <= 8.2e+24) {
		tmp = (x / z) / z;
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 3.55e-270:
		tmp = x / (y * (t - z))
	elif t <= 8.2e+24:
		tmp = (x / z) / z
	else:
		tmp = x / ((y - z) * t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 3.55e-270)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (t <= 8.2e+24)
		tmp = Float64(Float64(x / z) / z);
	else
		tmp = Float64(x / Float64(Float64(y - z) * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= 3.55e-270)
		tmp = x / (y * (t - z));
	elseif (t <= 8.2e+24)
		tmp = (x / z) / z;
	else
		tmp = x / ((y - z) * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, 3.55e-270], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+24], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.55 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\

\mathbf{elif}\;t \leq 8.2 \cdot 10^{+24}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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


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

    1. Initial program 91.1%

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

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

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

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

    if 3.5500000000000001e-270 < t < 8.2000000000000002e24

    1. Initial program 89.0%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow248.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified57.7%

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

    if 8.2000000000000002e24 < t

    1. Initial program 80.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.55 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+24}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 11: 62.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 3.7 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+21}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t 3.7e-270)
   (/ x (* y (- t z)))
   (if (<= t 4.7e+21) (/ (/ x z) z) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 3.7e-270) {
		tmp = x / (y * (t - z));
	} else if (t <= 4.7e+21) {
		tmp = (x / z) / z;
	} else {
		tmp = (x / t) / (y - z);
	}
	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) :: tmp
    if (t <= 3.7d-270) then
        tmp = x / (y * (t - z))
    else if (t <= 4.7d+21) then
        tmp = (x / z) / z
    else
        tmp = (x / t) / (y - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 3.7e-270) {
		tmp = x / (y * (t - z));
	} else if (t <= 4.7e+21) {
		tmp = (x / z) / z;
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 3.7e-270:
		tmp = x / (y * (t - z))
	elif t <= 4.7e+21:
		tmp = (x / z) / z
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 3.7e-270)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (t <= 4.7e+21)
		tmp = Float64(Float64(x / z) / z);
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= 3.7e-270)
		tmp = x / (y * (t - z));
	elseif (t <= 4.7e+21)
		tmp = (x / z) / z;
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, 3.7e-270], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+21], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.7 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\

\mathbf{elif}\;t \leq 4.7 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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


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

    1. Initial program 91.1%

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

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

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

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

    if 3.7000000000000001e-270 < t < 4.7e21

    1. Initial program 89.0%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow248.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified57.7%

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

    if 4.7e21 < t

    1. Initial program 80.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.7 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+21}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 12: 61.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-7} \lor \neg \left(z \leq 4.2 \cdot 10^{-48}\right):\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -2.25e-7) (not (<= z 4.2e-48))) (/ x (* z z)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.25e-7) || !(z <= 4.2e-48)) {
		tmp = x / (z * z);
	} else {
		tmp = x / (y * t);
	}
	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) :: tmp
    if ((z <= (-2.25d-7)) .or. (.not. (z <= 4.2d-48))) then
        tmp = x / (z * z)
    else
        tmp = x / (y * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.25e-7) || !(z <= 4.2e-48)) {
		tmp = x / (z * z);
	} else {
		tmp = x / (y * t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -2.25e-7) or not (z <= 4.2e-48):
		tmp = x / (z * z)
	else:
		tmp = x / (y * t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -2.25e-7) || !(z <= 4.2e-48))
		tmp = Float64(x / Float64(z * z));
	else
		tmp = Float64(x / Float64(y * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -2.25e-7) || ~((z <= 4.2e-48)))
		tmp = x / (z * z);
	else
		tmp = x / (y * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.25e-7], N[Not[LessEqual[z, 4.2e-48]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{-7} \lor \neg \left(z \leq 4.2 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2499999999999999e-7 or 4.19999999999999977e-48 < z

    1. Initial program 86.6%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow262.2%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified62.2%

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

    if -2.2499999999999999e-7 < z < 4.19999999999999977e-48

    1. Initial program 89.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-7} \lor \neg \left(z \leq 4.2 \cdot 10^{-48}\right):\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]

Alternative 13: 65.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-8} \lor \neg \left(z \leq 4.2 \cdot 10^{-48}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -3.2e-8) (not (<= z 4.2e-48))) (/ (/ x z) z) (/ x (* y t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.2e-8) || !(z <= 4.2e-48)) {
		tmp = (x / z) / z;
	} else {
		tmp = x / (y * t);
	}
	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) :: tmp
    if ((z <= (-3.2d-8)) .or. (.not. (z <= 4.2d-48))) then
        tmp = (x / z) / z
    else
        tmp = x / (y * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.2e-8) || !(z <= 4.2e-48)) {
		tmp = (x / z) / z;
	} else {
		tmp = x / (y * t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.2e-8) or not (z <= 4.2e-48):
		tmp = (x / z) / z
	else:
		tmp = x / (y * t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.2e-8) || !(z <= 4.2e-48))
		tmp = Float64(Float64(x / z) / z);
	else
		tmp = Float64(x / Float64(y * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -3.2e-8) || ~((z <= 4.2e-48)))
		tmp = (x / z) / z;
	else
		tmp = x / (y * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.2e-8], N[Not[LessEqual[z, 4.2e-48]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-8} \lor \neg \left(z \leq 4.2 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2000000000000002e-8 or 4.19999999999999977e-48 < z

    1. Initial program 86.6%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow262.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified69.9%

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

    if -3.2000000000000002e-8 < z < 4.19999999999999977e-48

    1. Initial program 89.3%

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

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

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

Alternative 14: 65.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.25e-8)
   (* (/ x z) (/ 1.0 z))
   (if (<= z 2.1e-48) (/ x (* y t)) (/ (/ x z) z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.25e-8) {
		tmp = (x / z) * (1.0 / z);
	} else if (z <= 2.1e-48) {
		tmp = x / (y * t);
	} else {
		tmp = (x / z) / z;
	}
	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) :: tmp
    if (z <= (-1.25d-8)) then
        tmp = (x / z) * (1.0d0 / z)
    else if (z <= 2.1d-48) then
        tmp = x / (y * t)
    else
        tmp = (x / z) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.25e-8) {
		tmp = (x / z) * (1.0 / z);
	} else if (z <= 2.1e-48) {
		tmp = x / (y * t);
	} else {
		tmp = (x / z) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.25e-8:
		tmp = (x / z) * (1.0 / z)
	elif z <= 2.1e-48:
		tmp = x / (y * t)
	else:
		tmp = (x / z) / z
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.25e-8)
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	elseif (z <= 2.1e-48)
		tmp = Float64(x / Float64(y * t));
	else
		tmp = Float64(Float64(x / z) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.25e-8)
		tmp = (x / z) * (1.0 / z);
	elseif (z <= 2.1e-48)
		tmp = x / (y * t);
	else
		tmp = (x / z) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.25e-8], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-48], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-48}:\\
\;\;\;\;\frac{x}{y \cdot t}\\

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


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

    1. Initial program 86.1%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow267.8%

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

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

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

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

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

    if -1.2499999999999999e-8 < z < 2.09999999999999989e-48

    1. Initial program 89.3%

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

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

    if 2.09999999999999989e-48 < z

    1. Initial program 87.1%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow256.3%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified67.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 15: 96.8% accurate, 1.0× speedup?

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

\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Derivation
  1. Initial program 87.7%

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

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

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

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

Alternative 16: 39.6% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \frac{x}{y \cdot t} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ x (* y t)))
double code(double x, double y, double z, double t) {
	return x / (y * t);
}
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 * t)
end function
public static double code(double x, double y, double z, double t) {
	return x / (y * t);
}
def code(x, y, z, t):
	return x / (y * t)
function code(x, y, z, t)
	return Float64(x / Float64(y * t))
end
function tmp = code(x, y, z, t)
	tmp = x / (y * t);
end
code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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