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

Percentage Accurate: 88.5% → 96.7%
Time: 12.1s
Alternatives: 23
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 88.5% 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: 96.7% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
  4. Add Preprocessing
  5. Final simplification98.2%

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

Alternative 2: 51.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{x}{t}}{y}\\ t_2 := \frac{\frac{x}{-z}}{y}\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{+71}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-142}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-255}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 44000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \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)) y)))
   (if (<= z -1.15e+71)
     t_2
     (if (<= z -2e-61)
       t_1
       (if (<= z -7e-142)
         (/ (/ x t) (- z))
         (if (<= z 1.85e-255)
           (/ x (* t y))
           (if (<= z 44000000000.0)
             t_1
             (if (<= z 1.3e+185) (* (/ x z) (/ -1.0 t)) t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double t_2 = (x / -z) / y;
	double tmp;
	if (z <= -1.15e+71) {
		tmp = t_2;
	} else if (z <= -2e-61) {
		tmp = t_1;
	} else if (z <= -7e-142) {
		tmp = (x / t) / -z;
	} else if (z <= 1.85e-255) {
		tmp = x / (t * y);
	} else if (z <= 44000000000.0) {
		tmp = t_1;
	} else if (z <= 1.3e+185) {
		tmp = (x / z) * (-1.0 / t);
	} 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) / y
    if (z <= (-1.15d+71)) then
        tmp = t_2
    else if (z <= (-2d-61)) then
        tmp = t_1
    else if (z <= (-7d-142)) then
        tmp = (x / t) / -z
    else if (z <= 1.85d-255) then
        tmp = x / (t * y)
    else if (z <= 44000000000.0d0) then
        tmp = t_1
    else if (z <= 1.3d+185) then
        tmp = (x / z) * ((-1.0d0) / t)
    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) / y;
	double tmp;
	if (z <= -1.15e+71) {
		tmp = t_2;
	} else if (z <= -2e-61) {
		tmp = t_1;
	} else if (z <= -7e-142) {
		tmp = (x / t) / -z;
	} else if (z <= 1.85e-255) {
		tmp = x / (t * y);
	} else if (z <= 44000000000.0) {
		tmp = t_1;
	} else if (z <= 1.3e+185) {
		tmp = (x / z) * (-1.0 / t);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / t) / y
	t_2 = (x / -z) / y
	tmp = 0
	if z <= -1.15e+71:
		tmp = t_2
	elif z <= -2e-61:
		tmp = t_1
	elif z <= -7e-142:
		tmp = (x / t) / -z
	elif z <= 1.85e-255:
		tmp = x / (t * y)
	elif z <= 44000000000.0:
		tmp = t_1
	elif z <= 1.3e+185:
		tmp = (x / z) * (-1.0 / t)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / t) / y)
	t_2 = Float64(Float64(x / Float64(-z)) / y)
	tmp = 0.0
	if (z <= -1.15e+71)
		tmp = t_2;
	elseif (z <= -2e-61)
		tmp = t_1;
	elseif (z <= -7e-142)
		tmp = Float64(Float64(x / t) / Float64(-z));
	elseif (z <= 1.85e-255)
		tmp = Float64(x / Float64(t * y));
	elseif (z <= 44000000000.0)
		tmp = t_1;
	elseif (z <= 1.3e+185)
		tmp = Float64(Float64(x / z) * Float64(-1.0 / t));
	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) / y;
	tmp = 0.0;
	if (z <= -1.15e+71)
		tmp = t_2;
	elseif (z <= -2e-61)
		tmp = t_1;
	elseif (z <= -7e-142)
		tmp = (x / t) / -z;
	elseif (z <= 1.85e-255)
		tmp = x / (t * y);
	elseif (z <= 44000000000.0)
		tmp = t_1;
	elseif (z <= 1.3e+185)
		tmp = (x / z) * (-1.0 / t);
	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] / y), $MachinePrecision]}, If[LessEqual[z, -1.15e+71], t$95$2, If[LessEqual[z, -2e-61], t$95$1, If[LessEqual[z, -7e-142], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 1.85e-255], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 44000000000.0], t$95$1, If[LessEqual[z, 1.3e+185], N[(N[(x / z), $MachinePrecision] * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -7 \cdot 10^{-142}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\

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

\mathbf{elif}\;z \leq 44000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+185}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.1500000000000001e71 or 1.3e185 < z

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv55.4%

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

        \[\leadsto \color{blue}{\frac{-\frac{-x}{z}}{-y}} \]
      3. add-sqr-sqrt31.0%

        \[\leadsto \frac{-\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z}}{-y} \]
      4. sqrt-unprod51.7%

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

        \[\leadsto \frac{-\frac{\sqrt{\color{blue}{x \cdot x}}}{z}}{-y} \]
      6. sqrt-unprod24.4%

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}}{-y} \]
      10. sqrt-unprod70.1%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}}{-y} \]
      11. sqr-neg70.1%

        \[\leadsto \frac{\frac{x}{\sqrt{\color{blue}{z \cdot z}}}}{-y} \]
      12. sqrt-unprod16.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}}{-y} \]
      13. add-sqr-sqrt55.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{-y} \]
    10. Applied egg-rr55.4%

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

    if -1.1500000000000001e71 < z < -2.0000000000000001e-61 or 1.8500000000000001e-255 < z < 4.4e10

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e-61 < z < -7.00000000000000029e-142

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    10. Step-by-step derivation
      1. mul-1-neg40.2%

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

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

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

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

    if -7.00000000000000029e-142 < z < 1.8500000000000001e-255

    1. Initial program 94.6%

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

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

    if 4.4e10 < z < 1.3e185

    1. Initial program 74.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot z}} \]
    9. Step-by-step derivation
      1. neg-mul-123.1%

        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{t \cdot z} \]
      2. times-frac30.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+71}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-142}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-255}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 44000000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 51.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{y} \cdot \frac{1}{t}\\ t_2 := \frac{\frac{x}{-z}}{y}\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+71}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-117}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 92000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ x y) (/ 1.0 t))) (t_2 (/ (/ x (- z)) y)))
   (if (<= z -1.7e+71)
     t_2
     (if (<= z -5e-62)
       t_1
       (if (<= z -8.8e-138)
         (/ (/ x t) (- z))
         (if (<= z 2e-117)
           (/ x (* t y))
           (if (<= z 92000000000.0)
             t_1
             (if (<= z 3.5e+185) (* (/ x z) (/ -1.0 t)) t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / y) * (1.0 / t);
	double t_2 = (x / -z) / y;
	double tmp;
	if (z <= -1.7e+71) {
		tmp = t_2;
	} else if (z <= -5e-62) {
		tmp = t_1;
	} else if (z <= -8.8e-138) {
		tmp = (x / t) / -z;
	} else if (z <= 2e-117) {
		tmp = x / (t * y);
	} else if (z <= 92000000000.0) {
		tmp = t_1;
	} else if (z <= 3.5e+185) {
		tmp = (x / z) * (-1.0 / t);
	} 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 / y) * (1.0d0 / t)
    t_2 = (x / -z) / y
    if (z <= (-1.7d+71)) then
        tmp = t_2
    else if (z <= (-5d-62)) then
        tmp = t_1
    else if (z <= (-8.8d-138)) then
        tmp = (x / t) / -z
    else if (z <= 2d-117) then
        tmp = x / (t * y)
    else if (z <= 92000000000.0d0) then
        tmp = t_1
    else if (z <= 3.5d+185) then
        tmp = (x / z) * ((-1.0d0) / t)
    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 / y) * (1.0 / t);
	double t_2 = (x / -z) / y;
	double tmp;
	if (z <= -1.7e+71) {
		tmp = t_2;
	} else if (z <= -5e-62) {
		tmp = t_1;
	} else if (z <= -8.8e-138) {
		tmp = (x / t) / -z;
	} else if (z <= 2e-117) {
		tmp = x / (t * y);
	} else if (z <= 92000000000.0) {
		tmp = t_1;
	} else if (z <= 3.5e+185) {
		tmp = (x / z) * (-1.0 / t);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / y) * (1.0 / t)
	t_2 = (x / -z) / y
	tmp = 0
	if z <= -1.7e+71:
		tmp = t_2
	elif z <= -5e-62:
		tmp = t_1
	elif z <= -8.8e-138:
		tmp = (x / t) / -z
	elif z <= 2e-117:
		tmp = x / (t * y)
	elif z <= 92000000000.0:
		tmp = t_1
	elif z <= 3.5e+185:
		tmp = (x / z) * (-1.0 / t)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / y) * Float64(1.0 / t))
	t_2 = Float64(Float64(x / Float64(-z)) / y)
	tmp = 0.0
	if (z <= -1.7e+71)
		tmp = t_2;
	elseif (z <= -5e-62)
		tmp = t_1;
	elseif (z <= -8.8e-138)
		tmp = Float64(Float64(x / t) / Float64(-z));
	elseif (z <= 2e-117)
		tmp = Float64(x / Float64(t * y));
	elseif (z <= 92000000000.0)
		tmp = t_1;
	elseif (z <= 3.5e+185)
		tmp = Float64(Float64(x / z) * Float64(-1.0 / t));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / y) * (1.0 / t);
	t_2 = (x / -z) / y;
	tmp = 0.0;
	if (z <= -1.7e+71)
		tmp = t_2;
	elseif (z <= -5e-62)
		tmp = t_1;
	elseif (z <= -8.8e-138)
		tmp = (x / t) / -z;
	elseif (z <= 2e-117)
		tmp = x / (t * y);
	elseif (z <= 92000000000.0)
		tmp = t_1;
	elseif (z <= 3.5e+185)
		tmp = (x / z) * (-1.0 / t);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / (-z)), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -1.7e+71], t$95$2, If[LessEqual[z, -5e-62], t$95$1, If[LessEqual[z, -8.8e-138], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 2e-117], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 92000000000.0], t$95$1, If[LessEqual[z, 3.5e+185], N[(N[(x / z), $MachinePrecision] * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{-138}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\

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

\mathbf{elif}\;z \leq 92000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+185}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.6999999999999999e71 or 3.50000000000000023e185 < z

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv55.4%

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

        \[\leadsto \color{blue}{\frac{-\frac{-x}{z}}{-y}} \]
      3. add-sqr-sqrt31.0%

        \[\leadsto \frac{-\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z}}{-y} \]
      4. sqrt-unprod51.7%

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

        \[\leadsto \frac{-\frac{\sqrt{\color{blue}{x \cdot x}}}{z}}{-y} \]
      6. sqrt-unprod24.4%

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}}{-y} \]
      10. sqrt-unprod70.1%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}}{-y} \]
      11. sqr-neg70.1%

        \[\leadsto \frac{\frac{x}{\sqrt{\color{blue}{z \cdot z}}}}{-y} \]
      12. sqrt-unprod16.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}}{-y} \]
      13. add-sqr-sqrt55.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{-y} \]
    10. Applied egg-rr55.4%

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

    if -1.6999999999999999e71 < z < -5.0000000000000002e-62 or 2.00000000000000006e-117 < z < 9.2e10

    1. Initial program 88.9%

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

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

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

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

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

    if -5.0000000000000002e-62 < z < -8.7999999999999995e-138

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    10. Step-by-step derivation
      1. mul-1-neg40.2%

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

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

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

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

    if -8.7999999999999995e-138 < z < 2.00000000000000006e-117

    1. Initial program 94.0%

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

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

    if 9.2e10 < z < 3.50000000000000023e185

    1. Initial program 74.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot z}} \]
    9. Step-by-step derivation
      1. neg-mul-123.1%

        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{t \cdot z} \]
      2. times-frac30.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+71}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-62}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-117}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 92000000000:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 51.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{x}{t}}{y}\\ t_2 := \frac{\frac{x}{-z}}{t}\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+97}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-255}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 17000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+185}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x t) y)) (t_2 (/ (/ x (- z)) t)))
   (if (<= z -1.3e+97)
     t_2
     (if (<= z -4.8e-60)
       t_1
       (if (<= z -2.6e-138)
         (/ (/ x t) (- z))
         (if (<= z 6.8e-255)
           (/ x (* t y))
           (if (<= z 17000000000.0)
             t_1
             (if (<= z 3.2e+185) t_2 (/ (/ x z) y)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double t_2 = (x / -z) / t;
	double tmp;
	if (z <= -1.3e+97) {
		tmp = t_2;
	} else if (z <= -4.8e-60) {
		tmp = t_1;
	} else if (z <= -2.6e-138) {
		tmp = (x / t) / -z;
	} else if (z <= 6.8e-255) {
		tmp = x / (t * y);
	} else if (z <= 17000000000.0) {
		tmp = t_1;
	} else if (z <= 3.2e+185) {
		tmp = t_2;
	} else {
		tmp = (x / z) / 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x / t) / y
    t_2 = (x / -z) / t
    if (z <= (-1.3d+97)) then
        tmp = t_2
    else if (z <= (-4.8d-60)) then
        tmp = t_1
    else if (z <= (-2.6d-138)) then
        tmp = (x / t) / -z
    else if (z <= 6.8d-255) then
        tmp = x / (t * y)
    else if (z <= 17000000000.0d0) then
        tmp = t_1
    else if (z <= 3.2d+185) then
        tmp = t_2
    else
        tmp = (x / z) / y
    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) / t;
	double tmp;
	if (z <= -1.3e+97) {
		tmp = t_2;
	} else if (z <= -4.8e-60) {
		tmp = t_1;
	} else if (z <= -2.6e-138) {
		tmp = (x / t) / -z;
	} else if (z <= 6.8e-255) {
		tmp = x / (t * y);
	} else if (z <= 17000000000.0) {
		tmp = t_1;
	} else if (z <= 3.2e+185) {
		tmp = t_2;
	} else {
		tmp = (x / z) / y;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / t) / y
	t_2 = (x / -z) / t
	tmp = 0
	if z <= -1.3e+97:
		tmp = t_2
	elif z <= -4.8e-60:
		tmp = t_1
	elif z <= -2.6e-138:
		tmp = (x / t) / -z
	elif z <= 6.8e-255:
		tmp = x / (t * y)
	elif z <= 17000000000.0:
		tmp = t_1
	elif z <= 3.2e+185:
		tmp = t_2
	else:
		tmp = (x / z) / y
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / t) / y)
	t_2 = Float64(Float64(x / Float64(-z)) / t)
	tmp = 0.0
	if (z <= -1.3e+97)
		tmp = t_2;
	elseif (z <= -4.8e-60)
		tmp = t_1;
	elseif (z <= -2.6e-138)
		tmp = Float64(Float64(x / t) / Float64(-z));
	elseif (z <= 6.8e-255)
		tmp = Float64(x / Float64(t * y));
	elseif (z <= 17000000000.0)
		tmp = t_1;
	elseif (z <= 3.2e+185)
		tmp = t_2;
	else
		tmp = Float64(Float64(x / z) / y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / t) / y;
	t_2 = (x / -z) / t;
	tmp = 0.0;
	if (z <= -1.3e+97)
		tmp = t_2;
	elseif (z <= -4.8e-60)
		tmp = t_1;
	elseif (z <= -2.6e-138)
		tmp = (x / t) / -z;
	elseif (z <= 6.8e-255)
		tmp = x / (t * y);
	elseif (z <= 17000000000.0)
		tmp = t_1;
	elseif (z <= 3.2e+185)
		tmp = t_2;
	else
		tmp = (x / z) / y;
	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] / t), $MachinePrecision]}, If[LessEqual[z, -1.3e+97], t$95$2, If[LessEqual[z, -4.8e-60], t$95$1, If[LessEqual[z, -2.6e-138], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 6.8e-255], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 17000000000.0], t$95$1, If[LessEqual[z, 3.2e+185], t$95$2, N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-138}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\

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

\mathbf{elif}\;z \leq 17000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+185}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.3e97 or 1.7e10 < z < 3.20000000000000006e185

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \]
      6. sqr-neg38.1%

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
      7. sqrt-unprod15.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{-t} \]
      7. add-sqr-sqrt15.1%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z}}{-t} \]
      8. sqrt-unprod42.1%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z}}{-t} \]
      9. sqr-neg42.1%

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{x \cdot x}}}{z}}{-t} \]
      10. sqrt-unprod25.4%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z}}{-t} \]
      11. add-sqr-sqrt41.6%

        \[\leadsto \frac{\frac{\color{blue}{x}}{z}}{-t} \]
    12. Applied egg-rr41.6%

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

    if -1.3e97 < z < -4.80000000000000019e-60 or 6.79999999999999967e-255 < z < 1.7e10

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000019e-60 < z < -2.6e-138

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    10. Step-by-step derivation
      1. mul-1-neg40.2%

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

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

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

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

    if -2.6e-138 < z < 6.79999999999999967e-255

    1. Initial program 94.6%

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

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

    if 3.20000000000000006e185 < z

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv49.8%

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{z}{-x}}}}{y} \]
      3. clear-num49.8%

        \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
      4. add-sqr-sqrt31.7%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z}}{y} \]
      5. sqrt-unprod49.0%

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{x}}{z}}{y} \]
    10. Applied egg-rr49.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+97}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-60}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-255}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 17000000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+185}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 51.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{x}{t}}{y}\\ t_2 := \frac{x}{-z}\\ t_3 := \frac{t\_2}{y}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+75}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-257}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 12000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+185}:\\ \;\;\;\;\frac{t\_2}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x t) y)) (t_2 (/ x (- z))) (t_3 (/ t_2 y)))
   (if (<= z -3.1e+75)
     t_3
     (if (<= z -5e-62)
       t_1
       (if (<= z -8.2e-138)
         (/ (/ x t) (- z))
         (if (<= z 7e-257)
           (/ x (* t y))
           (if (<= z 12000000.0) t_1 (if (<= z 2.5e+185) (/ t_2 t) t_3))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double t_2 = x / -z;
	double t_3 = t_2 / y;
	double tmp;
	if (z <= -3.1e+75) {
		tmp = t_3;
	} else if (z <= -5e-62) {
		tmp = t_1;
	} else if (z <= -8.2e-138) {
		tmp = (x / t) / -z;
	} else if (z <= 7e-257) {
		tmp = x / (t * y);
	} else if (z <= 12000000.0) {
		tmp = t_1;
	} else if (z <= 2.5e+185) {
		tmp = t_2 / t;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = (x / t) / y
    t_2 = x / -z
    t_3 = t_2 / y
    if (z <= (-3.1d+75)) then
        tmp = t_3
    else if (z <= (-5d-62)) then
        tmp = t_1
    else if (z <= (-8.2d-138)) then
        tmp = (x / t) / -z
    else if (z <= 7d-257) then
        tmp = x / (t * y)
    else if (z <= 12000000.0d0) then
        tmp = t_1
    else if (z <= 2.5d+185) then
        tmp = t_2 / t
    else
        tmp = t_3
    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;
	double t_3 = t_2 / y;
	double tmp;
	if (z <= -3.1e+75) {
		tmp = t_3;
	} else if (z <= -5e-62) {
		tmp = t_1;
	} else if (z <= -8.2e-138) {
		tmp = (x / t) / -z;
	} else if (z <= 7e-257) {
		tmp = x / (t * y);
	} else if (z <= 12000000.0) {
		tmp = t_1;
	} else if (z <= 2.5e+185) {
		tmp = t_2 / t;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / t) / y
	t_2 = x / -z
	t_3 = t_2 / y
	tmp = 0
	if z <= -3.1e+75:
		tmp = t_3
	elif z <= -5e-62:
		tmp = t_1
	elif z <= -8.2e-138:
		tmp = (x / t) / -z
	elif z <= 7e-257:
		tmp = x / (t * y)
	elif z <= 12000000.0:
		tmp = t_1
	elif z <= 2.5e+185:
		tmp = t_2 / t
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / t) / y)
	t_2 = Float64(x / Float64(-z))
	t_3 = Float64(t_2 / y)
	tmp = 0.0
	if (z <= -3.1e+75)
		tmp = t_3;
	elseif (z <= -5e-62)
		tmp = t_1;
	elseif (z <= -8.2e-138)
		tmp = Float64(Float64(x / t) / Float64(-z));
	elseif (z <= 7e-257)
		tmp = Float64(x / Float64(t * y));
	elseif (z <= 12000000.0)
		tmp = t_1;
	elseif (z <= 2.5e+185)
		tmp = Float64(t_2 / t);
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / t) / y;
	t_2 = x / -z;
	t_3 = t_2 / y;
	tmp = 0.0;
	if (z <= -3.1e+75)
		tmp = t_3;
	elseif (z <= -5e-62)
		tmp = t_1;
	elseif (z <= -8.2e-138)
		tmp = (x / t) / -z;
	elseif (z <= 7e-257)
		tmp = x / (t * y);
	elseif (z <= 12000000.0)
		tmp = t_1;
	elseif (z <= 2.5e+185)
		tmp = t_2 / t;
	else
		tmp = t_3;
	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[(x / (-z)), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / y), $MachinePrecision]}, If[LessEqual[z, -3.1e+75], t$95$3, If[LessEqual[z, -5e-62], t$95$1, If[LessEqual[z, -8.2e-138], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 7e-257], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 12000000.0], t$95$1, If[LessEqual[z, 2.5e+185], N[(t$95$2 / t), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{x}{-z}\\
t_3 := \frac{t\_2}{y}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+75}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq -5 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;z \leq 12000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+185}:\\
\;\;\;\;\frac{t\_2}{t}\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.1000000000000001e75 or 2.49999999999999995e185 < z

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv55.4%

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

        \[\leadsto \color{blue}{\frac{-\frac{-x}{z}}{-y}} \]
      3. add-sqr-sqrt31.0%

        \[\leadsto \frac{-\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z}}{-y} \]
      4. sqrt-unprod51.7%

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

        \[\leadsto \frac{-\frac{\sqrt{\color{blue}{x \cdot x}}}{z}}{-y} \]
      6. sqrt-unprod24.4%

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}}{-y} \]
      10. sqrt-unprod70.1%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}}{-y} \]
      11. sqr-neg70.1%

        \[\leadsto \frac{\frac{x}{\sqrt{\color{blue}{z \cdot z}}}}{-y} \]
      12. sqrt-unprod16.6%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}}{-y} \]
      13. add-sqr-sqrt55.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{-y} \]
    10. Applied egg-rr55.4%

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

    if -3.1000000000000001e75 < z < -5.0000000000000002e-62 or 7.00000000000000058e-257 < z < 1.2e7

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e-62 < z < -8.19999999999999998e-138

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    10. Step-by-step derivation
      1. mul-1-neg40.2%

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

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

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

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

    if -8.19999999999999998e-138 < z < 7.00000000000000058e-257

    1. Initial program 94.6%

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

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

    if 1.2e7 < z < 2.49999999999999995e185

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \]
      5. sqrt-unprod31.8%

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \]
      6. sqr-neg31.8%

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
      7. sqrt-unprod3.9%

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \]
      8. add-sqr-sqrt17.8%

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \color{blue}{x} \]
    10. Applied egg-rr17.8%

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot t}{x}}} \]
      3. clear-num17.8%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{x \cdot x}}}{z}}{-t} \]
      10. sqrt-unprod16.1%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z}}{-t} \]
      11. add-sqr-sqrt30.4%

        \[\leadsto \frac{\frac{\color{blue}{x}}{z}}{-t} \]
    12. Applied egg-rr30.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+75}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-257}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 12000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+185}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{-z}\\ \mathbf{if}\;t \leq -4.7 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-244}:\\ \;\;\;\;\frac{x}{z \cdot \left(-y\right)}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-160}:\\ \;\;\;\;\frac{t\_1}{t}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-135}:\\ \;\;\;\;\frac{t\_1}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (- z))))
   (if (<= t -4.7e-63)
     (/ (/ x t) y)
     (if (<= t 4.2e-244)
       (/ x (* z (- y)))
       (if (<= t 7.5e-160)
         (/ t_1 t)
         (if (<= t 3e-135) (/ t_1 y) (/ x (* t (- y z)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / -z;
	double tmp;
	if (t <= -4.7e-63) {
		tmp = (x / t) / y;
	} else if (t <= 4.2e-244) {
		tmp = x / (z * -y);
	} else if (t <= 7.5e-160) {
		tmp = t_1 / t;
	} else if (t <= 3e-135) {
		tmp = t_1 / y;
	} 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) :: tmp
    t_1 = x / -z
    if (t <= (-4.7d-63)) then
        tmp = (x / t) / y
    else if (t <= 4.2d-244) then
        tmp = x / (z * -y)
    else if (t <= 7.5d-160) then
        tmp = t_1 / t
    else if (t <= 3d-135) then
        tmp = t_1 / y
    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;
	double tmp;
	if (t <= -4.7e-63) {
		tmp = (x / t) / y;
	} else if (t <= 4.2e-244) {
		tmp = x / (z * -y);
	} else if (t <= 7.5e-160) {
		tmp = t_1 / t;
	} else if (t <= 3e-135) {
		tmp = t_1 / y;
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / -z
	tmp = 0
	if t <= -4.7e-63:
		tmp = (x / t) / y
	elif t <= 4.2e-244:
		tmp = x / (z * -y)
	elif t <= 7.5e-160:
		tmp = t_1 / t
	elif t <= 3e-135:
		tmp = t_1 / y
	else:
		tmp = x / (t * (y - z))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(-z))
	tmp = 0.0
	if (t <= -4.7e-63)
		tmp = Float64(Float64(x / t) / y);
	elseif (t <= 4.2e-244)
		tmp = Float64(x / Float64(z * Float64(-y)));
	elseif (t <= 7.5e-160)
		tmp = Float64(t_1 / t);
	elseif (t <= 3e-135)
		tmp = Float64(t_1 / y);
	else
		tmp = Float64(x / Float64(t * Float64(y - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / -z;
	tmp = 0.0;
	if (t <= -4.7e-63)
		tmp = (x / t) / y;
	elseif (t <= 4.2e-244)
		tmp = x / (z * -y);
	elseif (t <= 7.5e-160)
		tmp = t_1 / t;
	elseif (t <= 3e-135)
		tmp = t_1 / y;
	else
		tmp = x / (t * (y - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / (-z)), $MachinePrecision]}, If[LessEqual[t, -4.7e-63], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4.2e-244], N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-160], N[(t$95$1 / t), $MachinePrecision], If[LessEqual[t, 3e-135], N[(t$95$1 / y), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-160}:\\
\;\;\;\;\frac{t\_1}{t}\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-135}:\\
\;\;\;\;\frac{t\_1}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -4.7000000000000001e-63

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

    if -4.7000000000000001e-63 < t < 4.20000000000000003e-244

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.20000000000000003e-244 < t < 7.50000000000000023e-160

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \]
      6. sqr-neg37.3%

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \sqrt{\color{blue}{x \cdot x}} \]
      7. sqrt-unprod10.5%

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \]
      8. add-sqr-sqrt11.1%

        \[\leadsto \frac{\frac{1}{t}}{z} \cdot \color{blue}{x} \]
    10. Applied egg-rr11.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z}}{-t} \]
      8. sqrt-unprod38.1%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z}}{-t} \]
      9. sqr-neg38.1%

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{x \cdot x}}}{z}}{-t} \]
      10. sqrt-unprod28.3%

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

        \[\leadsto \frac{\frac{\color{blue}{x}}{z}}{-t} \]
    12. Applied egg-rr45.7%

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

    if 7.50000000000000023e-160 < t < 3.00000000000000012e-135

    1. Initial program 63.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
      2. div-inv99.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv60.7%

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

        \[\leadsto \color{blue}{\frac{-\frac{-x}{z}}{-y}} \]
      3. add-sqr-sqrt60.7%

        \[\leadsto \frac{-\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z}}{-y} \]
      4. sqrt-unprod21.7%

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

        \[\leadsto \frac{-\frac{\sqrt{\color{blue}{x \cdot x}}}{z}}{-y} \]
      6. sqrt-unprod0.0%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-z}}}{-y} \]
      9. add-sqr-sqrt41.5%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}}{-y} \]
      10. sqrt-unprod44.1%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}}{-y} \]
      11. sqr-neg44.1%

        \[\leadsto \frac{\frac{x}{\sqrt{\color{blue}{z \cdot z}}}}{-y} \]
      12. sqrt-unprod0.2%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{-y} \]
    10. Applied egg-rr60.7%

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

    if 3.00000000000000012e-135 < t

    1. Initial program 85.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-244}:\\ \;\;\;\;\frac{x}{z \cdot \left(-y\right)}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-160}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-135}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 78.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z - t}\\ \mathbf{if}\;z \leq -4.6 \cdot 10^{-40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-186}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-260}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+32}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x z) (- z t))))
   (if (<= z -4.6e-40)
     t_1
     (if (<= z -3.8e-186)
       (/ x (* t (- y z)))
       (if (<= z -1.5e-260)
         (/ (/ x y) (- t z))
         (if (<= z 7.5e+32) (/ (/ x (- t z)) y) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / (z - t);
	double tmp;
	if (z <= -4.6e-40) {
		tmp = t_1;
	} else if (z <= -3.8e-186) {
		tmp = x / (t * (y - z));
	} else if (z <= -1.5e-260) {
		tmp = (x / y) / (t - z);
	} else if (z <= 7.5e+32) {
		tmp = (x / (t - z)) / 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) / (z - t)
    if (z <= (-4.6d-40)) then
        tmp = t_1
    else if (z <= (-3.8d-186)) then
        tmp = x / (t * (y - z))
    else if (z <= (-1.5d-260)) then
        tmp = (x / y) / (t - z)
    else if (z <= 7.5d+32) then
        tmp = (x / (t - z)) / 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) / (z - t);
	double tmp;
	if (z <= -4.6e-40) {
		tmp = t_1;
	} else if (z <= -3.8e-186) {
		tmp = x / (t * (y - z));
	} else if (z <= -1.5e-260) {
		tmp = (x / y) / (t - z);
	} else if (z <= 7.5e+32) {
		tmp = (x / (t - z)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / z) / (z - t)
	tmp = 0
	if z <= -4.6e-40:
		tmp = t_1
	elif z <= -3.8e-186:
		tmp = x / (t * (y - z))
	elif z <= -1.5e-260:
		tmp = (x / y) / (t - z)
	elif z <= 7.5e+32:
		tmp = (x / (t - z)) / y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / Float64(z - t))
	tmp = 0.0
	if (z <= -4.6e-40)
		tmp = t_1;
	elseif (z <= -3.8e-186)
		tmp = Float64(x / Float64(t * Float64(y - z)));
	elseif (z <= -1.5e-260)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (z <= 7.5e+32)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) / (z - t);
	tmp = 0.0;
	if (z <= -4.6e-40)
		tmp = t_1;
	elseif (z <= -3.8e-186)
		tmp = x / (t * (y - z));
	elseif (z <= -1.5e-260)
		tmp = (x / y) / (t - z);
	elseif (z <= 7.5e+32)
		tmp = (x / (t - z)) / 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[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e-40], t$95$1, If[LessEqual[z, -3.8e-186], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-260], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+32], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.6e-40 or 7.49999999999999959e32 < z

    1. Initial program 78.6%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
      2. div-inv99.7%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{t - z}} \]
      3. distribute-frac-neg84.0%

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

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

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

    if -4.6e-40 < z < -3.79999999999999974e-186

    1. Initial program 96.1%

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

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

    if -3.79999999999999974e-186 < z < -1.5e-260

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e-260 < z < 7.49999999999999959e32

    1. Initial program 91.3%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
      2. div-inv95.7%

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

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

      \[\leadsto \frac{x}{t - z} \cdot \color{blue}{\frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv80.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-186}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-260}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+32}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 45.9% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -300 \lor \neg \left(z \leq 1.55 \cdot 10^{+34}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.49999999999999998e274 or -4.20000000000000029e196 < z < -300 or 1.54999999999999989e34 < z

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv47.2%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z} \]
      4. sqrt-unprod44.9%

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

        \[\leadsto \frac{\sqrt{\color{blue}{x \cdot x}}}{y \cdot z} \]
      6. sqrt-unprod18.0%

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

        \[\leadsto \frac{\color{blue}{x}}{y \cdot z} \]
    10. Applied egg-rr37.4%

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

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

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

    if -1.49999999999999998e274 < z < -4.20000000000000029e196

    1. Initial program 65.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot z}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt11.6%

        \[\leadsto \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{t \cdot z} \]
      2. sqrt-unprod34.5%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{t \cdot z} \]
      5. add-sqr-sqrt35.4%

        \[\leadsto \frac{\color{blue}{x}}{t \cdot z} \]
      6. *-un-lft-identity35.4%

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{t}}{z}} \]
    11. Step-by-step derivation
      1. *-lft-identity35.0%

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{z}} \]
      2. associate-/l/35.4%

        \[\leadsto \color{blue}{\frac{x}{z \cdot t}} \]
    12. Simplified35.4%

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

    if -300 < z < 1.54999999999999989e34

    1. Initial program 92.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+274}:\\ \;\;\;\;\frac{x}{z \cdot y}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+196}:\\ \;\;\;\;\frac{x}{t \cdot z}\\ \mathbf{elif}\;z \leq -300 \lor \neg \left(z \leq 1.55 \cdot 10^{+34}\right):\\ \;\;\;\;\frac{x}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 48.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1 \cdot 10^{+198}:\\
