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

Percentage Accurate: 89.3% → 98.2%
Time: 13.1s
Alternatives: 25
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 25 alternatives:

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

Initial Program: 89.3% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 84.0%

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

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

    1. Initial program 98.2%

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

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

Alternative 2: 49.0% accurate, 0.0× speedup?

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

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

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

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

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

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

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

Alternative 3: 46.8% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot t}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{+20} \lor \neg \left(t \leq 1.95 \cdot 10^{+174}\right) \land t \leq 2.2 \cdot 10^{+239}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.4999999999999996e-86 or 2.0999999999999999e-116 < t < 1.8e20 or 1.9499999999999999e174 < t < 2.20000000000000005e239

    1. Initial program 88.2%

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

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

    if -9.4999999999999996e-86 < t < 2.0999999999999999e-116

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e20 < t < 1.9499999999999999e174 or 2.20000000000000005e239 < t

    1. Initial program 85.1%

      \[\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. Taylor expanded in t around inf 84.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{-86}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-116}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+20} \lor \neg \left(t \leq 1.95 \cdot 10^{+174}\right) \land t \leq 2.2 \cdot 10^{+239}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 47.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{y \cdot t}\\ \mathbf{if}\;t \leq -4.1 \cdot 10^{-86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-116}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+173}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+239}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* y t))))
   (if (<= t -4.1e-86)
     t_1
     (if (<= t 4.1e-116)
       (/ x (* y (- z)))
       (if (<= t 2.05e+20)
         t_1
         (if (<= t 4.1e+173)
           (/ x (* z (- t)))
           (if (<= t 1.85e+239) t_1 (/ (/ x (- t)) z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (y * t);
	double tmp;
	if (t <= -4.1e-86) {
		tmp = t_1;
	} else if (t <= 4.1e-116) {
		tmp = x / (y * -z);
	} else if (t <= 2.05e+20) {
		tmp = t_1;
	} else if (t <= 4.1e+173) {
		tmp = x / (z * -t);
	} else if (t <= 1.85e+239) {
		tmp = t_1;
	} else {
		tmp = (x / -t) / z;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (y * t)
    if (t <= (-4.1d-86)) then
        tmp = t_1
    else if (t <= 4.1d-116) then
        tmp = x / (y * -z)
    else if (t <= 2.05d+20) then
        tmp = t_1
    else if (t <= 4.1d+173) then
        tmp = x / (z * -t)
    else if (t <= 1.85d+239) then
        tmp = t_1
    else
        tmp = (x / -t) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (y * t);
	double tmp;
	if (t <= -4.1e-86) {
		tmp = t_1;
	} else if (t <= 4.1e-116) {
		tmp = x / (y * -z);
	} else if (t <= 2.05e+20) {
		tmp = t_1;
	} else if (t <= 4.1e+173) {
		tmp = x / (z * -t);
	} else if (t <= 1.85e+239) {
		tmp = t_1;
	} else {
		tmp = (x / -t) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (y * t)
	tmp = 0
	if t <= -4.1e-86:
		tmp = t_1
	elif t <= 4.1e-116:
		tmp = x / (y * -z)
	elif t <= 2.05e+20:
		tmp = t_1
	elif t <= 4.1e+173:
		tmp = x / (z * -t)
	elif t <= 1.85e+239:
		tmp = t_1
	else:
		tmp = (x / -t) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(y * t))
	tmp = 0.0
	if (t <= -4.1e-86)
		tmp = t_1;
	elseif (t <= 4.1e-116)
		tmp = Float64(x / Float64(y * Float64(-z)));
	elseif (t <= 2.05e+20)
		tmp = t_1;
	elseif (t <= 4.1e+173)
		tmp = Float64(x / Float64(z * Float64(-t)));
	elseif (t <= 1.85e+239)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / Float64(-t)) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (y * t);
	tmp = 0.0;
	if (t <= -4.1e-86)
		tmp = t_1;
	elseif (t <= 4.1e-116)
		tmp = x / (y * -z);
	elseif (t <= 2.05e+20)
		tmp = t_1;
	elseif (t <= 4.1e+173)
		tmp = x / (z * -t);
	elseif (t <= 1.85e+239)
		tmp = t_1;
	else
		tmp = (x / -t) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.1e-86], t$95$1, If[LessEqual[t, 4.1e-116], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e+20], t$95$1, If[LessEqual[t, 4.1e+173], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+239], t$95$1, N[(N[(x / (-t)), $MachinePrecision] / z), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot t}\\
\mathbf{if}\;t \leq -4.1 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.85 \cdot 10^{+239}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.09999999999999979e-86 or 4.0999999999999999e-116 < t < 2.05e20 or 4.09999999999999976e173 < t < 1.84999999999999999e239

    1. Initial program 88.2%

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

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

    if -4.09999999999999979e-86 < t < 4.0999999999999999e-116

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

    if 2.05e20 < t < 4.09999999999999976e173

    1. Initial program 88.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 inf 83.8%

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

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

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

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

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

    if 1.84999999999999999e239 < t

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{-86}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-116}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+173}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+239}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{y \cdot t}\\ \mathbf{if}\;t \leq -6.1 \cdot 10^{-86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-116}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+239}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* y t))))
   (if (<= t -6.1e-86)
     t_1
     (if (<= t 3.5e-116)
       (/ (/ x (- z)) y)
       (if (<= t 6.2e+19)
         t_1
         (if (<= t 1.1e+174)
           (/ x (* z (- t)))
           (if (<= t 3.3e+239) t_1 (/ (/ x (- t)) z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (y * t);
	double tmp;
	if (t <= -6.1e-86) {
		tmp = t_1;
	} else if (t <= 3.5e-116) {
		tmp = (x / -z) / y;
	} else if (t <= 6.2e+19) {
		tmp = t_1;
	} else if (t <= 1.1e+174) {
		tmp = x / (z * -t);
	} else if (t <= 3.3e+239) {
		tmp = t_1;
	} else {
		tmp = (x / -t) / z;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (y * t)
    if (t <= (-6.1d-86)) then
        tmp = t_1
    else if (t <= 3.5d-116) then
        tmp = (x / -z) / y
    else if (t <= 6.2d+19) then
        tmp = t_1
    else if (t <= 1.1d+174) then
        tmp = x / (z * -t)
    else if (t <= 3.3d+239) then
        tmp = t_1
    else
        tmp = (x / -t) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (y * t);
	double tmp;
	if (t <= -6.1e-86) {
		tmp = t_1;
	} else if (t <= 3.5e-116) {
		tmp = (x / -z) / y;
	} else if (t <= 6.2e+19) {
		tmp = t_1;
	} else if (t <= 1.1e+174) {
		tmp = x / (z * -t);
	} else if (t <= 3.3e+239) {
		tmp = t_1;
	} else {
		tmp = (x / -t) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (y * t)
	tmp = 0
	if t <= -6.1e-86:
		tmp = t_1
	elif t <= 3.5e-116:
		tmp = (x / -z) / y
	elif t <= 6.2e+19:
		tmp = t_1
	elif t <= 1.1e+174:
		tmp = x / (z * -t)
	elif t <= 3.3e+239:
		tmp = t_1
	else:
		tmp = (x / -t) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(y * t))
	tmp = 0.0
	if (t <= -6.1e-86)
		tmp = t_1;
	elseif (t <= 3.5e-116)
		tmp = Float64(Float64(x / Float64(-z)) / y);
	elseif (t <= 6.2e+19)
		tmp = t_1;
	elseif (t <= 1.1e+174)
		tmp = Float64(x / Float64(z * Float64(-t)));
	elseif (t <= 3.3e+239)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / Float64(-t)) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (y * t);
	tmp = 0.0;
	if (t <= -6.1e-86)
		tmp = t_1;
	elseif (t <= 3.5e-116)
		tmp = (x / -z) / y;
	elseif (t <= 6.2e+19)
		tmp = t_1;
	elseif (t <= 1.1e+174)
		tmp = x / (z * -t);
	elseif (t <= 3.3e+239)
		tmp = t_1;
	else
		tmp = (x / -t) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.1e-86], t$95$1, If[LessEqual[t, 3.5e-116], N[(N[(x / (-z)), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 6.2e+19], t$95$1, If[LessEqual[t, 1.1e+174], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+239], t$95$1, N[(N[(x / (-t)), $MachinePrecision] / z), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot t}\\
\mathbf{if}\;t \leq -6.1 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3.3 \cdot 10^{+239}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.10000000000000032e-86 or 3.49999999999999984e-116 < t < 6.2e19 or 1.1000000000000001e174 < t < 3.2999999999999998e239

    1. Initial program 88.2%

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

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

    if -6.10000000000000032e-86 < t < 3.49999999999999984e-116

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.2e19 < t < 1.1000000000000001e174

    1. Initial program 88.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 inf 83.8%

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

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

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

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

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

    if 3.2999999999999998e239 < t

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.1 \cdot 10^{-86}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-116}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+19}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+239}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq -2.8 \cdot 10^{-24}:\\
\;\;\;\;t\_1 \cdot \frac{-1}{z}\\

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

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

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


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

    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. add-sqr-sqrt42.1%

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

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

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

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

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

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

    if -0.00169999999999999991 < y < -2.8000000000000002e-24

    1. Initial program 80.7%

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

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

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

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

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

    if -2.8000000000000002e-24 < y < -8.4999999999999994e-84

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999994e-84 < y < 6.4999999999999998e-188

    1. Initial program 91.9%

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

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

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

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

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

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

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

    if 6.4999999999999998e-188 < y

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0017:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-24}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{-1}{z}\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-84}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-188}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{t}{x} \cdot \left(z - y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z - t}\\ \mathbf{if}\;y \leq -8.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-84}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-170}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x z) (- z t))))
   (if (<= y -8.2e-6)
     (/ (/ x y) (- t z))
     (if (<= y -2.6e-24)
       t_1
       (if (<= y -2.9e-84)
         (/ (/ x (- y z)) t)
         (if (<= y 6.2e-170) t_1 (/ (/ x t) (- y z))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / (z - t);
	double tmp;
	if (y <= -8.2e-6) {
		tmp = (x / y) / (t - z);
	} else if (y <= -2.6e-24) {
		tmp = t_1;
	} else if (y <= -2.9e-84) {
		tmp = (x / (y - z)) / t;
	} else if (y <= 6.2e-170) {
		tmp = t_1;
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x / z) / (z - t)
    if (y <= (-8.2d-6)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-2.6d-24)) then
        tmp = t_1
    else if (y <= (-2.9d-84)) then
        tmp = (x / (y - z)) / t
    else if (y <= 6.2d-170) then
        tmp = t_1
    else
        tmp = (x / t) / (y - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / (z - t);
	double tmp;
	if (y <= -8.2e-6) {
		tmp = (x / y) / (t - z);
	} else if (y <= -2.6e-24) {
		tmp = t_1;
	} else if (y <= -2.9e-84) {
		tmp = (x / (y - z)) / t;
	} else if (y <= 6.2e-170) {
		tmp = t_1;
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / z) / (z - t)
	tmp = 0
	if y <= -8.2e-6:
		tmp = (x / y) / (t - z)
	elif y <= -2.6e-24:
		tmp = t_1
	elif y <= -2.9e-84:
		tmp = (x / (y - z)) / t
	elif y <= 6.2e-170:
		tmp = t_1
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / Float64(z - t))
	tmp = 0.0
	if (y <= -8.2e-6)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -2.6e-24)
		tmp = t_1;
	elseif (y <= -2.9e-84)
		tmp = Float64(Float64(x / Float64(y - z)) / t);
	elseif (y <= 6.2e-170)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) / (z - t);
	tmp = 0.0;
	if (y <= -8.2e-6)
		tmp = (x / y) / (t - z);
	elseif (y <= -2.6e-24)
		tmp = t_1;
	elseif (y <= -2.9e-84)
		tmp = (x / (y - z)) / t;
	elseif (y <= 6.2e-170)
		tmp = t_1;
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.2e-6], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.6e-24], t$95$1, If[LessEqual[y, -2.9e-84], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 6.2e-170], t$95$1, N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-170}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.1999999999999994e-6

    1. Initial program 84.9%

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

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

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

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

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

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

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

    if -8.1999999999999994e-6 < y < -2.6e-24 or -2.90000000000000019e-84 < y < 6.19999999999999971e-170

    1. Initial program 91.4%

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

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

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

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

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

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

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

    if -2.6e-24 < y < -2.90000000000000019e-84

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.19999999999999971e-170 < y

    1. Initial program 84.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-84}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-170}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 73.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-24}:\\
