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

Percentage Accurate: 89.3% → 97.9%
Time: 14.8s
Alternatives: 20
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 89.3% 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: 97.9% 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 5 \cdot 10^{-289}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - 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 5e-289) (/ (/ x (- y z)) (- t 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 <= 5e-289) {
		tmp = (x / (y - z)) / (t - 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 <= 5d-289) then
        tmp = (x / (y - z)) / (t - 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 <= 5e-289) {
		tmp = (x / (y - z)) / (t - 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 <= 5e-289:
		tmp = (x / (y - z)) / (t - 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 <= 5e-289)
		tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - 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 <= 5e-289)
		tmp = (x / (y - z)) / (t - 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, 5e-289], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - 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 5 \cdot 10^{-289}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - 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))) < 5.00000000000000029e-289

    1. Initial program 89.1%

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

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

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

    if 5.00000000000000029e-289 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 99.8%

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

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

Alternative 2: 74.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 10^{-305}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.25 \cdot 10^{-5}:\\
\;\;\;\;t_1\\

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

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


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

    1. Initial program 86.3%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num80.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow80.9%

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

        \[\leadsto {\color{blue}{\left(\frac{z}{\frac{x}{z}}\right)}}^{-1} \]
    6. Applied egg-rr82.9%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified82.9%

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

    if -1.50000000000000008e55 < z < 9.99999999999999996e-306 or 4.99999999999999993e-119 < z < 2.25000000000000014e-5

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999996e-306 < z < 4.99999999999999993e-119

    1. Initial program 99.8%

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

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

    if 2.25000000000000014e-5 < z < 1.4e11

    1. Initial program 81.0%

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

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

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

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

    if 1.4e11 < z

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

Alternative 3: 66.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{x}{t}}{y}\\ t_2 := \frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-13}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 30000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x t) y)) (t_2 (* (/ x z) (/ 1.0 z))))
   (if (<= z -7.2e+54)
     t_2
     (if (<= z 8.2e-110)
       t_1
       (if (<= z 4.5e-13) (/ (/ (- x) y) z) (if (<= z 30000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double t_2 = (x / z) * (1.0 / z);
	double tmp;
	if (z <= -7.2e+54) {
		tmp = t_2;
	} else if (z <= 8.2e-110) {
		tmp = t_1;
	} else if (z <= 4.5e-13) {
		tmp = (-x / y) / z;
	} else if (z <= 30000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = (x / t) / y
    t_2 = (x / z) * (1.0d0 / z)
    if (z <= (-7.2d+54)) then
        tmp = t_2
    else if (z <= 8.2d-110) then
        tmp = t_1
    else if (z <= 4.5d-13) then
        tmp = (-x / y) / z
    else if (z <= 30000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double t_2 = (x / z) * (1.0 / z);
	double tmp;
	if (z <= -7.2e+54) {
		tmp = t_2;
	} else if (z <= 8.2e-110) {
		tmp = t_1;
	} else if (z <= 4.5e-13) {
		tmp = (-x / y) / z;
	} else if (z <= 30000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / t) / y
	t_2 = (x / z) * (1.0 / z)
	tmp = 0
	if z <= -7.2e+54:
		tmp = t_2
	elif z <= 8.2e-110:
		tmp = t_1
	elif z <= 4.5e-13:
		tmp = (-x / y) / z
	elif z <= 30000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / t) / y)
	t_2 = Float64(Float64(x / z) * Float64(1.0 / z))
	tmp = 0.0
	if (z <= -7.2e+54)
		tmp = t_2;
	elseif (z <= 8.2e-110)
		tmp = t_1;
	elseif (z <= 4.5e-13)
		tmp = Float64(Float64(Float64(-x) / y) / z);
	elseif (z <= 30000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / t) / y;
	t_2 = (x / z) * (1.0 / z);
	tmp = 0.0;
	if (z <= -7.2e+54)
		tmp = t_2;
	elseif (z <= 8.2e-110)
		tmp = t_1;
	elseif (z <= 4.5e-13)
		tmp = (-x / y) / z;
	elseif (z <= 30000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+54], t$95$2, If[LessEqual[z, 8.2e-110], t$95$1, If[LessEqual[z, 4.5e-13], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 30000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 8.2 \cdot 10^{-110}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\

\mathbf{elif}\;z \leq 30000000:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.2000000000000003e54 or 3e7 < z

    1. Initial program 88.7%

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

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified82.1%

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

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

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

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

    if -7.2000000000000003e54 < z < 8.19999999999999965e-110 or 4.5e-13 < z < 3e7

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.19999999999999965e-110 < z < 4.5e-13

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    10. Simplified38.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+54}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-110}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-13}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 30000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \]

Alternative 4: 66.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-110}:\\
\;\;\;\;\frac{1}{\frac{t}{\frac{x}{y}}}\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\

\mathbf{elif}\;z \leq 11000000000:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.65e54 or 1.1e10 < z

    1. Initial program 88.7%

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

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified82.1%

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

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

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

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

    if -1.65e54 < z < 9.2000000000000006e-110

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.2000000000000006e-110 < z < 3.8e-13

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    10. Simplified38.3%

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

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

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

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

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

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

    if 3.8e-13 < z < 1.1e10

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+54}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-110}:\\ \;\;\;\;\frac{1}{\frac{t}{\frac{x}{y}}}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-13}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 11000000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \]