\;\;\;\;\frac{x}{t \cdot z}\\

\mathbf{elif}\;z \leq -2.5 \cdot 10^{+115} \lor \neg \left(z \leq 1.7 \cdot 10^{+42}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.49999999999999983e272 or -1.00000000000000002e198 < z < -2.50000000000000004e115 or 1.69999999999999988e42 < z

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv50.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x}}{y \cdot z} \]
    10. Applied egg-rr40.2%

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

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

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

    if -6.49999999999999983e272 < z < -1.00000000000000002e198

    1. Initial program 65.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot z}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt11.6%

        \[\leadsto \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{t \cdot z} \]
      2. sqrt-unprod34.5%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{t \cdot z} \]
      5. add-sqr-sqrt35.4%

        \[\leadsto \frac{\color{blue}{x}}{t \cdot z} \]
      6. *-un-lft-identity35.4%

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{t}}{z}} \]
    11. Step-by-step derivation
      1. *-lft-identity35.0%

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{z}} \]
      2. associate-/l/35.4%

        \[\leadsto \color{blue}{\frac{x}{z \cdot t}} \]
    12. Simplified35.4%

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

    if -2.50000000000000004e115 < z < 1.69999999999999988e42

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 71.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{+154}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -0.00145:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-163}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.06e+154)
   (/ (/ x (- t z)) y)
   (if (<= y -0.00145)
     (/ x (* (- t z) y))
     (if (<= y 9e-163) (/ x (* z (- z t))) (/ (/ x t) (- y z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.06e+154) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -0.00145) {
		tmp = x / ((t - z) * y);
	} else if (y <= 9e-163) {
		tmp = x / (z * (z - t));
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-1.06d+154)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-0.00145d0)) then
        tmp = x / ((t - z) * y)
    else if (y <= 9d-163) then
        tmp = x / (z * (z - t))
    else
        tmp = (x / t) / (y - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.06e+154) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -0.00145) {
		tmp = x / ((t - z) * y);
	} else if (y <= 9e-163) {
		tmp = x / (z * (z - t));
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.06e+154:
		tmp = (x / (t - z)) / y
	elif y <= -0.00145:
		tmp = x / ((t - z) * y)
	elif y <= 9e-163:
		tmp = x / (z * (z - t))
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.06e+154)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -0.00145)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	elseif (y <= 9e-163)
		tmp = Float64(x / Float64(z * Float64(z - t)));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.06e+154)
		tmp = (x / (t - z)) / y;
	elseif (y <= -0.00145)
		tmp = x / ((t - z) * y);
	elseif (y <= 9e-163)
		tmp = x / (z * (z - t));
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.06e+154], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -0.00145], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-163], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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

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


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

    1. Initial program 82.3%

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

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

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

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

      \[\leadsto \frac{x}{t - z} \cdot \color{blue}{\frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv97.3%

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

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

    if -1.06e154 < y < -0.00145

    1. Initial program 87.0%

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

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

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

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

    if -0.00145 < y < 8.9999999999999995e-163

    1. Initial program 87.7%

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

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

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

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

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

    if 8.9999999999999995e-163 < y

    1. Initial program 82.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{+154}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -0.00145:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-163}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 78.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-37}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\

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

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

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


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

    1. Initial program 79.8%

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

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

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

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

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

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

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

    if -1.54999999999999997e-37 < z < -6.00000000000000008e-187

    1. Initial program 96.3%

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

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

    if -6.00000000000000008e-187 < z < 5.40000000000000025e32

    1. Initial program 91.8%

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

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

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

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

      \[\leadsto \frac{x}{t - z} \cdot \color{blue}{\frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv81.1%

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

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

    if 5.40000000000000025e32 < z

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 50.9% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.55 \cdot 10^{+185}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.5000000000000001e114 or 2.54999999999999998e185 < z

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv57.7%

        \[\leadsto \color{blue}{\frac{\frac{-x}{z}}{y}} \]
      2. clear-num57.7%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{z}{-x}}}}{y} \]
      3. clear-num57.7%

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

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

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

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

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

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

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

    if -8.5000000000000001e114 < z < 2.6e10

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

    if 2.6e10 < z < 2.54999999999999998e185

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    10. Step-by-step derivation
      1. mul-1-neg23.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+114}:\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \mathbf{elif}\;z \leq 26000000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+185}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{t}\\
