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

Percentage Accurate: 94.6% → 94.6%
Time: 11.1s
Alternatives: 13
Speedup: 1.0×

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 13 alternatives:

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

Initial Program: 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: 94.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 74.5% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \leq -7.3 \cdot 10^{+140} \lor \neg \left(z \leq 2.2 \cdot 10^{+39}\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 3 regimes
  2. if z < -6.1999999999999997e183

    1. Initial program 99.5%

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

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

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

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

    if -6.1999999999999997e183 < z < -7.3000000000000004e140 or 2.2000000000000001e39 < z

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

    if -7.3000000000000004e140 < z < 2.2000000000000001e39

    1. Initial program 95.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+183}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -7.3 \cdot 10^{+140} \lor \neg \left(z \leq 2.2 \cdot 10^{+39}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 94.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.85 \lor \neg \left(z \leq 2.3 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.849999999999999978 or 2.29999999999999989e-12 < z

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

    if -0.849999999999999978 < z < 2.29999999999999989e-12

    1. Initial program 94.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x + \frac{-t}{1 - z} \cdot x} \]
      5. add-sqr-sqrt47.2%

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

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

        \[\leadsto \frac{y}{z} \cdot x + \frac{\sqrt{\color{blue}{t \cdot t}}}{1 - z} \cdot x \]
      8. sqrt-unprod27.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x - \frac{-t}{1 - z} \cdot x} \]
      13. *-commutative63.6%

        \[\leadsto \frac{y}{z} \cdot x - \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      14. *-commutative63.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{x \cdot \frac{z \cdot t}{z}} \]
      9. distribute-lft-out--93.8%

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

        \[\leadsto x \cdot \color{blue}{\frac{y - z \cdot t}{z}} \]
      11. *-commutative93.8%

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

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

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

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

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

Alternative 4: 93.4% accurate, 0.6× speedup?

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

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

    if -1 < z < 2.29999999999999989e-12

    1. Initial program 94.5%

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

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

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

Alternative 5: 74.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+150} \lor \neg \left(t \leq 4.4 \cdot 10^{+87}\right):\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.20000000000000016e150 or 4.4000000000000002e87 < t

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

    if -3.20000000000000016e150 < t < 4.4000000000000002e87

    1. Initial program 95.0%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv77.7%

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

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

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

Alternative 6: 72.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+150} \lor \neg \left(t \leq 1.12 \cdot 10^{+86}\right):\\
\;\;\;\;t \cdot \frac{x}{z + -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.5000000000000001e150 or 1.12e86 < t

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000001e150 < t < 1.12e86

    1. Initial program 95.0%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv77.7%

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

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

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

Alternative 7: 68.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+150} \lor \neg \left(t \leq 1.7 \cdot 10^{+90}\right):\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.80000000000000005e150 or 1.70000000000000009e90 < t

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
    7. Simplified72.9%

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y + t}}} \]
      2. un-div-inv73.0%

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

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

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

    if -4.80000000000000005e150 < t < 1.70000000000000009e90

    1. Initial program 95.0%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv77.7%

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

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

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

Alternative 8: 68.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{+149} \lor \neg \left(t \leq 10^{+90}\right):\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.4000000000000002e149 or 9.99999999999999966e89 < t

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
    7. Simplified72.9%

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y + t}}} \]
      2. un-div-inv73.0%

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

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

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

    if -5.4000000000000002e149 < t < 9.99999999999999966e89

    1. Initial program 95.0%

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

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

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

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

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

Alternative 9: 68.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+152} \lor \neg \left(t \leq 1.3 \cdot 10^{+89}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.1000000000000002e152 or 1.3e89 < t

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

    if -2.1000000000000002e152 < t < 1.3e89

    1. Initial program 95.0%

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

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

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

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

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

Alternative 10: 45.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1 or 2.29999999999999989e-12 < z

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

    if -1 < z < 2.29999999999999989e-12

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot t} \]
      3. distribute-rgt-neg-in34.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 simplification46.0%

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

Alternative 11: 43.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1 or 2.29999999999999989e-12 < z

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

    if -1 < z < 2.29999999999999989e-12

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot t} \]
      3. distribute-rgt-neg-in34.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 simplification42.9%

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

Alternative 12: 23.5% accurate, 2.8× speedup?

\[\begin{array}{l} \\ t \cdot \left(-x\right) \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 * Float64(-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 \left(-x\right)
\end{array}
Derivation
  1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-x \cdot t} \]
    3. distribute-rgt-neg-in23.2%

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

    \[\leadsto \color{blue}{x \cdot \left(-t\right)} \]
  9. Final simplification23.2%

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

Alternative 13: 9.9% accurate, 3.7× speedup?

\[\begin{array}{l} \\ x \cdot t \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 * 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 t
\end{array}
Derivation
  1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-x \cdot t} \]
    3. distribute-rgt-neg-in23.2%

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

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

      \[\leadsto x \cdot \color{blue}{\left(0 - t\right)} \]
    2. sub-neg23.2%

      \[\leadsto x \cdot \color{blue}{\left(0 + \left(-t\right)\right)} \]
    3. add-sqr-sqrt10.6%

      \[\leadsto x \cdot \left(0 + \color{blue}{\sqrt{-t} \cdot \sqrt{-t}}\right) \]
    4. sqrt-unprod13.7%

      \[\leadsto x \cdot \left(0 + \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}\right) \]
    5. sqr-neg13.7%

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

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

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

    \[\leadsto x \cdot \color{blue}{\left(0 + t\right)} \]
  11. Step-by-step derivation
    1. +-lft-identity7.8%

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

    \[\leadsto x \cdot \color{blue}{t} \]
  13. Add Preprocessing

Developer Target 1: 94.8% 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 2024145 
(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)))))