Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C

Percentage Accurate: 94.5% → 96.0%
Time: 6.8s
Alternatives: 9
Speedup: 0.5×

Specification

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

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

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

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

Alternative 1: 96.0% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 5.0000000000000003e298

    1. Initial program 98.2%

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

    if 5.0000000000000003e298 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))

    1. Initial program 48.6%

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

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

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

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

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

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

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

Alternative 2: 42.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-15} \lor \neg \left(z \leq -1.55 \cdot 10^{-215} \lor \neg \left(z \leq 7.2 \cdot 10^{-269}\right) \land z \leq 35000\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.40000000000000007e-15 or -1.54999999999999997e-215 < z < 7.19999999999999996e-269 or 35000 < z

    1. Initial program 98.3%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-\left(-\left(y - -1 \cdot t\right)\right)\right)} \cdot x}{z} \]
      3. cancel-sign-sub-inv84.4%

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

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

        \[\leadsto \frac{\left(-\left(-\left(y + \color{blue}{t}\right)\right)\right) \cdot x}{z} \]
      6. distribute-neg-out84.4%

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

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

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

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

        \[\leadsto \frac{-\color{blue}{x \cdot \left(-1 \cdot y - t\right)}}{z} \]
      11. distribute-neg-frac84.4%

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in92.1%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{-1 \cdot y - t}{z}\right)} \]
      14. distribute-neg-frac92.1%

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

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

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

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

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

    if -1.40000000000000007e-15 < z < -1.54999999999999997e-215 or 7.19999999999999996e-269 < z < 35000

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg34.1%

        \[\leadsto \color{blue}{-t \cdot x} \]
      2. distribute-lft-neg-out34.1%

        \[\leadsto \color{blue}{\left(-t\right) \cdot x} \]
      3. *-commutative34.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{-15} \lor \neg \left(z \leq -1.55 \cdot 10^{-215} \lor \neg \left(z \leq 7.2 \cdot 10^{-269}\right) \land z \leq 35000\right):\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 44.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ t_2 := x \cdot \left(-t\right)\\ \mathbf{if}\;z \leq -0.00026:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-215}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 35000:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))) (t_2 (* x (- t))))
   (if (<= z -0.00026)
     t_1
     (if (<= z -2.1e-215)
       t_2
       (if (<= z 1.4e-268) (* t (/ x z)) (if (<= z 35000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double t_2 = x * -t;
	double tmp;
	if (z <= -0.00026) {
		tmp = t_1;
	} else if (z <= -2.1e-215) {
		tmp = t_2;
	} else if (z <= 1.4e-268) {
		tmp = t * (x / z);
	} else if (z <= 35000.0) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x * (t / z)
    t_2 = x * -t
    if (z <= (-0.00026d0)) then
        tmp = t_1
    else if (z <= (-2.1d-215)) then
        tmp = t_2
    else if (z <= 1.4d-268) then
        tmp = t * (x / z)
    else if (z <= 35000.0d0) then
        tmp = t_2
    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 t_2 = x * -t;
	double tmp;
	if (z <= -0.00026) {
		tmp = t_1;
	} else if (z <= -2.1e-215) {
		tmp = t_2;
	} else if (z <= 1.4e-268) {
		tmp = t * (x / z);
	} else if (z <= 35000.0) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	t_2 = x * -t
	tmp = 0
	if z <= -0.00026:
		tmp = t_1
	elif z <= -2.1e-215:
		tmp = t_2
	elif z <= 1.4e-268:
		tmp = t * (x / z)
	elif z <= 35000.0:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	t_2 = Float64(x * Float64(-t))
	tmp = 0.0
	if (z <= -0.00026)
		tmp = t_1;
	elseif (z <= -2.1e-215)
		tmp = t_2;
	elseif (z <= 1.4e-268)
		tmp = Float64(t * Float64(x / z));
	elseif (z <= 35000.0)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	t_2 = x * -t;
	tmp = 0.0;
	if (z <= -0.00026)
		tmp = t_1;
	elseif (z <= -2.1e-215)
		tmp = t_2;
	elseif (z <= 1.4e-268)
		tmp = t * (x / z);
	elseif (z <= 35000.0)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x * (-t)), $MachinePrecision]}, If[LessEqual[z, -0.00026], t$95$1, If[LessEqual[z, -2.1e-215], t$95$2, If[LessEqual[z, 1.4e-268], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 35000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-215}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 35000:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.59999999999999977e-4 or 35000 < z

    1. Initial program 99.5%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-\left(-\left(y - -1 \cdot t\right)\right)\right)} \cdot x}{z} \]
      3. cancel-sign-sub-inv88.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in98.6%

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

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

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

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

    if -2.59999999999999977e-4 < z < -2.1e-215 or 1.40000000000000008e-268 < z < 35000

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg34.1%

        \[\leadsto \color{blue}{-t \cdot x} \]
      2. distribute-lft-neg-out34.1%

        \[\leadsto \color{blue}{\left(-t\right) \cdot x} \]
      3. *-commutative34.1%

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

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

    if -2.1e-215 < z < 1.40000000000000008e-268

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in67.3%

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

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

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

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

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

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