\mathbf{if}\;z \leq -3 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+58}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+187}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.0000000000000001e131 or 1.95000000000000005e58 < z < 4.60000000000000008e187

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{t \cdot z}} \]
      2. add-sqr-sqrt14.8%

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

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

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{1}{t \cdot z} \]
      5. sqrt-unprod17.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{z}}{t}} \]
      5. *-lft-identity42.1%

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{t} \]
    12. Simplified42.1%

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

    if -3.0000000000000001e131 < z < 1.95000000000000005e58

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

    if 4.60000000000000008e187 < z

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv48.0%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z} \]
      4. sqrt-unprod46.6%

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

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

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

        \[\leadsto \frac{\color{blue}{x}}{y \cdot z} \]
    10. Applied egg-rr45.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+131}:\\ \;\;\;\;\frac{\frac{x}{z}}{t}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+58}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+187}:\\ \;\;\;\;\frac{\frac{x}{z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 92.9% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 71.7%

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

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

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

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

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

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

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

    if -1.4000000000000001e157 < z < 1.20000000000000003e124

    1. Initial program 91.4%

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

    if 1.20000000000000003e124 < z

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 65.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+154}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-40}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -3.8e+154)
   (/ (/ x y) (- t z))
   (if (<= y -5.8e-40) (/ x (* (- t z) y)) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3.8e+154) {
		tmp = (x / y) / (t - z);
	} else if (y <= -5.8e-40) {
		tmp = x / ((t - z) * y);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-3.8d+154)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-5.8d-40)) then
        tmp = x / ((t - z) * y)
    else
        tmp = (x / t) / (y - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3.8e+154) {
		tmp = (x / y) / (t - z);
	} else if (y <= -5.8e-40) {
		tmp = x / ((t - z) * y);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -3.8e+154:
		tmp = (x / y) / (t - z)
	elif y <= -5.8e-40:
		tmp = x / ((t - z) * y)
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -3.8e+154)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -5.8e-40)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -3.8e+154)
		tmp = (x / y) / (t - z);
	elseif (y <= -5.8e-40)
		tmp = x / ((t - z) * y);
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.8e+154], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.8e-40], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e154 < y < -5.7999999999999998e-40

    1. Initial program 85.8%

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

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

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

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

    if -5.7999999999999998e-40 < y

    1. Initial program 85.2%

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

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

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

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

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

