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

Percentage Accurate: 94.6% → 98.3%
Time: 11.4s
Alternatives: 9
Speedup: 0.3×

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.6% 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: 98.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} + \frac{t}{z + -1}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 4 \cdot 10^{+296}\right):\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 4e+296)))
     (* y (/ x z))
     (* t_1 x))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 4e+296)) {
		tmp = y * (x / z);
	} else {
		tmp = t_1 * x;
	}
	return tmp;
}
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 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 4e+296)) {
		tmp = y * (x / z);
	} else {
		tmp = t_1 * x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / z) + (t / (z + -1.0))
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 4e+296):
		tmp = y * (x / z)
	else:
		tmp = t_1 * x
	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 <= Float64(-Inf)) || !(t_1 <= 4e+296))
		tmp = Float64(y * Float64(x / z));
	else
		tmp = Float64(t_1 * x);
	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 <= -Inf) || ~((t_1 <= 4e+296)))
		tmp = y * (x / z);
	else
		tmp = t_1 * x;
	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[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 4e+296]], $MachinePrecision]], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{z} + \frac{t}{z + -1}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 4 \cdot 10^{+296}\right):\\
\;\;\;\;y \cdot \frac{x}{z}\\

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


\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))) < -inf.0 or 3.99999999999999993e296 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 3.99999999999999993e296

    1. Initial program 98.7%

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

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

Alternative 2: 93.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -165000 \lor \neg \left(z \leq 1\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 -165000.0) (not (<= z 1.0)))
   (* x (/ (+ y t) z))
   (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -165000.0) || !(z <= 1.0)) {
		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 <= (-165000.0d0)) .or. (.not. (z <= 1.0d0))) 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 <= -165000.0) || !(z <= 1.0)) {
		tmp = x * ((y + t) / z);
	} else {
		tmp = x * ((y / z) - t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -165000.0) or not (z <= 1.0):
		tmp = x * ((y + t) / z)
	else:
		tmp = x * ((y / z) - t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -165000.0) || !(z <= 1.0))
		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 <= -165000.0) || ~((z <= 1.0)))
		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, -165000.0], N[Not[LessEqual[z, 1.0]], $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 -165000 \lor \neg \left(z \leq 1\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 < -165000 or 1 < z

    1. Initial program 97.9%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - -1 \cdot t}{z}} \]
      2. cancel-sign-sub-inv96.5%

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

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

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

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

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

    if -165000 < z < 1

    1. Initial program 87.9%

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

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

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

Alternative 3: 72.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{-46} \lor \neg \left(y \leq 5.2 \cdot 10^{-110}\right):\\
\;\;\;\;y \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.9000000000000003e-46 or 5.19999999999999979e-110 < y

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

    if -3.9000000000000003e-46 < y < 5.19999999999999979e-110

    1. Initial program 97.4%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x}{\color{blue}{0 - \left(1 - z\right)}} \]
      6. associate--r-70.6%

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

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

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

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

Alternative 4: 63.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-10} \lor \neg \left(y \leq 1.55 \cdot 10^{-109}\right):\\
\;\;\;\;y \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.2e-10 or 1.55e-109 < y

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

    if -1.2e-10 < y < 1.55e-109

    1. Initial program 97.5%

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)}\right)}^{3}} \]
    5. Taylor expanded in z around inf 56.6%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv56.6%

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

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

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

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

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

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

Alternative 5: 63.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-45} \lor \neg \left(y \leq 1.4 \cdot 10^{-110}\right):\\
\;\;\;\;y \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.49999999999999988e-45 or 1.4e-110 < y

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

    if -2.49999999999999988e-45 < y < 1.4e-110

    1. Initial program 97.4%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x}{\color{blue}{0 - \left(1 - z\right)}} \]
      6. associate--r-70.6%

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

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

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

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

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

Alternative 6: 65.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+178} \lor \neg \left(t \leq 1.85 \cdot 10^{+54}\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.35000000000000009e178 or 1.8500000000000001e54 < t

    1. Initial program 93.1%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x}{\color{blue}{0 - \left(1 - z\right)}} \]
      6. associate--r-63.6%

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

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

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

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

    if -1.35000000000000009e178 < t < 1.8500000000000001e54

    1. Initial program 92.9%

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

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

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

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

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

Alternative 7: 42.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -165000 \lor \neg \left(z \leq 1\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 < -165000 or 1 < z

    1. Initial program 97.9%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x}{\color{blue}{0 - \left(1 - z\right)}} \]
      6. associate--r-51.1%

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

        \[\leadsto t \cdot \frac{x}{\color{blue}{-1} + z} \]
    5. Simplified51.1%

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

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

    if -165000 < z < 1

    1. Initial program 87.9%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    5. Step-by-step derivation
      1. associate-*r*25.7%

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

        \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
    6. Simplified25.7%

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

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

Alternative 8: 23.2% 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 92.9%

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

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

    \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
  5. Step-by-step derivation
    1. associate-*r*19.4%

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

      \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
  6. Simplified19.4%

    \[\leadsto \color{blue}{\left(-t\right) \cdot x} \]
  7. Final simplification19.4%

    \[\leadsto x \cdot \left(-t\right) \]
  8. Add Preprocessing

Alternative 9: 9.8% accurate, 3.7× speedup?

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

\\
t \cdot x
\end{array}
Derivation
  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 0 62.4%

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

    \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
  5. Step-by-step derivation
    1. associate-*r*19.4%

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

      \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
  6. Simplified19.4%

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

      \[\leadsto \color{blue}{x \cdot \left(-t\right)} \]
    2. add-sqr-sqrt9.2%

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

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

      \[\leadsto x \cdot \sqrt{\color{blue}{t \cdot t}} \]
    5. sqrt-unprod3.3%

      \[\leadsto x \cdot \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \]
    6. add-sqr-sqrt7.8%

      \[\leadsto x \cdot \color{blue}{t} \]
    7. pow17.8%

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

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

      \[\leadsto \color{blue}{x \cdot t} \]
  10. Simplified7.8%

    \[\leadsto \color{blue}{x \cdot t} \]
  11. Final simplification7.8%

    \[\leadsto t \cdot x \]
  12. Add Preprocessing

Developer Target 1: 94.7% 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 2024185 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< (* x (- (/ y z) (/ t (- 1 z)))) -3811613151656021/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 7066972463851151/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z))))))))

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