Alternative 5: 65.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-110}:\\
\;\;\;\;\frac{1}{\frac{t}{\frac{x}{y}}}\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\

\mathbf{elif}\;z \leq 15000000000:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.8999999999999999e54

    1. Initial program 86.3%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num80.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow80.9%

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

        \[\leadsto {\color{blue}{\left(\frac{z}{\frac{x}{z}}\right)}}^{-1} \]
    6. Applied egg-rr82.9%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified82.9%

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

    if -2.8999999999999999e54 < z < 9.2000000000000006e-110

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.2000000000000006e-110 < z < 4.1000000000000002e-13

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    10. Simplified38.3%

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

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

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

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

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

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

    if 4.1000000000000002e-13 < z < 1.5e10

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e10 < z

    1. Initial program 90.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+54}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-110}:\\ \;\;\;\;\frac{1}{\frac{t}{\frac{x}{y}}}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-13}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 15000000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \]

Alternative 6: 73.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{if}\;z \leq -9 \cdot 10^{+54}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 15200000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* (- y z) t))))
   (if (<= z -9e+54)
     (/ 1.0 (/ z (/ x z)))
     (if (<= z 5.5e-119)
       t_1
       (if (<= z 2.15e-10)
         (/ x (* y (- t z)))
         (if (<= z 15200000.0) t_1 (* (/ x z) (/ 1.0 z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / ((y - z) * t);
	double tmp;
	if (z <= -9e+54) {
		tmp = 1.0 / (z / (x / z));
	} else if (z <= 5.5e-119) {
		tmp = t_1;
	} else if (z <= 2.15e-10) {
		tmp = x / (y * (t - z));
	} else if (z <= 15200000.0) {
		tmp = t_1;
	} else {
		tmp = (x / z) * (1.0 / 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 <= (-9d+54)) then
        tmp = 1.0d0 / (z / (x / z))
    else if (z <= 5.5d-119) then
        tmp = t_1
    else if (z <= 2.15d-10) then
        tmp = x / (y * (t - z))
    else if (z <= 15200000.0d0) then
        tmp = t_1
    else
        tmp = (x / z) * (1.0d0 / 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 <= -9e+54) {
		tmp = 1.0 / (z / (x / z));
	} else if (z <= 5.5e-119) {
		tmp = t_1;
	} else if (z <= 2.15e-10) {
		tmp = x / (y * (t - z));
	} else if (z <= 15200000.0) {
		tmp = t_1;
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / ((y - z) * t)
	tmp = 0
	if z <= -9e+54:
		tmp = 1.0 / (z / (x / z))
	elif z <= 5.5e-119:
		tmp = t_1
	elif z <= 2.15e-10:
		tmp = x / (y * (t - z))
	elif z <= 15200000.0:
		tmp = t_1
	else:
		tmp = (x / z) * (1.0 / z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(Float64(y - z) * t))
	tmp = 0.0
	if (z <= -9e+54)
		tmp = Float64(1.0 / Float64(z / Float64(x / z)));
	elseif (z <= 5.5e-119)
		tmp = t_1;
	elseif (z <= 2.15e-10)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (z <= 15200000.0)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / ((y - z) * t);
	tmp = 0.0;
	if (z <= -9e+54)
		tmp = 1.0 / (z / (x / z));
	elseif (z <= 5.5e-119)
		tmp = t_1;
	elseif (z <= 2.15e-10)
		tmp = x / (y * (t - z));
	elseif (z <= 15200000.0)
		tmp = t_1;
	else
		tmp = (x / z) * (1.0 / 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, -9e+54], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-119], t$95$1, If[LessEqual[z, 2.15e-10], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 15200000.0], t$95$1, N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 15200000:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 86.3%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num80.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow80.9%

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

        \[\leadsto {\color{blue}{\left(\frac{z}{\frac{x}{z}}\right)}}^{-1} \]
    6. Applied egg-rr82.9%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified82.9%

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

    if -8.99999999999999968e54 < z < 5.49999999999999959e-119 or 2.15000000000000007e-10 < z < 1.52e7

    1. Initial program 92.9%

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

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

    if 5.49999999999999959e-119 < z < 2.15000000000000007e-10

    1. Initial program 99.7%

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

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

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

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

    if 1.52e7 < z

    1. Initial program 90.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+54}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-119}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 15200000:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \]

Alternative 7: 62.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot \frac{1}{z}\\ t_2 := \frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{if}\;t \leq 2.3 \cdot 10^{-270}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-217}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-106}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3500000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ x z) (/ 1.0 z))) (t_2 (/ x (* y (- t z)))))
   (if (<= t 2.3e-270)
     t_2
     (if (<= t 6.4e-217)
       t_1
       (if (<= t 7.6e-106)
         t_2
         (if (<= t 3500000000.0) t_1 (/ (/ x t) (- y z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) * (1.0 / z);
	double t_2 = x / (y * (t - z));
	double tmp;
	if (t <= 2.3e-270) {
		tmp = t_2;
	} else if (t <= 6.4e-217) {
		tmp = t_1;
	} else if (t <= 7.6e-106) {
		tmp = t_2;
	} else if (t <= 3500000000.0) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x / z) * (1.0d0 / z)
    t_2 = x / (y * (t - z))
    if (t <= 2.3d-270) then
        tmp = t_2
    else if (t <= 6.4d-217) then
        tmp = t_1
    else if (t <= 7.6d-106) then
        tmp = t_2
    else if (t <= 3500000000.0d0) then
        tmp = t_1
    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 t_1 = (x / z) * (1.0 / z);
	double t_2 = x / (y * (t - z));
	double tmp;
	if (t <= 2.3e-270) {
		tmp = t_2;
	} else if (t <= 6.4e-217) {
		tmp = t_1;
	} else if (t <= 7.6e-106) {
		tmp = t_2;
	} else if (t <= 3500000000.0) {
		tmp = t_1;
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / z) * (1.0 / z)
	t_2 = x / (y * (t - z))
	tmp = 0
	if t <= 2.3e-270:
		tmp = t_2
	elif t <= 6.4e-217:
		tmp = t_1
	elif t <= 7.6e-106:
		tmp = t_2
	elif t <= 3500000000.0:
		tmp = t_1
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) * Float64(1.0 / z))
	t_2 = Float64(x / Float64(y * Float64(t - z)))
	tmp = 0.0
	if (t <= 2.3e-270)
		tmp = t_2;
	elseif (t <= 6.4e-217)
		tmp = t_1;
	elseif (t <= 7.6e-106)
		tmp = t_2;
	elseif (t <= 3500000000.0)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) * (1.0 / z);
	t_2 = x / (y * (t - z));
	tmp = 0.0;
	if (t <= 2.3e-270)
		tmp = t_2;
	elseif (t <= 6.4e-217)
		tmp = t_1;
	elseif (t <= 7.6e-106)
		tmp = t_2;
	elseif (t <= 3500000000.0)
		tmp = t_1;
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 2.3e-270], t$95$2, If[LessEqual[t, 6.4e-217], t$95$1, If[LessEqual[t, 7.6e-106], t$95$2, If[LessEqual[t, 3500000000.0], t$95$1, N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 6.4 \cdot 10^{-217}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 7.6 \cdot 10^{-106}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3500000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 2.3000000000000001e-270 or 6.4000000000000002e-217 < t < 7.5999999999999999e-106

    1. Initial program 93.9%

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

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

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

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

    if 2.3000000000000001e-270 < t < 6.4000000000000002e-217 or 7.5999999999999999e-106 < t < 3.5e9

    1. Initial program 87.1%

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

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified60.6%

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

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

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

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

    if 3.5e9 < t

    1. Initial program 89.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-217}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 3500000000:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 8: 74.7% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 3.7 \cdot 10^{+67}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.1e58

    1. Initial program 86.3%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num80.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow80.9%

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

        \[\leadsto {\color{blue}{\left(\frac{z}{\frac{x}{z}}\right)}}^{-1} \]
    6. Applied egg-rr82.9%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified82.9%

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

    if -1.1e58 < z < 9.19999999999999973e-119

    1. Initial program 93.3%

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

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

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

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

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

    if 9.19999999999999973e-119 < z < 7.19999999999999967e-6

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999967e-6 < z < 3.6999999999999997e67

    1. Initial program 84.2%

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

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

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

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

    if 3.6999999999999997e67 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+58}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-119}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+67}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \]

