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

Percentage Accurate: 89.1% → 96.8%
Time: 11.2s
Alternatives: 21
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 21 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.1% 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 89.3%

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

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

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

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

Alternative 2: 64.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\left(y - z\right) \cdot t}\\ t_2 := \frac{x}{z \cdot \left(t - z\right)}\\ \mathbf{if}\;z \leq -2.25 \cdot 10^{+128}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{x}{y}}{-z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+130}:\\ \;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* (- y z) t))) (t_2 (/ x (* z (- t z)))))
   (if (<= z -2.25e+128)
     t_2
     (if (<= z 2.8e-75)
       t_1
       (if (<= z 2.2e+15)
         (/ (/ x y) (- z))
         (if (<= z 5.2e+104)
           t_1
           (if (<= z 1.6e+130) (* (/ -1.0 y) (/ x z)) t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / ((y - z) * t);
	double t_2 = x / (z * (t - z));
	double tmp;
	if (z <= -2.25e+128) {
		tmp = t_2;
	} else if (z <= 2.8e-75) {
		tmp = t_1;
	} else if (z <= 2.2e+15) {
		tmp = (x / y) / -z;
	} else if (z <= 5.2e+104) {
		tmp = t_1;
	} else if (z <= 1.6e+130) {
		tmp = (-1.0 / y) * (x / z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x / ((y - z) * t)
    t_2 = x / (z * (t - z))
    if (z <= (-2.25d+128)) then
        tmp = t_2
    else if (z <= 2.8d-75) then
        tmp = t_1
    else if (z <= 2.2d+15) then
        tmp = (x / y) / -z
    else if (z <= 5.2d+104) then
        tmp = t_1
    else if (z <= 1.6d+130) then
        tmp = ((-1.0d0) / y) * (x / z)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x / ((y - z) * t);
	double t_2 = x / (z * (t - z));
	double tmp;
	if (z <= -2.25e+128) {
		tmp = t_2;
	} else if (z <= 2.8e-75) {
		tmp = t_1;
	} else if (z <= 2.2e+15) {
		tmp = (x / y) / -z;
	} else if (z <= 5.2e+104) {
		tmp = t_1;
	} else if (z <= 1.6e+130) {
		tmp = (-1.0 / y) * (x / z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / ((y - z) * t)
	t_2 = x / (z * (t - z))
	tmp = 0
	if z <= -2.25e+128:
		tmp = t_2
	elif z <= 2.8e-75:
		tmp = t_1
	elif z <= 2.2e+15:
		tmp = (x / y) / -z
	elif z <= 5.2e+104:
		tmp = t_1
	elif z <= 1.6e+130:
		tmp = (-1.0 / y) * (x / z)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(Float64(y - z) * t))
	t_2 = Float64(x / Float64(z * Float64(t - z)))
	tmp = 0.0
	if (z <= -2.25e+128)
		tmp = t_2;
	elseif (z <= 2.8e-75)
		tmp = t_1;
	elseif (z <= 2.2e+15)
		tmp = Float64(Float64(x / y) / Float64(-z));
	elseif (z <= 5.2e+104)
		tmp = t_1;
	elseif (z <= 1.6e+130)
		tmp = Float64(Float64(-1.0 / y) * Float64(x / z));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / ((y - z) * t);
	t_2 = x / (z * (t - z));
	tmp = 0.0;
	if (z <= -2.25e+128)
		tmp = t_2;
	elseif (z <= 2.8e-75)
		tmp = t_1;
	elseif (z <= 2.2e+15)
		tmp = (x / y) / -z;
	elseif (z <= 5.2e+104)
		tmp = t_1;
	elseif (z <= 1.6e+130)
		tmp = (-1.0 / y) * (x / z);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e+128], t$95$2, If[LessEqual[z, 2.8e-75], t$95$1, If[LessEqual[z, 2.2e+15], N[(N[(x / y), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 5.2e+104], t$95$1, If[LessEqual[z, 1.6e+130], N[(N[(-1.0 / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
t_2 := \frac{x}{z \cdot \left(t - z\right)}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+128}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+130}:\\
\;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.2500000000000001e128 or 1.6e130 < z

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2500000000000001e128 < z < 2.79999999999999998e-75 or 2.2e15 < z < 5.20000000000000001e104

    1. Initial program 91.2%

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

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

    if 2.79999999999999998e-75 < z < 2.2e15

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000001e104 < z < 1.6e130

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+128}:\\ \;\;\;\;\frac{x}{z \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-75}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{x}{y}}{-z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+104}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+130}:\\ \;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(t - z\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 51.5% accurate, 0.3× speedup?

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

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

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

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

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

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


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

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.30000000000000008e106 < z < 4.5000000000000003e-75

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

    if 4.5000000000000003e-75 < z < 6.2e19

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

    if 6.2e19 < z < 1.05000000000000005e105

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if 1.05000000000000005e105 < z

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+106}:\\ \;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-75}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{x}{y}}{-z}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+105}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 51.5% accurate, 0.3× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.30000000000000008e106 or 5.20000000000000001e104 < z

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.30000000000000008e106 < z < 4.10000000000000002e-75

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

    if 4.10000000000000002e-75 < z < 2.1e18

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

    if 2.1e18 < z < 5.20000000000000001e104

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-75}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{\frac{x}{y}}{-z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+104}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 78.7% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.6000000000000001e-65 or 3.1e13 < z

    1. Initial program 86.0%

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

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

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

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

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

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

    if -5.6000000000000001e-65 < z < 8.4999999999999996e-142

    1. Initial program 91.9%

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

      \[\leadsto \color{blue}{\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. associate-/l/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. Step-by-step derivation
      1. clear-num95.8%

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

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

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

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

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

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

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

    if 8.4999999999999996e-142 < z < 3.1e13

    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/99.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{-65}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-142}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;z \leq 31000000000000:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 64.7% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 1}{z \cdot \left(t - z\right)}} \]
      2. *-rgt-identity86.7%

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

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

    if -2.2500000000000001e128 < z < 1.09999999999999999e-71

    1. Initial program 90.4%

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

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

    if 1.09999999999999999e-71 < z < 7.00000000000000003e38

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

    if 7.00000000000000003e38 < z

    1. Initial program 84.8%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y - z} \]
    8. Step-by-step derivation
      1. *-un-lft-identity91.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 48.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+19}:\\
\;\;\;\;\frac{\frac{x}{y}}{-z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.50000000000000008e-77 or 4.4e19 < z

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

    if -1.50000000000000008e-77 < z < 1.09999999999999999e-71

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

    if 1.09999999999999999e-71 < z < 4.4e19

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 48.2% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.7999999999999999e-77 or 5e19 < z

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

    if -3.7999999999999999e-77 < z < 1.74999999999999993e-75

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

    if 1.74999999999999993e-75 < z < 5e19

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-139} \lor \neg \left(t \leq 7.8 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15000000000000006e-139 or 7.79999999999999985e-88 < t

    1. Initial program 86.4%

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

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

    if -1.15000000000000006e-139 < t < 7.79999999999999985e-88

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 74.0% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 87.9%

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

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

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

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

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

    if -1.36000000000000003e-139 < t < 1.19999999999999996e-49

    1. Initial program 94.8%

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

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

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

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

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

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

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

    if 1.19999999999999996e-49 < t

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 72.7% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 87.5%

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

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

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

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

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

    if -1.34999999999999997e-118 < y < 1.29999999999999998e-161

    1. Initial program 88.1%

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

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

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

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

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

    if 1.29999999999999998e-161 < y

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 48.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-77} \lor \neg \left(z \leq 1.08 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{x}{t \cdot \left(-z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.39999999999999983e-77 or 1.08e-32 < z

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

    if -3.39999999999999983e-77 < z < 1.08e-32

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
    10. Simplified72.7%

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

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

Alternative 13: 48.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+107} \lor \neg \left(z \leq 3.35 \cdot 10^{+143}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.59999999999999969e107 or 3.3500000000000001e143 < z

    1. Initial program 83.2%

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y - z} \]
    8. Step-by-step derivation
      1. *-un-lft-identity93.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{z}}{y - z}} \]
    10. Step-by-step derivation
      1. *-lft-identity76.7%

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

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

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

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

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

    if -5.59999999999999969e107 < z < 3.3500000000000001e143

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{\sqrt{t \cdot t}}} \]
      6. sqr-neg33.0%

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

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

        \[\leadsto \frac{\frac{x}{y}}{\color{blue}{-t}} \]
      9. associate-/l/20.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{-t}}{y}} \]
      11. add-sqr-sqrt8.1%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}}{y} \]
      12. sqrt-unprod33.7%

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

        \[\leadsto \frac{\frac{x}{\sqrt{\color{blue}{t \cdot t}}}}{y} \]
      14. sqrt-unprod30.7%

        \[\leadsto \frac{\frac{x}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}}{y} \]
      15. add-sqr-sqrt57.5%

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

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

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

