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

Percentage Accurate: 99.2% → 99.2%
Time: 11.4s
Alternatives: 13
Speedup: 1.0×

Specification

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

\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\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 13 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: 99.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.2% accurate, 1.0× speedup?

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

\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}
Derivation
  1. Initial program 99.2%

    \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
  2. Final simplification99.2%

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

Alternative 2: 77.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -5.1 \cdot 10^{-291}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
      5. associate-*r/100.0%

        \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
      6. metadata-eval100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
      7. times-frac100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
      8. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      9. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      10. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
      11. sub-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{y - t} \]
      12. +-commutative100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
      13. distribute-neg-out100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
      14. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
      15. sub-neg100.0%

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

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

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

    if -2.3200000000000001e-150 < z < -5.1e-291

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1e-291 < z < 3.24999999999999994e-124

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{\frac{\color{blue}{-x}}{t}}{y} \]
    11. Simplified68.0%

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

    if 3.24999999999999994e-124 < z

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 - \color{blue}{{\left(\frac{y - z}{\frac{x}{y - t}}\right)}^{-1}} \]
      4. div-inv98.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.32 \cdot 10^{-150}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-291}:\\ \;\;\;\;1 - \frac{\frac{x}{y}}{y}\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{-124}:\\ \;\;\;\;1 + \frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{z \cdot \frac{t}{x}}\\ \end{array} \]

Alternative 3: 77.9% accurate, 0.7× speedup?

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

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
      5. associate-*r/100.0%

        \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
      6. metadata-eval100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
      7. times-frac100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
      8. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      9. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      10. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
      11. sub-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{y - t} \]
      12. +-commutative100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
      13. distribute-neg-out100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
      14. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
      15. sub-neg100.0%

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

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

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

    if -1.5999999999999999e-150 < z < -2.9000000000000001e-294

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 - \frac{1}{\color{blue}{\frac{{y}^{2}}{x}}} \]
    7. Step-by-step derivation
      1. unpow267.7%

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

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

    if -2.9000000000000001e-294 < z < 3.4000000000000001e-124

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4000000000000001e-124 < z

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 - \color{blue}{{\left(\frac{y - z}{\frac{x}{y - t}}\right)}^{-1}} \]
      4. div-inv98.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-150}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-294}:\\ \;\;\;\;1 + \frac{-1}{\frac{y \cdot y}{x}}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-124}:\\ \;\;\;\;1 + \frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{z \cdot \frac{t}{x}}\\ \end{array} \]

Alternative 4: 77.6% accurate, 0.7× speedup?

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

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
      5. associate-*r/99.9%

        \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
      6. metadata-eval99.9%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
      7. times-frac99.9%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
      8. neg-mul-199.9%

        \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      9. remove-double-neg99.9%

        \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      10. neg-mul-199.9%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
      11. sub-neg99.9%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{y - t} \]
      12. +-commutative99.9%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
      13. distribute-neg-out99.9%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
      14. remove-double-neg99.9%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
      15. sub-neg99.9%

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

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

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

    if -6.20000000000000032e-65 < z < -4.9000000000000001e-290

    1. Initial program 100.0%

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

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

    if -4.9000000000000001e-290 < z < 1.64999999999999992e-124

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{\frac{\color{blue}{-x}}{t}}{y} \]
    11. Simplified68.0%

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

    if 1.64999999999999992e-124 < z

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 - \color{blue}{{\left(\frac{y - z}{\frac{x}{y - t}}\right)}^{-1}} \]
      4. div-inv98.7%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -5 \cdot 10^{-290}:\\