Alternative 9: 62.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ t_2 := \frac{\frac{x}{t}}{y}\\ \mathbf{if}\;z \leq -1.65 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-110}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{-12}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 14000000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* z z))) (t_2 (/ (/ x t) y)))
   (if (<= z -1.65e+54)
     t_1
     (if (<= z 5.1e-110)
       t_2
       (if (<= z 3.05e-12)
         (/ (/ (- x) y) z)
         (if (<= z 14000000000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (z * z);
	double t_2 = (x / t) / y;
	double tmp;
	if (z <= -1.65e+54) {
		tmp = t_1;
	} else if (z <= 5.1e-110) {
		tmp = t_2;
	} else if (z <= 3.05e-12) {
		tmp = (-x / y) / z;
	} else if (z <= 14000000000.0) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x / (z * z)
    t_2 = (x / t) / y
    if (z <= (-1.65d+54)) then
        tmp = t_1
    else if (z <= 5.1d-110) then
        tmp = t_2
    else if (z <= 3.05d-12) then
        tmp = (-x / y) / z
    else if (z <= 14000000000.0d0) then
        tmp = t_2
    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 / (z * z);
	double t_2 = (x / t) / y;
	double tmp;
	if (z <= -1.65e+54) {
		tmp = t_1;
	} else if (z <= 5.1e-110) {
		tmp = t_2;
	} else if (z <= 3.05e-12) {
		tmp = (-x / y) / z;
	} else if (z <= 14000000000.0) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (z * z)
	t_2 = (x / t) / y
	tmp = 0
	if z <= -1.65e+54:
		tmp = t_1
	elif z <= 5.1e-110:
		tmp = t_2
	elif z <= 3.05e-12:
		tmp = (-x / y) / z
	elif z <= 14000000000.0:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z * z))
	t_2 = Float64(Float64(x / t) / y)
	tmp = 0.0
	if (z <= -1.65e+54)
		tmp = t_1;
	elseif (z <= 5.1e-110)
		tmp = t_2;
	elseif (z <= 3.05e-12)
		tmp = Float64(Float64(Float64(-x) / y) / z);
	elseif (z <= 14000000000.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (z * z);
	t_2 = (x / t) / y;
	tmp = 0.0;
	if (z <= -1.65e+54)
		tmp = t_1;
	elseif (z <= 5.1e-110)
		tmp = t_2;
	elseif (z <= 3.05e-12)
		tmp = (-x / y) / z;
	elseif (z <= 14000000000.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -1.65e+54], t$95$1, If[LessEqual[z, 5.1e-110], t$95$2, If[LessEqual[z, 3.05e-12], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 14000000000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 5.1 \cdot 10^{-110}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 3.05 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\

\mathbf{elif}\;z \leq 14000000000:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.65e54 or 1.4e10 < z

    1. Initial program 88.7%

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

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified82.1%

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

    if -1.65e54 < z < 5.1000000000000002e-110 or 3.0500000000000001e-12 < z < 1.4e10

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.1000000000000002e-110 < z < 3.0500000000000001e-12

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    10. Simplified38.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+54}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{-110}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{-12}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 14000000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \end{array} \]

Alternative 10: 74.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 5.4 \cdot 10^{-196}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\

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


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

    1. Initial program 94.4%

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

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

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

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

    if -9.19999999999999965e-29 < y < 5.39999999999999963e-196

    1. Initial program 96.1%

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

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

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

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

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

    if 5.39999999999999963e-196 < y

    1. Initial program 85.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{-29}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-196}:\\ \;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \end{array} \]

Alternative 11: 74.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq 5.4 \cdot 10^{-196}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.9999999999999998e34

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999998e34 < y < 5.39999999999999963e-196

    1. Initial program 95.6%

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

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

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

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

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

    if 5.39999999999999963e-196 < y

    1. Initial program 85.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+34}:\\ \;\;\;\;\frac{1}{y \cdot \frac{t - z}{x}}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-196}:\\ \;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \end{array} \]