Alternative 4: 93.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -61000 \lor \neg \left(z \leq 0.0126\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -61000 or 0.0126 < z

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in98.7%

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

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

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

    if -61000 < z < 0.0126

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 72.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+141} \lor \neg \left(z \leq 5 \cdot 10^{+143}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.80000000000000013e141 or 5.00000000000000012e143 < z

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in99.3%

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

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

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

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

    if -5.80000000000000013e141 < z < 5.00000000000000012e143

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 93.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 99.4%

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

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

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

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

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

    if -61000 < z < 0.0126

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

    if 0.0126 < z

    1. Initial program 99.7%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-\left(-\left(y - -1 \cdot t\right)\right)\right)} \cdot x}{z} \]
      3. cancel-sign-sub-inv88.0%

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

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

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

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

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

        \[\leadsto \frac{\left(-\color{blue}{\left(-1 \cdot y - t\right)}\right) \cdot x}{z} \]
      9. distribute-lft-neg-in88.0%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in98.7%

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

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

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

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

Alternative 7: 62.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+146} \lor \neg \left(z \leq 6.4 \cdot 10^{+216}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.99999999999999947e146 or 6.3999999999999994e216 < z

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in99.2%

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

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

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

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

    if -7.99999999999999947e146 < z < 6.3999999999999994e216

    1. Initial program 94.8%

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

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

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

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

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

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

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

Alternative 8: 69.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+116} \lor \neg \left(t \leq 1.38 \cdot 10^{+72}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.19999999999999941e116 or 1.37999999999999995e72 < t

    1. Initial program 95.5%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-\left(-\left(y - -1 \cdot t\right)\right)\right)} \cdot x}{z} \]
      3. cancel-sign-sub-inv52.4%

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

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

        \[\leadsto \frac{\left(-\left(-\left(y + \color{blue}{t}\right)\right)\right) \cdot x}{z} \]
      6. distribute-neg-out52.4%

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

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

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

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

        \[\leadsto \frac{-\color{blue}{x \cdot \left(-1 \cdot y - t\right)}}{z} \]
      11. distribute-neg-frac52.4%

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in57.9%

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

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

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

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

    if -7.19999999999999941e116 < t < 1.37999999999999995e72

    1. Initial program 95.7%

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

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

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

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

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

Alternative 9: 23.1% accurate, 2.8× speedup?

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

\\
x \cdot \left(-t\right)
\end{array}
Derivation
  1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-t \cdot x} \]
    2. distribute-lft-neg-out23.8%

      \[\leadsto \color{blue}{\left(-t\right) \cdot x} \]
    3. *-commutative23.8%

      \[\leadsto \color{blue}{x \cdot \left(-t\right)} \]
  8. Simplified23.8%

    \[\leadsto \color{blue}{x \cdot \left(-t\right)} \]
  9. Add Preprocessing

Developer target: 94.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\ t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\ \mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\ \;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
        (t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
   (if (< t_2 -7.623226303312042e-196)
     t_1
     (if (< t_2 1.4133944927702302e-211)
       (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
       t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
	double t_2 = x * ((y / z) - (t / (1.0 - z)));
	double tmp;
	if (t_2 < -7.623226303312042e-196) {
		tmp = t_1;
	} else if (t_2 < 1.4133944927702302e-211) {
		tmp = ((y * x) / z) + -((t * x) / (1.0 - 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) :: t_2
    real(8) :: tmp
    t_1 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
    t_2 = x * ((y / z) - (t / (1.0d0 - z)))
    if (t_2 < (-7.623226303312042d-196)) then
        tmp = t_1
    else if (t_2 < 1.4133944927702302d-211) then
        tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
	double t_2 = x * ((y / z) - (t / (1.0 - z)));
	double tmp;
	if (t_2 < -7.623226303312042e-196) {
		tmp = t_1;
	} else if (t_2 < 1.4133944927702302e-211) {
		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))))
	t_2 = x * ((y / z) - (t / (1.0 - z)))
	tmp = 0
	if t_2 < -7.623226303312042e-196:
		tmp = t_1
	elif t_2 < 1.4133944927702302e-211:
		tmp = ((y * x) / z) + -((t * x) / (1.0 - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z)))))
	t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))))
	tmp = 0.0
	if (t_2 < -7.623226303312042e-196)
		tmp = t_1;
	elseif (t_2 < 1.4133944927702302e-211)
		tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
	t_2 = x * ((y / z) - (t / (1.0 - z)));
	tmp = 0.0;
	if (t_2 < -7.623226303312042e-196)
		tmp = t_1;
	elseif (t_2 < 1.4133944927702302e-211)
		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024101 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :alt
  (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))

  (* x (- (/ y z) (/ t (- 1.0 z)))))