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

Percentage Accurate: 89.2% → 96.8%
Time: 12.3s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 89.2% accurate, 1.0× speedup?

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

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

Alternative 1: 96.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 2: 93.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{x}{t\_1}\\

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


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

    1. Initial program 62.3%

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 5e302

    1. Initial program 98.5%

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

    if 5e302 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

Alternative 3: 48.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.25000000000000011e-115 or 1.1e-23 < z < 2.45000000000000008e125

    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.0%

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

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

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

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

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

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

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

    if -2.25000000000000011e-115 < z < 1.1e-23

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified73.5%

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

    if 2.45000000000000008e125 < z

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\frac{1}{z}}{y - z}} \]
      3. add-sqr-sqrt23.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y - z} \cdot 1} \]
      6. *-rgt-identity64.2%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      7. associate-/r*64.9%

        \[\leadsto \color{blue}{\frac{x}{z \cdot \left(y - z\right)}} \]
    11. Simplified64.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-115}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+125}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 50.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-41}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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

\mathbf{elif}\;t \leq 3 \cdot 10^{+130}:\\
\;\;\;\;\frac{x}{y \cdot t}\\

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


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

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified56.5%

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

    if -4.20000000000000025e-41 < t < 1.02e-18

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

    if 1.02e-18 < t < 2.9999999999999999e130

    1. Initial program 96.4%

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

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

    if 2.9999999999999999e130 < t

    1. Initial program 73.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 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{-41}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-18}:\\ \;\;\;\;\frac{\frac{x}{y}}{-z}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+130}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+121} \lor \neg \left(z \leq 1.4 \cdot 10^{+122}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(y - z\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 < -2.8999999999999999e121 or 1.4e122 < z

    1. Initial program 71.3%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y - z} \]
    8. Step-by-step derivation
      1. div-inv88.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 1}{z \cdot \left(y - z\right)}} \]
      3. times-frac64.6%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y - z} \cdot 1} \]
      6. *-rgt-identity64.6%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      7. associate-/r*65.1%

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

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

    if -2.8999999999999999e121 < z < 1.4e122

    1. Initial program 95.1%

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

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

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

Alternative 6: 50.1% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000003e-115 < z < 4.1999999999999999e-24

    1. Initial program 93.5%

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

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

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

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

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

    if 4.1999999999999999e-24 < z

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 50.4% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot 1}{z \cdot \frac{t}{x}}} \]
      3. metadata-eval42.9%

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

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

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

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

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

    if -1.1e-115 < z < 4.1999999999999999e-24

    1. Initial program 93.5%

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

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

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

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

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

    if 4.1999999999999999e-24 < z

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-115}:\\ \;\;\;\;\frac{-1}{t \cdot \frac{z}{x}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-24}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{-z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.1% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 89.7%

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

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

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

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

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

    if -6.00000000000000037e-140 < t < 3.7e-137

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

    if 3.7e-137 < t

    1. Initial program 84.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{-140}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-137}:\\ \;\;\;\;\frac{\frac{x}{y}}{-z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 71.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq 10^{-60}:\\
\;\;\;\;\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 y < -2.4e-88

    1. Initial program 87.0%

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

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

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

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

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

    if -2.4e-88 < y < 9.9999999999999997e-61

    1. Initial program 91.2%

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

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

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

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

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

    if 9.9999999999999997e-61 < y

    1. Initial program 85.6%

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

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

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

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

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

Alternative 10: 73.7% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 87.0%

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

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

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

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

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

    if -2.50000000000000004e-88 < y < 2.4e13

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

    if 2.4e13 < y

    1. Initial program 87.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{-88}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq 24000000000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 74.0% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 89.5%

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

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

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

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

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

    if -1.6e-115 < t < 6.19999999999999986e32

    1. Initial program 89.8%

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

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

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

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

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

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

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

    if 6.19999999999999986e32 < t

    1. Initial program 81.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-115}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+32}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 48.7% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

    if -5.0000000000000003e-115 < z < 4.6000000000000002e-24

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified73.2%

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

    if 4.6000000000000002e-24 < z

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 48.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

    if -7.49999999999999978e-118 < z < 5.4999999999999999e-24

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified73.2%

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

    if 5.4999999999999999e-24 < z

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 50.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-115}:\\
\;\;\;\;\frac{\frac{x}{-z}}{t}\\

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

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


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

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3999999999999999e-115 < z < 3.80000000000000026e-24

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified73.2%

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

    if 3.80000000000000026e-24 < z

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-115}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{-z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 45.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+121} \lor \neg \left(z \leq 1.9 \cdot 10^{+75}\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 -3.6e+121) (not (<= z 1.9e+75))) (/ x (* z t)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.6e+121) || !(z <= 1.9e+75)) {
		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 <= (-3.6d+121)) .or. (.not. (z <= 1.9d+75))) 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 <= -3.6e+121) || !(z <= 1.9e+75)) {
		tmp = x / (z * t);
	} else {
		tmp = x / (y * t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.6e+121) or not (z <= 1.9e+75):
		tmp = x / (z * t)
	else:
		tmp = x / (y * t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.6e+121) || !(z <= 1.9e+75))
		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 <= -3.6e+121) || ~((z <= 1.9e+75)))
		tmp = x / (z * t);
	else
		tmp = x / (y * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.6e+121], N[Not[LessEqual[z, 1.9e+75]], $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 -3.6 \cdot 10^{+121} \lor \neg \left(z \leq 1.9 \cdot 10^{+75}\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 < -3.59999999999999981e121 or 1.9000000000000001e75 < z

    1. Initial program 75.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 47.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.59999999999999981e121 < z < 1.9000000000000001e75

    1. Initial program 94.7%

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

      \[\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 -3.6 \cdot 10^{+121} \lor \neg \left(z \leq 1.9 \cdot 10^{+75}\right):\\ \;\;\;\;\frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 45.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 70.3%

      \[\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.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{1 \cdot \frac{x}{t \cdot z}} \]
      7. *-commutative40.0%

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

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

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

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

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

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

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

    if -1.55999999999999993e122 < z < 5.2e29

    1. Initial program 95.0%

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

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

    if 5.2e29 < z

    1. Initial program 81.2%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y - z} \]
    8. Step-by-step derivation
      1. div-inv86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      7. associate-/r*51.7%

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

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

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

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

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

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

Alternative 17: 48.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 70.3%

      \[\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.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{1 \cdot \frac{x}{t \cdot z}} \]
      7. *-commutative40.0%

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

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

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

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

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

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

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

    if -3.5e121 < z < 6.5e30

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5e30 < z

    1. Initial program 81.2%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y - z} \]
    8. Step-by-step derivation
      1. div-inv86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      7. associate-/r*51.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+121}:\\ \;\;\;\;\frac{x}{z \cdot t}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+30}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 63.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3e-90

    1. Initial program 87.3%

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

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

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

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

    if -1.3e-90 < y

    1. Initial program 88.6%

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

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

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

Alternative 19: 64.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.19999999999999979e-29

    1. Initial program 89.0%

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

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

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

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

    if 4.19999999999999979e-29 < t

    1. Initial program 85.5%

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

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

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

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

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

Alternative 20: 64.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3e-90

    1. Initial program 87.3%

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

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

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

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

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

    if -1.3e-90 < y

    1. Initial program 88.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-90}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 97.1% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 22: 39.0% 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 88.2%

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

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

    \[\leadsto \frac{x}{y \cdot t} \]
  5. Add Preprocessing

Developer target: 88.1% 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 2024055 
(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))))