Alternative 12: 72.3% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 94.4%

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

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

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

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

    if -1.42000000000000005e-39 < y < 5.39999999999999963e-196

    1. Initial program 96.1%

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

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

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

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

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

    if 5.39999999999999963e-196 < y

    1. Initial program 85.7%

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

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

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

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

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

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

Alternative 13: 74.3% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 94.4%

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

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

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

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

    if -1.12e-35 < y < 1.6e-196

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

    if 1.6e-196 < y

    1. Initial program 85.7%

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

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

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

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

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

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

Alternative 14: 73.6% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 86.3%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num80.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow80.9%

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

        \[\leadsto {\color{blue}{\left(\frac{z}{\frac{x}{z}}\right)}}^{-1} \]
    6. Applied egg-rr82.9%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified82.9%

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

    if -4.90000000000000018e58 < z < 5e10

    1. Initial program 93.8%

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

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

    if 5e10 < z

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

Alternative 15: 90.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.6000000000000002e180

    1. Initial program 92.8%

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

    if 3.6000000000000002e180 < t

    1. Initial program 79.6%

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

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

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

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

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

Alternative 16: 96.9% accurate, 0.8× speedup?

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

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

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

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

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

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

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

Alternative 17: 46.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+101} \lor \neg \left(z \leq 6 \cdot 10^{+67}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.09999999999999999e101 or 6.0000000000000002e67 < z

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
      3. associate-/l/43.0%

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

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

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

    if -3.09999999999999999e101 < z < 6.0000000000000002e67

    1. Initial program 93.2%

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

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

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

Alternative 18: 61.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9000000000000 \lor \neg \left(z \leq 9.2 \cdot 10^{-110}\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 -9000000000000.0) (not (<= z 9.2e-110)))
   (/ x (* z z))
   (/ x (* y t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -9000000000000.0) || !(z <= 9.2e-110)) {
		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 <= (-9000000000000.0d0)) .or. (.not. (z <= 9.2d-110))) 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 <= -9000000000000.0) || !(z <= 9.2e-110)) {
		tmp = x / (z * z);
	} else {
		tmp = x / (y * t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -9000000000000.0) or not (z <= 9.2e-110):
		tmp = x / (z * z)
	else:
		tmp = x / (y * t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -9000000000000.0) || !(z <= 9.2e-110))
		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 <= -9000000000000.0) || ~((z <= 9.2e-110)))
		tmp = x / (z * z);
	else
		tmp = x / (y * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9000000000000.0], N[Not[LessEqual[z, 9.2e-110]], $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 -9000000000000 \lor \neg \left(z \leq 9.2 \cdot 10^{-110}\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 < -9e12 or 9.2000000000000006e-110 < z

    1. Initial program 89.3%

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

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

    if -9e12 < z < 9.2000000000000006e-110

    1. Initial program 94.7%

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

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

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

Alternative 19: 61.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+58} \lor \neg \left(z \leq 9.2 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15000000000000001e58 or 9.2000000000000006e-110 < z

    1. Initial program 89.7%

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

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

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

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

    if -1.15000000000000001e58 < z < 9.2000000000000006e-110

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 39.7% 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 91.6%

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

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

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

Developer target: 88.3% 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 2023275 
(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))))