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

Percentage Accurate: 94.5% → 95.5%
Time: 8.8s
Alternatives: 12
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 94.5% accurate, 1.0× speedup?

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

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

Alternative 1: 95.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{z + -1}\\ t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1 \cdot \frac{x \cdot \left(z + \frac{y}{t_1}\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ t (+ z -1.0))) (t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
   (if (<= t_2 (- INFINITY)) (* t_1 (/ (* x (+ z (/ y t_1))) z)) t_2)))
double code(double x, double y, double z, double t) {
	double t_1 = t / (z + -1.0);
	double t_2 = x * ((y / z) - (t / (1.0 - z)));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1 * ((x * (z + (y / t_1))) / z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = t / (z + -1.0);
	double t_2 = x * ((y / z) - (t / (1.0 - z)));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1 * ((x * (z + (y / t_1))) / z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t / (z + -1.0)
	t_2 = x * ((y / z) - (t / (1.0 - z)))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1 * ((x * (z + (y / t_1))) / z)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t / Float64(z + -1.0))
	t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(t_1 * Float64(Float64(x * Float64(z + Float64(y / t_1))) / z));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t / (z + -1.0);
	t_2 = x * ((y / z) - (t / (1.0 - z)));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1 * ((x * (z + (y / t_1))) / z);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(t$95$1 * N[(N[(x * N[(z + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) < -inf.0

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))))

    1. Initial program 97.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \leq -\infty:\\ \;\;\;\;\frac{t}{z + -1} \cdot \frac{x \cdot \left(z + \frac{y}{\frac{t}{z + -1}}\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\ \end{array} \]

Alternative 2: 95.4% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 2.0000000000000001e289

    1. Initial program 96.7%

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

    if 2.0000000000000001e289 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))

    1. Initial program 76.2%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv76.2%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity76.2%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      4. +-commutative76.2%

        \[\leadsto x \cdot \frac{\color{blue}{t + y}}{z} \]
    4. Simplified76.2%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 64.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(-t\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+181}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+111}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{+175} \lor \neg \left(t \leq 4.5 \cdot 10^{+203}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.8e181 or 1.9499999999999999e111 < t < 5.4000000000000002e175 or 4.5000000000000003e203 < t

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e181 < t < 1.9499999999999999e111

    1. Initial program 95.5%

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

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

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

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

    if 5.4000000000000002e175 < t < 4.5000000000000003e203

    1. Initial program 74.0%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv65.0%

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

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

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      4. +-commutative65.0%

        \[\leadsto x \cdot \frac{\color{blue}{t + y}}{z} \]
    4. Simplified65.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    6. Applied egg-rr67.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+181}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+175} \lor \neg \left(t \leq 4.5 \cdot 10^{+203}\right):\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 4: 67.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 10^{+111}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;t \leq 1.32 \cdot 10^{+171}:\\
\;\;\;\;x \cdot \left(-t\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.64999999999999989e39 or 1.32000000000000009e171 < t

    1. Initial program 96.0%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv68.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-/r/58.9%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    9. Applied egg-rr58.9%

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

    if -2.64999999999999989e39 < t < 9.99999999999999957e110

    1. Initial program 94.8%

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

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

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

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

    if 9.99999999999999957e110 < t < 1.32000000000000009e171

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 10^{+111}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 1.32 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 5: 66.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+36}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

\mathbf{elif}\;t \leq 7.2 \cdot 10^{+110}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{+171}:\\
\;\;\;\;x \cdot \left(-t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.40000000000000001e36

    1. Initial program 99.8%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv67.6%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity67.6%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      4. +-commutative67.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      7. cancel-sign-sub-inv67.6%

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      10. +-commutative67.6%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    6. Applied egg-rr67.6%

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

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

    if -4.40000000000000001e36 < t < 7.1999999999999994e110

    1. Initial program 94.8%

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

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

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

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

    if 7.1999999999999994e110 < t < 2.30000000000000017e171

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.30000000000000017e171 < t

    1. Initial program 90.3%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv70.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    7. Simplified48.7%

      \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-/r/64.0%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    9. Applied egg-rr64.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+36}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+110}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 6: 67.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+39}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+171}:\\
\;\;\;\;x \cdot \left(-t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.1999999999999997e39

    1. Initial program 99.8%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv67.6%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity67.6%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      4. +-commutative67.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      7. cancel-sign-sub-inv67.6%

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      10. +-commutative67.6%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    6. Applied egg-rr67.6%

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

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

    if -4.1999999999999997e39 < t < 7.0000000000000003e104

    1. Initial program 94.7%

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(-y, \frac{1}{-z}, \color{blue}{\frac{-t}{1 - z}}\right) \]
    3. Applied egg-rr94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.0000000000000003e104 < t < 1.19999999999999999e171

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.19999999999999999e171 < t

    1. Initial program 90.3%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv70.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    7. Simplified48.7%

      \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-/r/64.0%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    9. Applied egg-rr64.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+39}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+104}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+171}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 7: 74.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+72}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+84}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


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

    1. Initial program 97.6%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv97.6%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity97.6%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      4. +-commutative97.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      7. cancel-sign-sub-inv97.6%

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      10. +-commutative97.6%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    6. Applied egg-rr97.6%

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

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

    if -1.6999999999999999e72 < z < 48

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

    if 48 < z < 2.2999999999999999e84

    1. Initial program 99.6%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv99.6%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity99.6%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      4. +-commutative99.6%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    7. Simplified66.0%

      \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-/r/73.5%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    9. Applied egg-rr73.5%

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

    if 2.2999999999999999e84 < z

    1. Initial program 93.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+72}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 48:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+84}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 8: 75.8% accurate, 1.0× speedup?

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

    1. Initial program 96.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t}{1 - z} \cdot x} \]
      5. *-commutative77.0%

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. distribute-frac-neg77.0%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot t}{1 - z}} \]
      9. *-commutative77.0%

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} \]
      15. *-rgt-identity77.0%

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

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

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

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

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

    if -3.1000000000000003e39 < t < 1.1599999999999999e71

    1. Initial program 94.5%

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(-y, \frac{1}{-z}, \color{blue}{\frac{-t}{1 - z}}\right) \]
    3. Applied egg-rr94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 93.4% accurate, 1.0× speedup?

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

    1. Initial program 96.7%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv96.2%

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

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

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

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

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

    if -1700 < z < 5.8000000000000003e-8

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 93.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1700:\\
\;\;\;\;\frac{x}{\frac{z}{y + t}}\\

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

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


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

    1. Initial program 98.2%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv97.3%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{t + y}}{z} \]
    4. Simplified97.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      7. cancel-sign-sub-inv97.3%

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

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

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

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    6. Applied egg-rr97.3%

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

    if -1700 < z < 5.8000000000000003e-8

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

    if 5.8000000000000003e-8 < z

    1. Initial program 95.0%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv95.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1700:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y + t}{z}\\ \end{array} \]

Alternative 11: 64.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+182} \lor \neg \left(t \leq 3.9 \cdot 10^{+111}\right):\\
\;\;\;\;x \cdot \left(-t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.0499999999999999e182 or 3.89999999999999979e111 < t

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0499999999999999e182 < t < 3.89999999999999979e111

    1. Initial program 95.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+182} \lor \neg \left(t \leq 3.9 \cdot 10^{+111}\right):\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 12: 23.3% accurate, 2.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \cdot \left(-t\right) \]

Developer target: 95.0% accurate, 0.3× 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 2023271 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

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

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