\;\;\;\;t\_1 \cdot \frac{-1}{z}\\

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

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

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


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

    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. add-sqr-sqrt42.1%

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

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

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

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

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

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

    if -0.00279999999999999997 < y < -4.4999999999999997e-24

    1. Initial program 80.7%

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

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

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

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

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

    if -4.4999999999999997e-24 < y < -7.89999999999999991e-84

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.89999999999999991e-84 < y < 7.4999999999999998e-170

    1. Initial program 92.2%

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

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

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

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

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

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

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

    if 7.4999999999999998e-170 < y

    1. Initial program 84.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0028:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-24}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{-1}{z}\\ \mathbf{elif}\;y \leq -7.9 \cdot 10^{-84}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-170}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -5.5 \cdot 10^{-235} \lor \neg \left(y \leq 1.45 \cdot 10^{-304}\right):\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\

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


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

    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. add-sqr-sqrt45.3%

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

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

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

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

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

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

    if -5.99999999999999981e-50 < y < -5.4999999999999998e-235 or 1.45e-304 < y

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e-235 < y < 1.45e-304

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{t - z} \]
      6. *-un-lft-identity28.7%

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

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

        \[\leadsto 1 \cdot \frac{x}{\color{blue}{\left(t + \left(-z\right)\right)} \cdot z} \]
      9. add-sqr-sqrt19.0%

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{x}{\left(t + z\right) \cdot z}} \]
    11. Step-by-step derivation
      1. *-lft-identity51.6%

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + t\right)}} \]
    12. Simplified51.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{-50}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-235} \lor \neg \left(y \leq 1.45 \cdot 10^{-304}\right):\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(z + t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 52.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+72}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\

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


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

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.04999999999999996e127 < z < -2e12

    1. Initial program 88.0%

      \[\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 inf 48.5%

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

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

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

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

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

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

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

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

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

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

    if -2e12 < z < 3.80000000000000006e72

    1. Initial program 93.9%

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

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

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

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

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

    if 3.80000000000000006e72 < z

    1. Initial program 74.5%

      \[\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 35.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+127}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;z \leq -2000000000000:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+72}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 52.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.55 \cdot 10^{+72}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\

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


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

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000002e122 < z < -2.9e13

    1. Initial program 88.0%

      \[\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 inf 48.5%

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

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

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

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

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

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

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

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

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

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

    if -2.9e13 < z < 2.54999999999999989e72

    1. Initial program 93.9%

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

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

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

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

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

    if 2.54999999999999989e72 < z

    1. Initial program 74.5%

      \[\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 35.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+122}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;z \leq -29000000000000:\\ \;\;\;\;\frac{\frac{x}{-t}}{z}\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+72}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{t \cdot \frac{z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.5% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 90.2%

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

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

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

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

    if 2.69999999999999982e-196 < t < 1.22e-110

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \frac{x}{\left(t + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot z} \]
      11. sqr-neg52.2%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{x}{\left(t + z\right) \cdot z}} \]
    11. Step-by-step derivation
      1. *-lft-identity62.4%

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

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

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

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

    if 1.22e-110 < t < 3.3e207

    1. Initial program 85.8%

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

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

    if 3.3e207 < t

    1. Initial program 79.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.7 \cdot 10^{-196}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-110}:\\ \;\;\;\;\frac{x}{z \cdot \left(z + t\right)}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+207}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 49.3% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{-z}} \]
    11. Step-by-step derivation
      1. div-inv46.9%

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

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

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

        \[\leadsto 1 \cdot \frac{\color{blue}{\frac{x}{-z}}}{y} \]
      5. add-sqr-sqrt53.8%

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{z}}{y}} \]
    13. Step-by-step derivation
      1. *-lft-identity53.9%

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

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified50.6%

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

    if -4.4000000000000002e181 < z < -2.3e8

    1. Initial program 89.1%

      \[\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 inf 45.3%

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

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

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

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

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

    if -2.3e8 < z < 7.09999999999999986e71

    1. Initial program 93.9%

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

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

    if 7.09999999999999986e71 < z

    1. Initial program 74.5%

      \[\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 35.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+181}:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{elif}\;z \leq -230000000:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{elif}\;z \leq 7.1 \cdot 10^{+71}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 93.6% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 79.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 0 99.4%

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

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

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

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

    if -2.8000000000000002e152 < z < 3.2000000000000001e93

    1. Initial program 92.8%

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

    if 3.2000000000000001e93 < 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-/r*99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+152}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+93}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{-1}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 93.6% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 79.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 0 99.4%

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

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

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

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

    if -1.05000000000000008e153 < z < 1.60000000000000007e94

    1. Initial program 92.8%

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

    if 1.60000000000000007e94 < z

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+153}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+94}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-1}{z}}{\frac{y - z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 66.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{-83} \lor \neg \left(t \leq 1.8 \cdot 10^{-118}\right):\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.2999999999999999e-83 or 1.8000000000000001e-118 < t

    1. Initial program 87.0%

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

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

    if -3.2999999999999999e-83 < t < 1.8000000000000001e-118

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{-83} \lor \neg \left(t \leq 1.8 \cdot 10^{-118}\right):\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 69.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.3 \cdot 10^{+119} \lor \neg \left(z \leq 6.2 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z + t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.29999999999999972e119 or 6.1999999999999998e79 < z

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{t - z} \]
      6. *-un-lft-identity65.3%

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

        \[\leadsto 1 \cdot \color{blue}{\frac{x}{\left(t - z\right) \cdot z}} \]
      8. sub-neg66.7%

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

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

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

        \[\leadsto 1 \cdot \frac{x}{\left(t + \sqrt{\color{blue}{z \cdot z}}\right) \cdot z} \]
      12. sqrt-unprod39.7%

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{x}{\left(t + z\right) \cdot z}} \]
    11. Step-by-step derivation
      1. *-lft-identity76.6%

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

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

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

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

    if -5.29999999999999972e119 < z < 6.1999999999999998e79

    1. Initial program 92.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+119} \lor \neg \left(z \leq 6.2 \cdot 10^{+79}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 62.6% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 90.2%

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

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

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

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

    if 1.29999999999999988e-203 < t < 9.2e-111

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \frac{x}{\left(t + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot z} \]
      11. sqr-neg52.2%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{x}{\left(t + z\right) \cdot z}} \]
    11. Step-by-step derivation
      1. *-lft-identity62.4%

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

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

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

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

    if 9.2e-111 < t

    1. Initial program 84.6%

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

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

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