Alternative 16: 73.6% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 82.2%

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

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

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

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

      \[\leadsto \frac{x}{t - z} \cdot \color{blue}{\frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv61.1%

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

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

    if -1.05000000000000001e-65 < t < 2.1500000000000001e-35

    1. Initial program 87.9%

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

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

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

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

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

    if 2.1500000000000001e-35 < t

    1. Initial program 82.2%

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

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

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

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

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

Alternative 17: 50.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv62.6%

        \[\leadsto \color{blue}{\frac{\frac{-x}{z}}{y}} \]
      2. clear-num62.6%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{z}{-x}}}}{y} \]
      3. clear-num62.6%

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{x}}{z}}{y} \]
    10. Applied egg-rr58.7%

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

    if -9.6e114 < z < 4.6e13

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

    if 4.6e13 < z

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 46.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+21} \lor \neg \left(z \leq 2.25 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{x}{t \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.6e21 or 2.25000000000000008e63 < z

    1. Initial program 78.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot z}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt18.9%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{t \cdot z} \]
      3. sqr-neg41.9%

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

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

        \[\leadsto \frac{\color{blue}{x}}{t \cdot z} \]
      6. *-un-lft-identity35.8%

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{t}}{z}} \]
    11. Step-by-step derivation
      1. *-lft-identity31.0%

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{z}} \]
      2. associate-/l/35.8%

        \[\leadsto \color{blue}{\frac{x}{z \cdot t}} \]
    12. Simplified35.8%

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

    if -8.6e21 < z < 2.25000000000000008e63

    1. Initial program 91.0%

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

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

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