\;\;\;\;1 - \frac{\frac{x}{y}}{y}\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
      5. associate-*r/100.0%

        \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
      6. metadata-eval100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
      7. times-frac100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
      8. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      9. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      10. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
      11. sub-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{y - t} \]
      12. +-commutative100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
      13. distribute-neg-out100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
      14. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
      15. sub-neg100.0%

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

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

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

    if -1.7499999999999999e-150 < z < -5.0000000000000001e-290

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e-290 < z < 3.4000000000000001e-124

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 - \frac{\frac{\color{blue}{-x}}{t}}{y} \]
    11. Simplified68.0%

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

    if 3.4000000000000001e-124 < z

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 - \color{blue}{{\left(\frac{y - z}{\frac{x}{y - t}}\right)}^{-1}} \]
      4. div-inv98.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{-150}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-290}:\\ \;\;\;\;1 - \frac{\frac{x}{y}}{y}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-124}:\\ \;\;\;\;1 + \frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{\frac{x}{t}}{z}\\ \end{array} \]

Alternative 6: 84.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
      5. associate-*r/100.0%

        \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
      6. metadata-eval100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
      7. times-frac100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
      8. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      9. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      10. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
      11. sub-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{y - t} \]
      12. +-commutative100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
      13. distribute-neg-out100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
      14. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
      15. sub-neg100.0%

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

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

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

    if -2.89999999999999983e-90 < z < 3.4000000000000001e-124

    1. Initial program 97.5%

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

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

    if 3.4000000000000001e-124 < z

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 - \color{blue}{{\left(\frac{y - z}{\frac{x}{y - t}}\right)}^{-1}} \]
      4. div-inv98.7%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 84.4% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
      5. associate-*r/100.0%

        \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
      6. metadata-eval100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
      7. times-frac100.0%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
      8. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      9. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      10. neg-mul-1100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
      11. sub-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{y - t} \]
      12. +-commutative100.0%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
      13. distribute-neg-out100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
      14. remove-double-neg100.0%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
      15. sub-neg100.0%

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

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

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

    if -1.15e-94 < z < 3.6999999999999999e-125

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.6999999999999999e-125 < z

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 - \color{blue}{{\left(\frac{y - z}{\frac{x}{y - t}}\right)}^{-1}} \]
      4. div-inv98.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-94}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-125}:\\ \;\;\;\;1 - \frac{\frac{x}{y - t}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{z \cdot \frac{t}{x}}\\ \end{array} \]

Alternative 8: 86.7% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 98.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Step-by-step derivation
      1. sub-neg98.9%

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

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

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

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

        \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
      6. metadata-eval95.8%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
      7. times-frac95.8%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
      8. neg-mul-195.8%

        \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      9. remove-double-neg95.8%

        \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      10. neg-mul-195.8%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
      11. sub-neg95.8%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{y - t} \]
      12. +-commutative95.8%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
      13. distribute-neg-out95.8%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
      14. remove-double-neg95.8%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
      15. sub-neg95.8%

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

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

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

    if -1.2e-191 < t < 1.12000000000000002e-63

    1. Initial program 98.7%

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

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

    if 1.12000000000000002e-63 < t

    1. Initial program 99.9%

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

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

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

        \[\leadsto 1 - \left(-\color{blue}{\frac{\frac{x}{t}}{y - z}}\right) \]
      3. distribute-neg-frac98.8%

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

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

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

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

Alternative 9: 71.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-75} \lor \neg \left(t \leq 8 \cdot 10^{-43}\right):\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.6e-75 or 8.00000000000000062e-43 < t

    1. Initial program 99.9%

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

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

    if -4.6e-75 < t < 8.00000000000000062e-43

    1. Initial program 98.2%

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

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

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

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

        \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
      5. associate-*r/99.9%

        \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
      6. metadata-eval99.9%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
      7. times-frac99.9%

        \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
      8. neg-mul-199.9%

        \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      9. remove-double-neg99.9%

        \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
      10. neg-mul-199.9%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
      11. sub-neg99.9%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{y - t} \]
      12. +-commutative99.9%

        \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
      13. distribute-neg-out99.9%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
      14. remove-double-neg99.9%

        \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
      15. sub-neg99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{-75} \lor \neg \left(t \leq 8 \cdot 10^{-43}\right):\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{x}{y \cdot z}\\ \end{array} \]