Alternative 14: 46.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{+25} \lor \neg \left(z \leq 4.7 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.6999999999999996e25 or 4.6999999999999997e98 < z

    1. Initial program 82.8%

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y - z} \]
    8. Step-by-step derivation
      1. *-un-lft-identity90.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6999999999999996e25 < z < 4.6999999999999997e98

    1. Initial program 93.1%

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

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

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

Alternative 15: 90.2% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 91.1%

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

    if 1.3500000000000001e151 < t

    1. Initial program 78.9%

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

      \[\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. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

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

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

Alternative 16: 67.1% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 87.2%

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

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

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

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

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

    if -5.7999999999999997e-103 < y

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 64.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 8.8 \cdot 10^{-88}:\\ \;\;\;\;\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 (<= t 8.8e-88) (/ (/ x y) (- t z)) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 8.8e-88) {
		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 <= 8.8d-88) 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 <= 8.8e-88) {
		tmp = (x / y) / (t - z);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 8.8e-88:
		tmp = (x / y) / (t - z)
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 8.8e-88)
		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 (t <= 8.8e-88)
		tmp = (x / y) / (t - z);
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, 8.8e-88], 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}\;t \leq 8.8 \cdot 10^{-88}:\\
\;\;\;\;\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 t < 8.8000000000000002e-88

    1. Initial program 91.5%

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

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

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

    if 8.8000000000000002e-88 < t

    1. Initial program 85.0%

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

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

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

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