Alternative 19: 50.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+115} \lor \neg \left(z \leq 5.6 \cdot 10^{+42}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7e115 or 5.5999999999999999e42 < z

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z}} \cdot \frac{1}{y} \]
    9. Step-by-step derivation
      1. un-div-inv51.0%

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{z}{-x}}}}{y} \]
      3. clear-num51.0%

        \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
      4. add-sqr-sqrt24.8%

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{x}}{z}}{y} \]
    10. Applied egg-rr46.7%

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

    if -1.7e115 < z < 5.5999999999999999e42

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 63.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.35e-39) (/ x (* (- t z) y)) (/ x (* t (- y z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.35e-39) {
		tmp = x / ((t - z) * y);
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-1.35d-39)) then
        tmp = x / ((t - z) * y)
    else
        tmp = x / (t * (y - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.35e-39) {
		tmp = x / ((t - z) * y);
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.35e-39:
		tmp = x / ((t - z) * y)
	else:
		tmp = x / (t * (y - z))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.35e-39)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	else
		tmp = Float64(x / Float64(t * Float64(y - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.35e-39)
		tmp = x / ((t - z) * y);
	else
		tmp = x / (t * (y - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.35e-39], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 84.5%

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

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

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

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

    if -1.35e-39 < y

    1. Initial program 85.2%

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

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

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

Alternative 21: 64.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.35e-39) (/ x (* (- t z) y)) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.35e-39) {
		tmp = x / ((t - z) * y);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-1.35d-39)) then
        tmp = x / ((t - z) * y)
    else
        tmp = (x / t) / (y - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.35e-39) {
		tmp = x / ((t - z) * y);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.35e-39:
		tmp = x / ((t - z) * y)
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.35e-39)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.35e-39)
		tmp = x / ((t - z) * y);
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.35e-39], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 84.5%

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

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

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

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

    if -1.35e-39 < y

    1. Initial program 85.2%

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

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

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

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

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

Alternative 22: 68.1% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 86.1%

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

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

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

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

      \[\leadsto \frac{x}{t - z} \cdot \color{blue}{\frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv63.3%

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

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

    if 1.4e17 < t

    1. Initial program 81.1%

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

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

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

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

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

Alternative 23: 39.3% accurate, 1.8× speedup?

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

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

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

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

    \[\leadsto \frac{x}{t \cdot y} \]
  5. Add Preprocessing

Developer target: 87.5% 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 2024130 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :alt
  (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))))