Alternative 10: 83.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-54} \lor \neg \left(y \leq 9.6 \cdot 10^{-29}\right):\\
\;\;\;\;1 - \frac{x}{y \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.49999999999999982e-54 or 9.59999999999999968e-29 < y

    1. Initial program 99.9%

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

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

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

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

    if -3.49999999999999982e-54 < y < 9.59999999999999968e-29

    1. Initial program 98.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{-54} \lor \neg \left(y \leq 9.6 \cdot 10^{-29}\right):\\ \;\;\;\;1 - \frac{x}{y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \end{array} \]

Alternative 11: 83.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-53}:\\
\;\;\;\;1 - \frac{x}{y \cdot y}\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

    if -3.2000000000000001e-53 < y < 1.8500000000000001e-28

    1. Initial program 98.2%

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

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

    if 1.8500000000000001e-28 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{-53}:\\ \;\;\;\;1 - \frac{x}{y \cdot y}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-28}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{\frac{x}{y}}{y}\\ \end{array} \]

Alternative 12: 98.6% accurate, 1.0× speedup?

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

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

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

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

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

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

      \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
    5. associate-*r/97.7%

      \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
    6. metadata-eval97.7%

      \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
    7. times-frac97.7%

      \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
    8. neg-mul-197.7%

      \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
    9. remove-double-neg97.7%

      \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
    10. neg-mul-197.7%

      \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
    11. sub-neg97.7%

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

      \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
    13. distribute-neg-out97.7%

      \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
    14. remove-double-neg97.7%

      \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
    15. sub-neg97.7%

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

    \[\leadsto \color{blue}{1 + \frac{\frac{x}{z - y}}{y - t}} \]
  4. Final simplification97.7%

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

Alternative 13: 57.9% accurate, 1.6× speedup?

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

\\
1 + \frac{x}{y \cdot z}
\end{array}
Derivation
  1. Initial program 99.2%

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

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

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

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

      \[\leadsto 1 + 1 \cdot \color{blue}{\frac{\frac{-x}{y - z}}{y - t}} \]
    5. associate-*r/97.7%

      \[\leadsto 1 + \color{blue}{\frac{1 \cdot \frac{-x}{y - z}}{y - t}} \]
    6. metadata-eval97.7%

      \[\leadsto 1 + \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{-x}{y - z}}{y - t} \]
    7. times-frac97.7%

      \[\leadsto 1 + \frac{\color{blue}{\frac{-1 \cdot \left(-x\right)}{-1 \cdot \left(y - z\right)}}}{y - t} \]
    8. neg-mul-197.7%

      \[\leadsto 1 + \frac{\frac{\color{blue}{-\left(-x\right)}}{-1 \cdot \left(y - z\right)}}{y - t} \]
    9. remove-double-neg97.7%

      \[\leadsto 1 + \frac{\frac{\color{blue}{x}}{-1 \cdot \left(y - z\right)}}{y - t} \]
    10. neg-mul-197.7%

      \[\leadsto 1 + \frac{\frac{x}{\color{blue}{-\left(y - z\right)}}}{y - t} \]
    11. sub-neg97.7%

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

      \[\leadsto 1 + \frac{\frac{x}{-\color{blue}{\left(\left(-z\right) + y\right)}}}{y - t} \]
    13. distribute-neg-out97.7%

      \[\leadsto 1 + \frac{\frac{x}{\color{blue}{\left(-\left(-z\right)\right) + \left(-y\right)}}}{y - t} \]
    14. remove-double-neg97.7%

      \[\leadsto 1 + \frac{\frac{x}{\color{blue}{z} + \left(-y\right)}}{y - t} \]
    15. sub-neg97.7%

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

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

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

    \[\leadsto 1 + \color{blue}{\frac{x}{y \cdot z}} \]
  6. Final simplification59.0%

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

Reproduce

?
herbie shell --seed 2023274 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A"
  :precision binary64
  (- 1.0 (/ x (* (- y z) (- y t)))))