Alternative 19: 63.8% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq 1.24 \cdot 10^{-110}:\\
\;\;\;\;\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 3 regimes
  2. if t < 2.9999999999999999e-207

    1. Initial program 90.2%

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

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

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

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

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

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

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

    if 2.9999999999999999e-207 < t < 1.24000000000000006e-110

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \frac{x}{\left(t + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot z} \]
      11. sqr-neg52.2%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{x}{\left(t + z\right) \cdot z}} \]
    11. Step-by-step derivation
      1. *-lft-identity62.4%

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

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

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

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

    if 1.24000000000000006e-110 < t

    1. Initial program 84.6%

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

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

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

      \[\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}\;t \leq 3 \cdot 10^{-207}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 1.24 \cdot 10^{-110}:\\ \;\;\;\;\frac{x}{z \cdot \left(z + t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 72.4% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 85.1%

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

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

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

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

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

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

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

    if -1.1500000000000001e-60 < y < 8.5000000000000003e-247

    1. Initial program 94.2%

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

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

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

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

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

    if 8.5000000000000003e-247 < y

    1. Initial program 85.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
      5. clear-num95.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-60}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-247}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 47.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+105} \lor \neg \left(z \leq 2 \cdot 10^{+100}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6000000000000002e105 or 2.00000000000000003e100 < z

    1. Initial program 77.9%

      \[\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 inf 37.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000002e105 < z < 2.00000000000000003e100

    1. Initial program 92.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+105} \lor \neg \left(z \leq 2 \cdot 10^{+100}\right):\\ \;\;\;\;\frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 49.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+105} \lor \neg \left(z \leq 1.35 \cdot 10^{+72}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.74999999999999996e105 or 1.35e72 < 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 36.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{t} \]
    12. Simplified39.5%

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

    if -1.74999999999999996e105 < z < 1.35e72

    1. Initial program 93.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+105} \lor \neg \left(z \leq 1.35 \cdot 10^{+72}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 47.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{-z}} \]
    11. Step-by-step derivation
      1. div-inv47.6%

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{x \cdot \frac{1}{-z}}{y}} \]
      4. div-inv57.0%

        \[\leadsto 1 \cdot \frac{\color{blue}{\frac{x}{-z}}}{y} \]
      5. add-sqr-sqrt57.0%

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

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

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

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

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

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

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

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

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

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

    if -2.7500000000000002e118 < z < 2.9e100

    1. Initial program 92.1%

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

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

    if 2.9e100 < z

    1. Initial program 71.8%

      \[\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 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{+118}:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+100}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 97.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 25: 40.2% accurate, 1.8× speedup?

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

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

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

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

    \[\leadsto \frac{x}{y \cdot t} \]
  5. Add Preprocessing

Developer target: 88.2% 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 2024077 
(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))))