Alternative 18: 63.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 8.8 \cdot 10^{-88}:\\ \;\;\;\;\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 8.8e-88) (/ x (* y (- t z))) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 8.8e-88) {
		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 <= 8.8d-88) 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 <= 8.8e-88) {
		tmp = x / (y * (t - z));
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= 8.8e-88:
		tmp = x / (y * (t - z))
	else:
		tmp = (x / t) / (y - z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 8.8e-88)
		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 <= 8.8e-88)
		tmp = x / (y * (t - z));
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, 8.8e-88], 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 8.8 \cdot 10^{-88}:\\
\;\;\;\;\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 < 8.8000000000000002e-88

    1. Initial program 91.5%

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

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

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

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

    if 8.8000000000000002e-88 < t

    1. Initial program 85.0%

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

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

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

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

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

Alternative 19: 63.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{-109}:\\ \;\;\;\;\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.8e-109) (/ x (* y (- t z))) (/ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.8e-109) {
		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.8d-109)) 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.8e-109) {
		tmp = x / (y * (t - z));
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.8e-109:
		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.8e-109)
		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.8e-109)
		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.8e-109], 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.8 \cdot 10^{-109}:\\
\;\;\;\;\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.8e-109

    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 80.1%

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

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

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

    if -1.8e-109 < y

    1. Initial program 90.3%

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

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

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

Alternative 20: 96.9% 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 89.3%

    \[\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. Add Preprocessing

Alternative 21: 40.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 89.3%

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

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

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

Developer target: 88.0% 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 2024085 
(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))))