Rosa's DopplerBench

Percentage Accurate: 72.6% → 97.7%
Time: 12.4s
Alternatives: 18
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1):
	return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1)
	return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)))
end
function tmp = code(u, v, t1)
	tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\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 18 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: 72.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
	return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1):
	return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1)
	return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)))
end
function tmp = code(u, v, t1)
	tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}

Alternative 1: 97.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{t1}{t1 + u} \cdot v}{\left(-u\right) - t1} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (* (/ t1 (+ t1 u)) v) (- (- u) t1)))
double code(double u, double v, double t1) {
	return ((t1 / (t1 + u)) * v) / (-u - t1);
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = ((t1 / (t1 + u)) * v) / (-u - t1)
end function
public static double code(double u, double v, double t1) {
	return ((t1 / (t1 + u)) * v) / (-u - t1);
}
def code(u, v, t1):
	return ((t1 / (t1 + u)) * v) / (-u - t1)
function code(u, v, t1)
	return Float64(Float64(Float64(t1 / Float64(t1 + u)) * v) / Float64(Float64(-u) - t1))
end
function tmp = code(u, v, t1)
	tmp = ((t1 / (t1 + u)) * v) / (-u - t1);
end
code[u_, v_, t1_] := N[(N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{t1}{t1 + u} \cdot v}{\left(-u\right) - t1}
\end{array}
Derivation
  1. Initial program 67.9%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*67.2%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out67.2%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in67.2%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*82.0%

      \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
    5. distribute-neg-frac282.0%

      \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  3. Simplified82.0%

    \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. distribute-frac-neg282.0%

      \[\leadsto t1 \cdot \color{blue}{\left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)} \]
    2. distribute-rgt-neg-out82.0%

      \[\leadsto \color{blue}{-t1 \cdot \frac{\frac{v}{t1 + u}}{t1 + u}} \]
    3. associate-/r*67.2%

      \[\leadsto -t1 \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    4. distribute-lft-neg-out67.2%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    5. associate-/l*67.9%

      \[\leadsto \color{blue}{\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    6. times-frac98.4%

      \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
    7. frac-2neg98.4%

      \[\leadsto \frac{-t1}{t1 + u} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
    8. associate-*r/98.8%

      \[\leadsto \color{blue}{\frac{\frac{-t1}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)}} \]
    9. add-sqr-sqrt50.5%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    10. sqrt-unprod46.3%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    11. sqr-neg46.3%

      \[\leadsto \frac{\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    12. sqrt-unprod15.4%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    13. add-sqr-sqrt32.9%

      \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    14. add-sqr-sqrt16.4%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}}} \]
    15. sqrt-unprod52.9%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    16. sqr-neg52.9%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
    17. sqrt-prod51.3%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}} \]
    18. add-sqr-sqrt98.8%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{t1 + u}} \]
  6. Applied egg-rr98.8%

    \[\leadsto \color{blue}{\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}} \]
  7. Final simplification98.8%

    \[\leadsto \frac{\frac{t1}{t1 + u} \cdot v}{\left(-u\right) - t1} \]
  8. Add Preprocessing

Alternative 2: 77.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ t_2 := \frac{t1}{t1 + u} \cdot \frac{v}{-u}\\ \mathbf{if}\;u \leq -1.5 \cdot 10^{+137}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;u \leq -9.5 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 1.65 \cdot 10^{-25}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 5 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 9 \cdot 10^{+120}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* t1 (/ (/ v u) (- (- u) t1))))
        (t_2 (* (/ t1 (+ t1 u)) (/ v (- u)))))
   (if (<= u -1.5e+137)
     t_2
     (if (<= u -9.5e-12)
       t_1
       (if (<= u 1.65e-25)
         (- (/ v t1))
         (if (<= u 5e+43)
           t_1
           (if (<= u 9e+120) (/ v (- (* u (- 2.0)) t1)) t_2)))))))
double code(double u, double v, double t1) {
	double t_1 = t1 * ((v / u) / (-u - t1));
	double t_2 = (t1 / (t1 + u)) * (v / -u);
	double tmp;
	if (u <= -1.5e+137) {
		tmp = t_2;
	} else if (u <= -9.5e-12) {
		tmp = t_1;
	} else if (u <= 1.65e-25) {
		tmp = -(v / t1);
	} else if (u <= 5e+43) {
		tmp = t_1;
	} else if (u <= 9e+120) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t1 * ((v / u) / (-u - t1))
    t_2 = (t1 / (t1 + u)) * (v / -u)
    if (u <= (-1.5d+137)) then
        tmp = t_2
    else if (u <= (-9.5d-12)) then
        tmp = t_1
    else if (u <= 1.65d-25) then
        tmp = -(v / t1)
    else if (u <= 5d+43) then
        tmp = t_1
    else if (u <= 9d+120) then
        tmp = v / ((u * -2.0d0) - t1)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = t1 * ((v / u) / (-u - t1));
	double t_2 = (t1 / (t1 + u)) * (v / -u);
	double tmp;
	if (u <= -1.5e+137) {
		tmp = t_2;
	} else if (u <= -9.5e-12) {
		tmp = t_1;
	} else if (u <= 1.65e-25) {
		tmp = -(v / t1);
	} else if (u <= 5e+43) {
		tmp = t_1;
	} else if (u <= 9e+120) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = t1 * ((v / u) / (-u - t1))
	t_2 = (t1 / (t1 + u)) * (v / -u)
	tmp = 0
	if u <= -1.5e+137:
		tmp = t_2
	elif u <= -9.5e-12:
		tmp = t_1
	elif u <= 1.65e-25:
		tmp = -(v / t1)
	elif u <= 5e+43:
		tmp = t_1
	elif u <= 9e+120:
		tmp = v / ((u * -2.0) - t1)
	else:
		tmp = t_2
	return tmp
function code(u, v, t1)
	t_1 = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1)))
	t_2 = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-u)))
	tmp = 0.0
	if (u <= -1.5e+137)
		tmp = t_2;
	elseif (u <= -9.5e-12)
		tmp = t_1;
	elseif (u <= 1.65e-25)
		tmp = Float64(-Float64(v / t1));
	elseif (u <= 5e+43)
		tmp = t_1;
	elseif (u <= 9e+120)
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = t1 * ((v / u) / (-u - t1));
	t_2 = (t1 / (t1 + u)) * (v / -u);
	tmp = 0.0;
	if (u <= -1.5e+137)
		tmp = t_2;
	elseif (u <= -9.5e-12)
		tmp = t_1;
	elseif (u <= 1.65e-25)
		tmp = -(v / t1);
	elseif (u <= 5e+43)
		tmp = t_1;
	elseif (u <= 9e+120)
		tmp = v / ((u * -2.0) - t1);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -1.5e+137], t$95$2, If[LessEqual[u, -9.5e-12], t$95$1, If[LessEqual[u, 1.65e-25], (-N[(v / t1), $MachinePrecision]), If[LessEqual[u, 5e+43], t$95$1, If[LessEqual[u, 9e+120], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\
t_2 := \frac{t1}{t1 + u} \cdot \frac{v}{-u}\\
\mathbf{if}\;u \leq -1.5 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;u \leq -9.5 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq 1.65 \cdot 10^{-25}:\\
\;\;\;\;-\frac{v}{t1}\\

\mathbf{elif}\;u \leq 5 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq 9 \cdot 10^{+120}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if u < -1.5e137 or 8.99999999999999953e120 < u

    1. Initial program 70.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. times-frac99.8%

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
      2. distribute-frac-neg99.8%

        \[\leadsto \color{blue}{\left(-\frac{t1}{t1 + u}\right)} \cdot \frac{v}{t1 + u} \]
      3. distribute-neg-frac299.8%

        \[\leadsto \color{blue}{\frac{t1}{-\left(t1 + u\right)}} \cdot \frac{v}{t1 + u} \]
      4. +-commutative99.8%

        \[\leadsto \frac{t1}{-\color{blue}{\left(u + t1\right)}} \cdot \frac{v}{t1 + u} \]
      5. distribute-neg-in99.8%

        \[\leadsto \frac{t1}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \cdot \frac{v}{t1 + u} \]
      6. unsub-neg99.8%

        \[\leadsto \frac{t1}{\color{blue}{\left(-u\right) - t1}} \cdot \frac{v}{t1 + u} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 90.5%

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{u}} \]

    if -1.5e137 < u < -9.4999999999999995e-12 or 1.6499999999999999e-25 < u < 5.0000000000000004e43

    1. Initial program 83.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*84.4%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out84.4%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in84.4%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*92.3%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac292.3%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified92.3%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 74.8%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]

    if -9.4999999999999995e-12 < u < 1.6499999999999999e-25

    1. Initial program 59.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*58.7%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out58.7%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in58.7%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*75.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac275.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified75.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 86.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/86.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-186.5%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified86.5%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]

    if 5.0000000000000004e43 < u < 8.99999999999999953e120

    1. Initial program 60.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*57.3%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out57.3%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in57.3%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*75.4%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac275.4%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified75.4%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num99.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.9%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg99.9%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg99.9%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in99.9%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative99.9%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg99.9%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt44.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod50.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg50.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod20.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt22.6%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt1.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod47.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 71.6%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative71.6%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified71.6%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification84.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.5 \cdot 10^{+137}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-u}\\ \mathbf{elif}\;u \leq -9.5 \cdot 10^{-12}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;u \leq 1.65 \cdot 10^{-25}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 5 \cdot 10^{+43}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;u \leq 9 \cdot 10^{+120}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -3.9 \cdot 10^{+180}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;t1 \leq -4.2 \cdot 10^{-192}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{elif}\;t1 \leq 1.3 \cdot 10^{-253}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\ \mathbf{elif}\;t1 \leq 3.4 \cdot 10^{+104}:\\ \;\;\;\;t1 \cdot \frac{\frac{-v}{t1 + u}}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= t1 -3.9e+180)
   (- (/ v t1))
   (if (<= t1 -4.2e-192)
     (* v (/ t1 (* (+ t1 u) (- (- u) t1))))
     (if (<= t1 1.3e-253)
       (/ (* t1 (/ v (- u))) (+ t1 u))
       (if (<= t1 3.4e+104)
         (* t1 (/ (/ (- v) (+ t1 u)) (+ t1 u)))
         (/ v (- (* u (- 2.0)) t1)))))))
double code(double u, double v, double t1) {
	double tmp;
	if (t1 <= -3.9e+180) {
		tmp = -(v / t1);
	} else if (t1 <= -4.2e-192) {
		tmp = v * (t1 / ((t1 + u) * (-u - t1)));
	} else if (t1 <= 1.3e-253) {
		tmp = (t1 * (v / -u)) / (t1 + u);
	} else if (t1 <= 3.4e+104) {
		tmp = t1 * ((-v / (t1 + u)) / (t1 + u));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if (t1 <= (-3.9d+180)) then
        tmp = -(v / t1)
    else if (t1 <= (-4.2d-192)) then
        tmp = v * (t1 / ((t1 + u) * (-u - t1)))
    else if (t1 <= 1.3d-253) then
        tmp = (t1 * (v / -u)) / (t1 + u)
    else if (t1 <= 3.4d+104) then
        tmp = t1 * ((-v / (t1 + u)) / (t1 + u))
    else
        tmp = v / ((u * -2.0d0) - t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (t1 <= -3.9e+180) {
		tmp = -(v / t1);
	} else if (t1 <= -4.2e-192) {
		tmp = v * (t1 / ((t1 + u) * (-u - t1)));
	} else if (t1 <= 1.3e-253) {
		tmp = (t1 * (v / -u)) / (t1 + u);
	} else if (t1 <= 3.4e+104) {
		tmp = t1 * ((-v / (t1 + u)) / (t1 + u));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if t1 <= -3.9e+180:
		tmp = -(v / t1)
	elif t1 <= -4.2e-192:
		tmp = v * (t1 / ((t1 + u) * (-u - t1)))
	elif t1 <= 1.3e-253:
		tmp = (t1 * (v / -u)) / (t1 + u)
	elif t1 <= 3.4e+104:
		tmp = t1 * ((-v / (t1 + u)) / (t1 + u))
	else:
		tmp = v / ((u * -2.0) - t1)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (t1 <= -3.9e+180)
		tmp = Float64(-Float64(v / t1));
	elseif (t1 <= -4.2e-192)
		tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) - t1))));
	elseif (t1 <= 1.3e-253)
		tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / Float64(t1 + u));
	elseif (t1 <= 3.4e+104)
		tmp = Float64(t1 * Float64(Float64(Float64(-v) / Float64(t1 + u)) / Float64(t1 + u)));
	else
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (t1 <= -3.9e+180)
		tmp = -(v / t1);
	elseif (t1 <= -4.2e-192)
		tmp = v * (t1 / ((t1 + u) * (-u - t1)));
	elseif (t1 <= 1.3e-253)
		tmp = (t1 * (v / -u)) / (t1 + u);
	elseif (t1 <= 3.4e+104)
		tmp = t1 * ((-v / (t1 + u)) / (t1 + u));
	else
		tmp = v / ((u * -2.0) - t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[t1, -3.9e+180], (-N[(v / t1), $MachinePrecision]), If[LessEqual[t1, -4.2e-192], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.3e-253], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.4e+104], N[(t1 * N[(N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.9 \cdot 10^{+180}:\\
\;\;\;\;-\frac{v}{t1}\\

\mathbf{elif}\;t1 \leq -4.2 \cdot 10^{-192}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\

\mathbf{elif}\;t1 \leq 1.3 \cdot 10^{-253}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\

\mathbf{elif}\;t1 \leq 3.4 \cdot 10^{+104}:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{t1 + u}}{t1 + u}\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t1 < -3.9000000000000001e180

    1. Initial program 17.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*20.1%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out20.1%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in20.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*54.3%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac254.3%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified54.3%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 91.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/91.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-191.3%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified91.3%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]

    if -3.9000000000000001e180 < t1 < -4.19999999999999986e-192

    1. Initial program 84.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/87.4%

        \[\leadsto \color{blue}{\frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
      2. *-commutative87.4%

        \[\leadsto \color{blue}{v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. Simplified87.4%

      \[\leadsto \color{blue}{v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    4. Add Preprocessing

    if -4.19999999999999986e-192 < t1 < 1.3e-253

    1. Initial program 80.3%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*78.8%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out78.8%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in78.8%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*84.2%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac284.2%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified84.2%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 84.0%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/94.5%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative94.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in94.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg94.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/86.8%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative86.8%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. frac-2neg86.8%

        \[\leadsto \frac{v}{u} \cdot \color{blue}{\frac{-t1}{-\left(\left(-u\right) - t1\right)}} \]
      8. associate-*r/94.5%

        \[\leadsto \color{blue}{\frac{\frac{v}{u} \cdot \left(-t1\right)}{-\left(\left(-u\right) - t1\right)}} \]
      9. sub-neg94.5%

        \[\leadsto \frac{\frac{v}{u} \cdot \left(-t1\right)}{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      10. distribute-neg-in94.5%

        \[\leadsto \frac{\frac{v}{u} \cdot \left(-t1\right)}{-\color{blue}{\left(-\left(u + t1\right)\right)}} \]
      11. +-commutative94.5%

        \[\leadsto \frac{\frac{v}{u} \cdot \left(-t1\right)}{-\left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      12. remove-double-neg94.5%

        \[\leadsto \frac{\frac{v}{u} \cdot \left(-t1\right)}{\color{blue}{t1 + u}} \]
    7. Applied egg-rr94.5%

      \[\leadsto \color{blue}{\frac{\frac{v}{u} \cdot \left(-t1\right)}{t1 + u}} \]

    if 1.3e-253 < t1 < 3.3999999999999997e104

    1. Initial program 80.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*83.1%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out83.1%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in83.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*93.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac293.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing

    if 3.3999999999999997e104 < t1

    1. Initial program 34.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*33.5%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out33.5%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in33.5%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*67.7%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac267.7%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified67.7%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative100.0%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in100.0%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg100.0%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num100.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg100.0%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times97.2%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity97.2%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg97.2%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg97.2%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in97.2%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative97.2%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg97.2%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt0.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod7.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg7.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod23.8%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt23.8%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt5.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod38.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr97.2%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 97.2%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative97.2%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified97.2%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification92.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.9 \cdot 10^{+180}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;t1 \leq -4.2 \cdot 10^{-192}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{elif}\;t1 \leq 1.3 \cdot 10^{-253}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\ \mathbf{elif}\;t1 \leq 3.4 \cdot 10^{+104}:\\ \;\;\;\;t1 \cdot \frac{\frac{-v}{t1 + u}}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-t1\right) \cdot \frac{v}{u \cdot \left(t1 + u\right)}\\ \mathbf{if}\;u \leq -7.8 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 9.2 \cdot 10^{-23}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 1.4 \cdot 10^{+44} \lor \neg \left(u \leq 1.22 \cdot 10^{+165}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* (- t1) (/ v (* u (+ t1 u))))))
   (if (<= u -7.8e-12)
     t_1
     (if (<= u 9.2e-23)
       (- (/ v t1))
       (if (or (<= u 1.4e+44) (not (<= u 1.22e+165)))
         t_1
         (/ v (- (* u (- 2.0)) t1)))))))
double code(double u, double v, double t1) {
	double t_1 = -t1 * (v / (u * (t1 + u)));
	double tmp;
	if (u <= -7.8e-12) {
		tmp = t_1;
	} else if (u <= 9.2e-23) {
		tmp = -(v / t1);
	} else if ((u <= 1.4e+44) || !(u <= 1.22e+165)) {
		tmp = t_1;
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: tmp
    t_1 = -t1 * (v / (u * (t1 + u)))
    if (u <= (-7.8d-12)) then
        tmp = t_1
    else if (u <= 9.2d-23) then
        tmp = -(v / t1)
    else if ((u <= 1.4d+44) .or. (.not. (u <= 1.22d+165))) then
        tmp = t_1
    else
        tmp = v / ((u * -2.0d0) - t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -t1 * (v / (u * (t1 + u)));
	double tmp;
	if (u <= -7.8e-12) {
		tmp = t_1;
	} else if (u <= 9.2e-23) {
		tmp = -(v / t1);
	} else if ((u <= 1.4e+44) || !(u <= 1.22e+165)) {
		tmp = t_1;
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -t1 * (v / (u * (t1 + u)))
	tmp = 0
	if u <= -7.8e-12:
		tmp = t_1
	elif u <= 9.2e-23:
		tmp = -(v / t1)
	elif (u <= 1.4e+44) or not (u <= 1.22e+165):
		tmp = t_1
	else:
		tmp = v / ((u * -2.0) - t1)
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-t1) * Float64(v / Float64(u * Float64(t1 + u))))
	tmp = 0.0
	if (u <= -7.8e-12)
		tmp = t_1;
	elseif (u <= 9.2e-23)
		tmp = Float64(-Float64(v / t1));
	elseif ((u <= 1.4e+44) || !(u <= 1.22e+165))
		tmp = t_1;
	else
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -t1 * (v / (u * (t1 + u)));
	tmp = 0.0;
	if (u <= -7.8e-12)
		tmp = t_1;
	elseif (u <= 9.2e-23)
		tmp = -(v / t1);
	elseif ((u <= 1.4e+44) || ~((u <= 1.22e+165)))
		tmp = t_1;
	else
		tmp = v / ((u * -2.0) - t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-t1) * N[(v / N[(u * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -7.8e-12], t$95$1, If[LessEqual[u, 9.2e-23], (-N[(v / t1), $MachinePrecision]), If[Or[LessEqual[u, 1.4e+44], N[Not[LessEqual[u, 1.22e+165]], $MachinePrecision]], t$95$1, N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(-t1\right) \cdot \frac{v}{u \cdot \left(t1 + u\right)}\\
\mathbf{if}\;u \leq -7.8 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq 9.2 \cdot 10^{-23}:\\
\;\;\;\;-\frac{v}{t1}\\

\mathbf{elif}\;u \leq 1.4 \cdot 10^{+44} \lor \neg \left(u \leq 1.22 \cdot 10^{+165}\right):\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -7.79999999999999988e-12 or 9.2000000000000004e-23 < u < 1.4e44 or 1.2199999999999999e165 < u

    1. Initial program 77.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*77.6%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out77.6%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in77.6%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*88.7%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac288.7%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified88.7%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 81.3%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Taylor expanded in v around 0 72.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{u \cdot \left(t1 + u\right)}} \]
    7. Step-by-step derivation
      1. mul-1-neg72.5%

        \[\leadsto \color{blue}{-\frac{t1 \cdot v}{u \cdot \left(t1 + u\right)}} \]
      2. distribute-neg-frac272.5%

        \[\leadsto \color{blue}{\frac{t1 \cdot v}{-u \cdot \left(t1 + u\right)}} \]
      3. associate-*r/73.6%

        \[\leadsto \color{blue}{t1 \cdot \frac{v}{-u \cdot \left(t1 + u\right)}} \]
      4. distribute-rgt-neg-in73.6%

        \[\leadsto t1 \cdot \frac{v}{\color{blue}{u \cdot \left(-\left(t1 + u\right)\right)}} \]
    8. Simplified73.6%

      \[\leadsto \color{blue}{t1 \cdot \frac{v}{u \cdot \left(-\left(t1 + u\right)\right)}} \]

    if -7.79999999999999988e-12 < u < 9.2000000000000004e-23

    1. Initial program 59.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*58.7%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out58.7%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in58.7%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*75.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac275.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified75.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 86.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/86.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-186.5%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified86.5%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]

    if 1.4e44 < u < 1.2199999999999999e165

    1. Initial program 57.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*55.0%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out55.0%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in55.0%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*76.8%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac276.8%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified76.8%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num99.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.9%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg99.9%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg99.9%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in99.9%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative99.9%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg99.9%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt49.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod50.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg50.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod18.6%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt29.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt1.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod48.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 66.1%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative66.1%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified66.1%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -7.8 \cdot 10^{-12}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{v}{u \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;u \leq 9.2 \cdot 10^{-23}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 1.4 \cdot 10^{+44} \lor \neg \left(u \leq 1.22 \cdot 10^{+165}\right):\\ \;\;\;\;\left(-t1\right) \cdot \frac{v}{u \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 77.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{if}\;u \leq -4.8 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 5.5 \cdot 10^{-23}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 6.6 \cdot 10^{+43} \lor \neg \left(u \leq 10^{+121}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* t1 (/ (/ v u) (- (- u) t1)))))
   (if (<= u -4.8e-13)
     t_1
     (if (<= u 5.5e-23)
       (- (/ v t1))
       (if (or (<= u 6.6e+43) (not (<= u 1e+121)))
         t_1
         (/ v (- (* u (- 2.0)) t1)))))))
double code(double u, double v, double t1) {
	double t_1 = t1 * ((v / u) / (-u - t1));
	double tmp;
	if (u <= -4.8e-13) {
		tmp = t_1;
	} else if (u <= 5.5e-23) {
		tmp = -(v / t1);
	} else if ((u <= 6.6e+43) || !(u <= 1e+121)) {
		tmp = t_1;
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t1 * ((v / u) / (-u - t1))
    if (u <= (-4.8d-13)) then
        tmp = t_1
    else if (u <= 5.5d-23) then
        tmp = -(v / t1)
    else if ((u <= 6.6d+43) .or. (.not. (u <= 1d+121))) then
        tmp = t_1
    else
        tmp = v / ((u * -2.0d0) - t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = t1 * ((v / u) / (-u - t1));
	double tmp;
	if (u <= -4.8e-13) {
		tmp = t_1;
	} else if (u <= 5.5e-23) {
		tmp = -(v / t1);
	} else if ((u <= 6.6e+43) || !(u <= 1e+121)) {
		tmp = t_1;
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = t1 * ((v / u) / (-u - t1))
	tmp = 0
	if u <= -4.8e-13:
		tmp = t_1
	elif u <= 5.5e-23:
		tmp = -(v / t1)
	elif (u <= 6.6e+43) or not (u <= 1e+121):
		tmp = t_1
	else:
		tmp = v / ((u * -2.0) - t1)
	return tmp
function code(u, v, t1)
	t_1 = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1)))
	tmp = 0.0
	if (u <= -4.8e-13)
		tmp = t_1;
	elseif (u <= 5.5e-23)
		tmp = Float64(-Float64(v / t1));
	elseif ((u <= 6.6e+43) || !(u <= 1e+121))
		tmp = t_1;
	else
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = t1 * ((v / u) / (-u - t1));
	tmp = 0.0;
	if (u <= -4.8e-13)
		tmp = t_1;
	elseif (u <= 5.5e-23)
		tmp = -(v / t1);
	elseif ((u <= 6.6e+43) || ~((u <= 1e+121)))
		tmp = t_1;
	else
		tmp = v / ((u * -2.0) - t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4.8e-13], t$95$1, If[LessEqual[u, 5.5e-23], (-N[(v / t1), $MachinePrecision]), If[Or[LessEqual[u, 6.6e+43], N[Not[LessEqual[u, 1e+121]], $MachinePrecision]], t$95$1, N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\
\mathbf{if}\;u \leq -4.8 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq 5.5 \cdot 10^{-23}:\\
\;\;\;\;-\frac{v}{t1}\\

\mathbf{elif}\;u \leq 6.6 \cdot 10^{+43} \lor \neg \left(u \leq 10^{+121}\right):\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -4.7999999999999997e-13 or 5.5000000000000001e-23 < u < 6.6000000000000003e43 or 1.00000000000000004e121 < u

    1. Initial program 75.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*75.9%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out75.9%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in75.9%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*88.2%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac288.2%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified88.2%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 80.1%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]

    if -4.7999999999999997e-13 < u < 5.5000000000000001e-23

    1. Initial program 59.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*58.7%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out58.7%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in58.7%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*75.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac275.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified75.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 86.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/86.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-186.5%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified86.5%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]

    if 6.6000000000000003e43 < u < 1.00000000000000004e121

    1. Initial program 60.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*57.3%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out57.3%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in57.3%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*75.4%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac275.4%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified75.4%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num99.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.9%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg99.9%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg99.9%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in99.9%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative99.9%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg99.9%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt44.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod50.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg50.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod20.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt22.6%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt1.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod47.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 71.6%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative71.6%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified71.6%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.8 \cdot 10^{-13}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;u \leq 5.5 \cdot 10^{-23}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 6.6 \cdot 10^{+43} \lor \neg \left(u \leq 10^{+121}\right):\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 77.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\ \mathbf{if}\;u \leq -1.5 \cdot 10^{-11}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 1.65 \cdot 10^{-27}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 5.5 \cdot 10^{+43}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;u \leq 9 \cdot 10^{+120}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (* t1 (/ v (- u))) (+ t1 u))))
   (if (<= u -1.5e-11)
     t_1
     (if (<= u 1.65e-27)
       (- (/ v t1))
       (if (<= u 5.5e+43)
         (* t1 (/ (/ v u) (- (- u) t1)))
         (if (<= u 9e+120) (/ v (- (* u (- 2.0)) t1)) t_1))))))
double code(double u, double v, double t1) {
	double t_1 = (t1 * (v / -u)) / (t1 + u);
	double tmp;
	if (u <= -1.5e-11) {
		tmp = t_1;
	} else if (u <= 1.65e-27) {
		tmp = -(v / t1);
	} else if (u <= 5.5e+43) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (u <= 9e+120) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t1 * (v / -u)) / (t1 + u)
    if (u <= (-1.5d-11)) then
        tmp = t_1
    else if (u <= 1.65d-27) then
        tmp = -(v / t1)
    else if (u <= 5.5d+43) then
        tmp = t1 * ((v / u) / (-u - t1))
    else if (u <= 9d+120) then
        tmp = v / ((u * -2.0d0) - t1)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = (t1 * (v / -u)) / (t1 + u);
	double tmp;
	if (u <= -1.5e-11) {
		tmp = t_1;
	} else if (u <= 1.65e-27) {
		tmp = -(v / t1);
	} else if (u <= 5.5e+43) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (u <= 9e+120) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = (t1 * (v / -u)) / (t1 + u)
	tmp = 0
	if u <= -1.5e-11:
		tmp = t_1
	elif u <= 1.65e-27:
		tmp = -(v / t1)
	elif u <= 5.5e+43:
		tmp = t1 * ((v / u) / (-u - t1))
	elif u <= 9e+120:
		tmp = v / ((u * -2.0) - t1)
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(t1 * Float64(v / Float64(-u))) / Float64(t1 + u))
	tmp = 0.0
	if (u <= -1.5e-11)
		tmp = t_1;
	elseif (u <= 1.65e-27)
		tmp = Float64(-Float64(v / t1));
	elseif (u <= 5.5e+43)
		tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1)));
	elseif (u <= 9e+120)
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = (t1 * (v / -u)) / (t1 + u);
	tmp = 0.0;
	if (u <= -1.5e-11)
		tmp = t_1;
	elseif (u <= 1.65e-27)
		tmp = -(v / t1);
	elseif (u <= 5.5e+43)
		tmp = t1 * ((v / u) / (-u - t1));
	elseif (u <= 9e+120)
		tmp = v / ((u * -2.0) - t1);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -1.5e-11], t$95$1, If[LessEqual[u, 1.65e-27], (-N[(v / t1), $MachinePrecision]), If[LessEqual[u, 5.5e+43], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 9e+120], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\
\mathbf{if}\;u \leq -1.5 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq 1.65 \cdot 10^{-27}:\\
\;\;\;\;-\frac{v}{t1}\\

\mathbf{elif}\;u \leq 5.5 \cdot 10^{+43}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\

\mathbf{elif}\;u \leq 9 \cdot 10^{+120}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if u < -1.5e-11 or 8.99999999999999953e120 < u

    1. Initial program 75.3%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*75.2%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out75.2%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in75.2%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*88.3%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac288.3%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified88.3%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 83.1%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/87.1%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative87.1%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in87.1%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg87.1%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/84.4%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative84.4%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. frac-2neg84.4%

        \[\leadsto \frac{v}{u} \cdot \color{blue}{\frac{-t1}{-\left(\left(-u\right) - t1\right)}} \]
      8. associate-*r/87.1%

        \[\leadsto \color{blue}{\frac{\frac{v}{u} \cdot \left(-t1\right)}{-\left(\left(-u\right) - t1\right)}} \]
      9. sub-neg87.1%

        \[\leadsto \frac{\frac{v}{u} \cdot \left(-t1\right)}{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      10. distribute-neg-in87.1%

        \[\leadsto \frac{\frac{v}{u} \cdot \left(-t1\right)}{-\color{blue}{\left(-\left(u + t1\right)\right)}} \]
      11. +-commutative87.1%

        \[\leadsto \frac{\frac{v}{u} \cdot \left(-t1\right)}{-\left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      12. remove-double-neg87.1%

        \[\leadsto \frac{\frac{v}{u} \cdot \left(-t1\right)}{\color{blue}{t1 + u}} \]
    7. Applied egg-rr87.1%

      \[\leadsto \color{blue}{\frac{\frac{v}{u} \cdot \left(-t1\right)}{t1 + u}} \]

    if -1.5e-11 < u < 1.64999999999999999e-27

    1. Initial program 59.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*58.7%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out58.7%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in58.7%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*75.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac275.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified75.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 86.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/86.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-186.5%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified86.5%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]

    if 1.64999999999999999e-27 < u < 5.49999999999999989e43

    1. Initial program 78.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*79.0%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out79.0%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in79.0%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*87.5%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac287.5%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified87.5%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 66.1%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]

    if 5.49999999999999989e43 < u < 8.99999999999999953e120

    1. Initial program 60.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*57.3%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out57.3%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in57.3%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*75.4%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac275.4%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified75.4%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num99.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.9%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times99.9%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity99.9%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg99.9%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg99.9%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in99.9%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative99.9%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg99.9%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt44.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod50.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg50.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod20.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt22.6%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt1.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod47.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 71.6%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative71.6%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified71.6%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification83.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\ \mathbf{elif}\;u \leq 1.65 \cdot 10^{-27}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 5.5 \cdot 10^{+43}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;u \leq 9 \cdot 10^{+120}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 90.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -3.9 \cdot 10^{+180}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;t1 \leq 5.4 \cdot 10^{+105}:\\ \;\;\;\;t1 \cdot \frac{\frac{-v}{t1 + u}}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= t1 -3.9e+180)
   (- (/ v t1))
   (if (<= t1 5.4e+105)
     (* t1 (/ (/ (- v) (+ t1 u)) (+ t1 u)))
     (/ v (- (* u (- 2.0)) t1)))))
double code(double u, double v, double t1) {
	double tmp;
	if (t1 <= -3.9e+180) {
		tmp = -(v / t1);
	} else if (t1 <= 5.4e+105) {
		tmp = t1 * ((-v / (t1 + u)) / (t1 + u));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if (t1 <= (-3.9d+180)) then
        tmp = -(v / t1)
    else if (t1 <= 5.4d+105) then
        tmp = t1 * ((-v / (t1 + u)) / (t1 + u))
    else
        tmp = v / ((u * -2.0d0) - t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (t1 <= -3.9e+180) {
		tmp = -(v / t1);
	} else if (t1 <= 5.4e+105) {
		tmp = t1 * ((-v / (t1 + u)) / (t1 + u));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if t1 <= -3.9e+180:
		tmp = -(v / t1)
	elif t1 <= 5.4e+105:
		tmp = t1 * ((-v / (t1 + u)) / (t1 + u))
	else:
		tmp = v / ((u * -2.0) - t1)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (t1 <= -3.9e+180)
		tmp = Float64(-Float64(v / t1));
	elseif (t1 <= 5.4e+105)
		tmp = Float64(t1 * Float64(Float64(Float64(-v) / Float64(t1 + u)) / Float64(t1 + u)));
	else
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (t1 <= -3.9e+180)
		tmp = -(v / t1);
	elseif (t1 <= 5.4e+105)
		tmp = t1 * ((-v / (t1 + u)) / (t1 + u));
	else
		tmp = v / ((u * -2.0) - t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[t1, -3.9e+180], (-N[(v / t1), $MachinePrecision]), If[LessEqual[t1, 5.4e+105], N[(t1 * N[(N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.9 \cdot 10^{+180}:\\
\;\;\;\;-\frac{v}{t1}\\

\mathbf{elif}\;t1 \leq 5.4 \cdot 10^{+105}:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{t1 + u}}{t1 + u}\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -3.9000000000000001e180

    1. Initial program 17.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*20.1%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out20.1%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in20.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*54.3%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac254.3%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified54.3%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 91.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/91.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-191.3%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified91.3%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]

    if -3.9000000000000001e180 < t1 < 5.40000000000000033e105

    1. Initial program 82.2%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*81.1%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out81.1%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in81.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*89.2%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac289.2%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing

    if 5.40000000000000033e105 < t1

    1. Initial program 34.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*33.5%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out33.5%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in33.5%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*67.7%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac267.7%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified67.7%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative100.0%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in100.0%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg100.0%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num100.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg100.0%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times97.2%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity97.2%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg97.2%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg97.2%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in97.2%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative97.2%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg97.2%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt0.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod7.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg7.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod23.8%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt23.8%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt5.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod38.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr97.2%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 97.2%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative97.2%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified97.2%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.9 \cdot 10^{+180}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;t1 \leq 5.4 \cdot 10^{+105}:\\ \;\;\;\;t1 \cdot \frac{\frac{-v}{t1 + u}}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 68.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -1.52 \cdot 10^{+124} \lor \neg \left(u \leq 1.35 \cdot 10^{+163}\right):\\ \;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{u}{v}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= u -1.52e+124) (not (<= u 1.35e+163)))
   (/ t1 (* (+ t1 u) (/ u v)))
   (/ v (- (* u (- 2.0)) t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -1.52e+124) || !(u <= 1.35e+163)) {
		tmp = t1 / ((t1 + u) * (u / v));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if ((u <= (-1.52d+124)) .or. (.not. (u <= 1.35d+163))) then
        tmp = t1 / ((t1 + u) * (u / v))
    else
        tmp = v / ((u * -2.0d0) - t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -1.52e+124) || !(u <= 1.35e+163)) {
		tmp = t1 / ((t1 + u) * (u / v));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -1.52e+124) or not (u <= 1.35e+163):
		tmp = t1 / ((t1 + u) * (u / v))
	else:
		tmp = v / ((u * -2.0) - t1)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -1.52e+124) || !(u <= 1.35e+163))
		tmp = Float64(t1 / Float64(Float64(t1 + u) * Float64(u / v)));
	else
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -1.52e+124) || ~((u <= 1.35e+163)))
		tmp = t1 / ((t1 + u) * (u / v));
	else
		tmp = v / ((u * -2.0) - t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.52e+124], N[Not[LessEqual[u, 1.35e+163]], $MachinePrecision]], N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.52 \cdot 10^{+124} \lor \neg \left(u \leq 1.35 \cdot 10^{+163}\right):\\
\;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{u}{v}}\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.51999999999999998e124 or 1.35e163 < u

    1. Initial program 73.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*73.6%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out73.6%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in73.6%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*86.5%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac286.5%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified86.5%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 86.4%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/93.7%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative93.7%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in93.7%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg93.7%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/92.4%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative92.4%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. clear-num93.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \cdot \frac{t1}{\left(-u\right) - t1} \]
      8. frac-times84.8%

        \[\leadsto \color{blue}{\frac{1 \cdot t1}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)}} \]
      9. *-un-lft-identity84.8%

        \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)} \]
      10. sub-neg84.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      11. distribute-neg-in84.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(-\left(u + t1\right)\right)}} \]
      12. +-commutative84.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      13. add-sqr-sqrt45.5%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      14. sqrt-unprod73.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      15. sqr-neg73.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      16. sqrt-unprod29.9%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{t1 + u} \cdot \sqrt{t1 + u}\right)}} \]
      17. add-sqr-sqrt70.3%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(t1 + u\right)}} \]
    7. Applied egg-rr70.3%

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot \left(t1 + u\right)}} \]

    if -1.51999999999999998e124 < u < 1.35e163

    1. Initial program 65.6%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*64.7%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out64.7%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in64.7%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*80.2%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac280.2%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified80.2%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.4%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/98.4%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num98.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg98.3%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times98.3%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity98.3%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg98.3%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg98.3%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in98.3%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative98.3%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg98.3%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt47.5%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod35.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg35.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod8.8%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt18.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt7.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod46.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr98.3%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 70.3%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative70.3%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified70.3%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.52 \cdot 10^{+124} \lor \neg \left(u \leq 1.35 \cdot 10^{+163}\right):\\ \;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{u}{v}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 68.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -2 \cdot 10^{+118} \lor \neg \left(u \leq 7.8 \cdot 10^{+170}\right):\\ \;\;\;\;\frac{v}{u \cdot \frac{t1 + u}{t1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= u -2e+118) (not (<= u 7.8e+170)))
   (/ v (* u (/ (+ t1 u) t1)))
   (/ v (- (* u (- 2.0)) t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -2e+118) || !(u <= 7.8e+170)) {
		tmp = v / (u * ((t1 + u) / t1));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if ((u <= (-2d+118)) .or. (.not. (u <= 7.8d+170))) then
        tmp = v / (u * ((t1 + u) / t1))
    else
        tmp = v / ((u * -2.0d0) - t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -2e+118) || !(u <= 7.8e+170)) {
		tmp = v / (u * ((t1 + u) / t1));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -2e+118) or not (u <= 7.8e+170):
		tmp = v / (u * ((t1 + u) / t1))
	else:
		tmp = v / ((u * -2.0) - t1)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -2e+118) || !(u <= 7.8e+170))
		tmp = Float64(v / Float64(u * Float64(Float64(t1 + u) / t1)));
	else
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -2e+118) || ~((u <= 7.8e+170)))
		tmp = v / (u * ((t1 + u) / t1));
	else
		tmp = v / ((u * -2.0) - t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2e+118], N[Not[LessEqual[u, 7.8e+170]], $MachinePrecision]], N[(v / N[(u * N[(N[(t1 + u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2 \cdot 10^{+118} \lor \neg \left(u \leq 7.8 \cdot 10^{+170}\right):\\
\;\;\;\;\frac{v}{u \cdot \frac{t1 + u}{t1}}\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.99999999999999993e118 or 7.8000000000000005e170 < u

    1. Initial program 73.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*73.5%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out73.5%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in73.5%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*86.5%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac286.5%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified86.5%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 86.4%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/94.4%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative94.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in94.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg94.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/93.1%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. clear-num93.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{u} \]
      7. frac-times75.5%

        \[\leadsto \color{blue}{\frac{1 \cdot v}{\frac{\left(-u\right) - t1}{t1} \cdot u}} \]
      8. *-un-lft-identity75.5%

        \[\leadsto \frac{\color{blue}{v}}{\frac{\left(-u\right) - t1}{t1} \cdot u} \]
      9. sub-neg75.5%

        \[\leadsto \frac{v}{\frac{\color{blue}{\left(-u\right) + \left(-t1\right)}}{t1} \cdot u} \]
      10. distribute-neg-in75.5%

        \[\leadsto \frac{v}{\frac{\color{blue}{-\left(u + t1\right)}}{t1} \cdot u} \]
      11. +-commutative75.5%

        \[\leadsto \frac{v}{\frac{-\color{blue}{\left(t1 + u\right)}}{t1} \cdot u} \]
      12. add-sqr-sqrt42.9%

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}}}{t1} \cdot u} \]
      13. sqrt-unprod71.8%

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}}{t1} \cdot u} \]
      14. sqr-neg71.8%

        \[\leadsto \frac{v}{\frac{\sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}}{t1} \cdot u} \]
      15. sqrt-unprod30.0%

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}}{t1} \cdot u} \]
      16. add-sqr-sqrt69.1%

        \[\leadsto \frac{v}{\frac{\color{blue}{t1 + u}}{t1} \cdot u} \]
    7. Applied egg-rr69.1%

      \[\leadsto \color{blue}{\frac{v}{\frac{t1 + u}{t1} \cdot u}} \]

    if -1.99999999999999993e118 < u < 7.8000000000000005e170

    1. Initial program 65.6%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*64.7%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out64.7%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in64.7%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*80.2%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac280.2%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified80.2%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.4%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.4%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/98.4%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num98.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg98.3%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times98.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity98.8%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg98.8%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg98.8%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in98.8%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative98.8%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg98.8%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt48.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod35.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg35.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod8.8%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt18.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt7.6%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod46.5%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr98.8%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 70.8%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative70.8%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified70.8%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2 \cdot 10^{+118} \lor \neg \left(u \leq 7.8 \cdot 10^{+170}\right):\\ \;\;\;\;\frac{v}{u \cdot \frac{t1 + u}{t1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 63.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -3.9 \cdot 10^{-190}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 2.15 \cdot 10^{-268}:\\ \;\;\;\;\frac{1}{t1} \cdot \frac{t1}{\frac{u}{v}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= t1 -3.9e-190)
   (/ (- v) (+ t1 u))
   (if (<= t1 2.15e-268)
     (* (/ 1.0 t1) (/ t1 (/ u v)))
     (/ v (- (* u (- 2.0)) t1)))))
double code(double u, double v, double t1) {
	double tmp;
	if (t1 <= -3.9e-190) {
		tmp = -v / (t1 + u);
	} else if (t1 <= 2.15e-268) {
		tmp = (1.0 / t1) * (t1 / (u / v));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if (t1 <= (-3.9d-190)) then
        tmp = -v / (t1 + u)
    else if (t1 <= 2.15d-268) then
        tmp = (1.0d0 / t1) * (t1 / (u / v))
    else
        tmp = v / ((u * -2.0d0) - t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (t1 <= -3.9e-190) {
		tmp = -v / (t1 + u);
	} else if (t1 <= 2.15e-268) {
		tmp = (1.0 / t1) * (t1 / (u / v));
	} else {
		tmp = v / ((u * -2.0) - t1);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if t1 <= -3.9e-190:
		tmp = -v / (t1 + u)
	elif t1 <= 2.15e-268:
		tmp = (1.0 / t1) * (t1 / (u / v))
	else:
		tmp = v / ((u * -2.0) - t1)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (t1 <= -3.9e-190)
		tmp = Float64(Float64(-v) / Float64(t1 + u));
	elseif (t1 <= 2.15e-268)
		tmp = Float64(Float64(1.0 / t1) * Float64(t1 / Float64(u / v)));
	else
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (t1 <= -3.9e-190)
		tmp = -v / (t1 + u);
	elseif (t1 <= 2.15e-268)
		tmp = (1.0 / t1) * (t1 / (u / v));
	else
		tmp = v / ((u * -2.0) - t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[t1, -3.9e-190], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.15e-268], N[(N[(1.0 / t1), $MachinePrecision] * N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.9 \cdot 10^{-190}:\\
\;\;\;\;\frac{-v}{t1 + u}\\

\mathbf{elif}\;t1 \leq 2.15 \cdot 10^{-268}:\\
\;\;\;\;\frac{1}{t1} \cdot \frac{t1}{\frac{u}{v}}\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -3.89999999999999995e-190

    1. Initial program 64.3%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*61.9%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out61.9%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in61.9%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*76.8%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac276.8%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified76.8%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. distribute-frac-neg276.8%

        \[\leadsto t1 \cdot \color{blue}{\left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)} \]
      2. distribute-rgt-neg-out76.8%

        \[\leadsto \color{blue}{-t1 \cdot \frac{\frac{v}{t1 + u}}{t1 + u}} \]
      3. associate-/r*61.9%

        \[\leadsto -t1 \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      4. distribute-lft-neg-out61.9%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      5. associate-/l*64.3%

        \[\leadsto \color{blue}{\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      6. times-frac99.9%

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
      7. frac-2neg99.9%

        \[\leadsto \frac{-t1}{t1 + u} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{\frac{-t1}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)}} \]
      9. add-sqr-sqrt99.2%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      10. sqrt-unprod65.7%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      11. sqr-neg65.7%

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      12. sqrt-unprod0.0%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      13. add-sqr-sqrt28.6%

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt18.3%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}}} \]
      15. sqrt-unprod33.0%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      16. sqr-neg33.0%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      17. sqrt-prod17.8%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}} \]
      18. add-sqr-sqrt99.9%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{t1 + u}} \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}} \]
    7. Taylor expanded in t1 around inf 69.0%

      \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \]
    8. Step-by-step derivation
      1. mul-1-neg69.0%

        \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    9. Simplified69.0%

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]

    if -3.89999999999999995e-190 < t1 < 2.15e-268

    1. Initial program 82.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*80.9%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out80.9%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in80.9%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*86.4%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac286.4%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified86.4%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 83.4%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/91.5%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative91.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in91.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg91.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/83.6%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative83.6%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. clear-num83.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \cdot \frac{t1}{\left(-u\right) - t1} \]
      8. frac-times83.4%

        \[\leadsto \color{blue}{\frac{1 \cdot t1}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)}} \]
      9. *-un-lft-identity83.4%

        \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)} \]
      10. sub-neg83.4%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      11. distribute-neg-in83.4%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(-\left(u + t1\right)\right)}} \]
      12. +-commutative83.4%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      13. add-sqr-sqrt40.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      14. sqrt-unprod74.6%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      15. sqr-neg74.6%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      16. sqrt-unprod34.5%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{t1 + u} \cdot \sqrt{t1 + u}\right)}} \]
      17. add-sqr-sqrt61.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(t1 + u\right)}} \]
    7. Applied egg-rr61.8%

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot \left(t1 + u\right)}} \]
    8. Taylor expanded in u around 0 20.3%

      \[\leadsto \frac{t1}{\color{blue}{\frac{t1 \cdot u}{v}}} \]
    9. Step-by-step derivation
      1. associate-*r/20.5%

        \[\leadsto \frac{t1}{\color{blue}{t1 \cdot \frac{u}{v}}} \]
    10. Simplified20.5%

      \[\leadsto \frac{t1}{\color{blue}{t1 \cdot \frac{u}{v}}} \]
    11. Step-by-step derivation
      1. *-un-lft-identity20.5%

        \[\leadsto \frac{\color{blue}{1 \cdot t1}}{t1 \cdot \frac{u}{v}} \]
      2. times-frac47.8%

        \[\leadsto \color{blue}{\frac{1}{t1} \cdot \frac{t1}{\frac{u}{v}}} \]
    12. Applied egg-rr47.8%

      \[\leadsto \color{blue}{\frac{1}{t1} \cdot \frac{t1}{\frac{u}{v}}} \]

    if 2.15e-268 < t1

    1. Initial program 66.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*67.9%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out67.9%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in67.9%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*85.4%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac285.4%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified85.4%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.8%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num99.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.8%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times96.6%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity96.6%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg96.6%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg96.6%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in96.6%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative96.6%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg96.6%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt0.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod24.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg24.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod29.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt29.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt12.2%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod67.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr96.6%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 69.9%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative69.9%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified69.9%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.9 \cdot 10^{-190}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 2.15 \cdot 10^{-268}:\\ \;\;\;\;\frac{1}{t1} \cdot \frac{t1}{\frac{u}{v}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 57.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -1.4 \cdot 10^{+142} \lor \neg \left(u \leq 1.7 \cdot 10^{+191}\right):\\ \;\;\;\;\frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;-\frac{v}{t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= u -1.4e+142) (not (<= u 1.7e+191))) (/ v u) (- (/ v t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -1.4e+142) || !(u <= 1.7e+191)) {
		tmp = v / u;
	} else {
		tmp = -(v / t1);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if ((u <= (-1.4d+142)) .or. (.not. (u <= 1.7d+191))) then
        tmp = v / u
    else
        tmp = -(v / t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -1.4e+142) || !(u <= 1.7e+191)) {
		tmp = v / u;
	} else {
		tmp = -(v / t1);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -1.4e+142) or not (u <= 1.7e+191):
		tmp = v / u
	else:
		tmp = -(v / t1)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -1.4e+142) || !(u <= 1.7e+191))
		tmp = Float64(v / u);
	else
		tmp = Float64(-Float64(v / t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -1.4e+142) || ~((u <= 1.7e+191)))
		tmp = v / u;
	else
		tmp = -(v / t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.4e+142], N[Not[LessEqual[u, 1.7e+191]], $MachinePrecision]], N[(v / u), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+142} \lor \neg \left(u \leq 1.7 \cdot 10^{+191}\right):\\
\;\;\;\;\frac{v}{u}\\

\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.4e142 or 1.70000000000000004e191 < u

    1. Initial program 74.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*75.2%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out75.2%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in75.2%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*88.5%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac288.5%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified88.5%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 88.3%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/96.6%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative96.6%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in96.6%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg96.6%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/96.6%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative96.6%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. clear-num96.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \cdot \frac{t1}{\left(-u\right) - t1} \]
      8. frac-times87.1%

        \[\leadsto \color{blue}{\frac{1 \cdot t1}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)}} \]
      9. *-un-lft-identity87.1%

        \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)} \]
      10. sub-neg87.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      11. distribute-neg-in87.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(-\left(u + t1\right)\right)}} \]
      12. +-commutative87.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      13. add-sqr-sqrt47.0%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      14. sqrt-unprod75.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      15. sqr-neg75.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      16. sqrt-unprod30.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{t1 + u} \cdot \sqrt{t1 + u}\right)}} \]
      17. add-sqr-sqrt73.5%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(t1 + u\right)}} \]
    7. Applied egg-rr73.5%

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot \left(t1 + u\right)}} \]
    8. Taylor expanded in t1 around inf 40.7%

      \[\leadsto \color{blue}{\frac{v}{u}} \]

    if -1.4e142 < u < 1.70000000000000004e191

    1. Initial program 65.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*64.5%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out64.5%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in64.5%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*79.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac279.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified79.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 68.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/68.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-168.0%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified68.0%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.4 \cdot 10^{+142} \lor \neg \left(u \leq 1.7 \cdot 10^{+191}\right):\\ \;\;\;\;\frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;-\frac{v}{t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 57.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -1.1 \cdot 10^{+142}:\\ \;\;\;\;\frac{v}{-u}\\ \mathbf{elif}\;u \leq 1.5 \cdot 10^{+191}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u -1.1e+142) (/ v (- u)) (if (<= u 1.5e+191) (- (/ v t1)) (/ v u))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= -1.1e+142) {
		tmp = v / -u;
	} else if (u <= 1.5e+191) {
		tmp = -(v / t1);
	} else {
		tmp = v / u;
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if (u <= (-1.1d+142)) then
        tmp = v / -u
    else if (u <= 1.5d+191) then
        tmp = -(v / t1)
    else
        tmp = v / u
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (u <= -1.1e+142) {
		tmp = v / -u;
	} else if (u <= 1.5e+191) {
		tmp = -(v / t1);
	} else {
		tmp = v / u;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= -1.1e+142:
		tmp = v / -u
	elif u <= 1.5e+191:
		tmp = -(v / t1)
	else:
		tmp = v / u
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= -1.1e+142)
		tmp = Float64(v / Float64(-u));
	elseif (u <= 1.5e+191)
		tmp = Float64(-Float64(v / t1));
	else
		tmp = Float64(v / u);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= -1.1e+142)
		tmp = v / -u;
	elseif (u <= 1.5e+191)
		tmp = -(v / t1);
	else
		tmp = v / u;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, -1.1e+142], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 1.5e+191], (-N[(v / t1), $MachinePrecision]), N[(v / u), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.1 \cdot 10^{+142}:\\
\;\;\;\;\frac{v}{-u}\\

\mathbf{elif}\;u \leq 1.5 \cdot 10^{+191}:\\
\;\;\;\;-\frac{v}{t1}\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -1.09999999999999993e142

    1. Initial program 76.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*77.6%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out77.6%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in77.6%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*82.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac282.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified82.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 82.5%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Taylor expanded in t1 around inf 46.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{u}} \]
    7. Step-by-step derivation
      1. associate-*r/46.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{u}} \]
      2. mul-1-neg46.8%

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    8. Simplified46.8%

      \[\leadsto \color{blue}{\frac{-v}{u}} \]

    if -1.09999999999999993e142 < u < 1.4999999999999999e191

    1. Initial program 65.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*64.5%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out64.5%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in64.5%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*79.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac279.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified79.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 68.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/68.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-168.0%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified68.0%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]

    if 1.4999999999999999e191 < u

    1. Initial program 71.2%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*72.1%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out72.1%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in72.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*96.0%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac296.0%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 96.0%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.8%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative99.8%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. clear-num99.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \cdot \frac{t1}{\left(-u\right) - t1} \]
      8. frac-times93.2%

        \[\leadsto \color{blue}{\frac{1 \cdot t1}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)}} \]
      9. *-un-lft-identity93.2%

        \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)} \]
      10. sub-neg93.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      11. distribute-neg-in93.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(-\left(u + t1\right)\right)}} \]
      12. +-commutative93.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      13. add-sqr-sqrt0.0%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      14. sqrt-unprod72.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      15. sqr-neg72.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      16. sqrt-unprod71.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{t1 + u} \cdot \sqrt{t1 + u}\right)}} \]
      17. add-sqr-sqrt71.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(t1 + u\right)}} \]
    7. Applied egg-rr71.8%

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot \left(t1 + u\right)}} \]
    8. Taylor expanded in t1 around inf 33.4%

      \[\leadsto \color{blue}{\frac{v}{u}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.1 \cdot 10^{+142}:\\ \;\;\;\;\frac{v}{-u}\\ \mathbf{elif}\;u \leq 1.5 \cdot 10^{+191}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 57.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -1.45 \cdot 10^{+142}:\\ \;\;\;\;\frac{v \cdot -0.5}{u}\\ \mathbf{elif}\;u \leq 1.8 \cdot 10^{+191}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u -1.45e+142)
   (/ (* v -0.5) u)
   (if (<= u 1.8e+191) (- (/ v t1)) (/ v u))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= -1.45e+142) {
		tmp = (v * -0.5) / u;
	} else if (u <= 1.8e+191) {
		tmp = -(v / t1);
	} else {
		tmp = v / u;
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if (u <= (-1.45d+142)) then
        tmp = (v * (-0.5d0)) / u
    else if (u <= 1.8d+191) then
        tmp = -(v / t1)
    else
        tmp = v / u
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (u <= -1.45e+142) {
		tmp = (v * -0.5) / u;
	} else if (u <= 1.8e+191) {
		tmp = -(v / t1);
	} else {
		tmp = v / u;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= -1.45e+142:
		tmp = (v * -0.5) / u
	elif u <= 1.8e+191:
		tmp = -(v / t1)
	else:
		tmp = v / u
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= -1.45e+142)
		tmp = Float64(Float64(v * -0.5) / u);
	elseif (u <= 1.8e+191)
		tmp = Float64(-Float64(v / t1));
	else
		tmp = Float64(v / u);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= -1.45e+142)
		tmp = (v * -0.5) / u;
	elseif (u <= 1.8e+191)
		tmp = -(v / t1);
	else
		tmp = v / u;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, -1.45e+142], N[(N[(v * -0.5), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[u, 1.8e+191], (-N[(v / t1), $MachinePrecision]), N[(v / u), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.45 \cdot 10^{+142}:\\
\;\;\;\;\frac{v \cdot -0.5}{u}\\

\mathbf{elif}\;u \leq 1.8 \cdot 10^{+191}:\\
\;\;\;\;-\frac{v}{t1}\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -1.45000000000000007e142

    1. Initial program 76.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*77.6%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out77.6%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in77.6%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*82.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac282.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified82.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num99.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.9%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times85.5%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity85.5%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg85.5%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg85.5%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in85.5%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative85.5%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg85.5%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt43.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod74.2%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg74.2%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod38.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt74.8%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt74.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod74.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr85.5%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 52.1%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative52.1%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified52.1%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
    10. Taylor expanded in t1 around 0 46.8%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{v}{u}} \]
    11. Step-by-step derivation
      1. *-commutative46.8%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot -0.5} \]
      2. associate-*l/46.8%

        \[\leadsto \color{blue}{\frac{v \cdot -0.5}{u}} \]
    12. Simplified46.8%

      \[\leadsto \color{blue}{\frac{v \cdot -0.5}{u}} \]

    if -1.45000000000000007e142 < u < 1.8e191

    1. Initial program 65.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*64.5%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out64.5%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in64.5%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*79.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac279.9%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified79.9%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 68.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/68.0%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-168.0%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified68.0%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]

    if 1.8e191 < u

    1. Initial program 71.2%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*72.1%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out72.1%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in72.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*96.0%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac296.0%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 96.0%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.8%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.8%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative99.8%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. clear-num99.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \cdot \frac{t1}{\left(-u\right) - t1} \]
      8. frac-times93.2%

        \[\leadsto \color{blue}{\frac{1 \cdot t1}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)}} \]
      9. *-un-lft-identity93.2%

        \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)} \]
      10. sub-neg93.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      11. distribute-neg-in93.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(-\left(u + t1\right)\right)}} \]
      12. +-commutative93.2%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      13. add-sqr-sqrt0.0%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      14. sqrt-unprod72.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      15. sqr-neg72.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      16. sqrt-unprod71.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{t1 + u} \cdot \sqrt{t1 + u}\right)}} \]
      17. add-sqr-sqrt71.8%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(t1 + u\right)}} \]
    7. Applied egg-rr71.8%

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot \left(t1 + u\right)}} \]
    8. Taylor expanded in t1 around inf 33.4%

      \[\leadsto \color{blue}{\frac{v}{u}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.45 \cdot 10^{+142}:\\ \;\;\;\;\frac{v \cdot -0.5}{u}\\ \mathbf{elif}\;u \leq 1.8 \cdot 10^{+191}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 61.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq 3.4 \cdot 10^{+196}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{t1}{t1 \cdot u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u 3.4e+196) (/ v (- (* u (- 2.0)) t1)) (* v (/ t1 (* t1 u)))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= 3.4e+196) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = v * (t1 / (t1 * u));
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if (u <= 3.4d+196) then
        tmp = v / ((u * -2.0d0) - t1)
    else
        tmp = v * (t1 / (t1 * u))
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (u <= 3.4e+196) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = v * (t1 / (t1 * u));
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= 3.4e+196:
		tmp = v / ((u * -2.0) - t1)
	else:
		tmp = v * (t1 / (t1 * u))
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= 3.4e+196)
		tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1));
	else
		tmp = Float64(v * Float64(t1 / Float64(t1 * u)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= 3.4e+196)
		tmp = v / ((u * -2.0) - t1);
	else
		tmp = v * (t1 / (t1 * u));
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, 3.4e+196], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(t1 * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq 3.4 \cdot 10^{+196}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\

\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{t1 \cdot u}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < 3.4e196

    1. Initial program 67.2%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*66.4%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out66.4%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in66.4%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*80.4%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac280.4%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified80.4%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.5%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.5%

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/98.3%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
      6. clear-num98.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg98.3%

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times95.2%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity95.2%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg95.2%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg95.2%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in95.2%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      13. +-commutative95.2%

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg95.2%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt47.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod41.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg41.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod13.6%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt28.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt18.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod50.5%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    6. Applied egg-rr95.2%

      \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
    7. Taylor expanded in t1 around inf 66.3%

      \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
    8. Step-by-step derivation
      1. *-commutative66.3%

        \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
    9. Simplified66.3%

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]

    if 3.4e196 < u

    1. Initial program 73.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*74.4%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out74.4%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in74.4%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*96.2%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac296.2%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified96.2%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 96.2%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.8%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative99.8%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. clear-num99.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \cdot \frac{t1}{\left(-u\right) - t1} \]
      8. frac-times96.3%

        \[\leadsto \color{blue}{\frac{1 \cdot t1}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)}} \]
      9. *-un-lft-identity96.3%

        \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)} \]
      10. sub-neg96.3%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      11. distribute-neg-in96.3%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(-\left(u + t1\right)\right)}} \]
      12. +-commutative96.3%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      13. add-sqr-sqrt0.0%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      14. sqrt-unprod74.4%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      15. sqr-neg74.4%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      16. sqrt-unprod74.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{t1 + u} \cdot \sqrt{t1 + u}\right)}} \]
      17. add-sqr-sqrt74.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(t1 + u\right)}} \]
    7. Applied egg-rr74.1%

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot \left(t1 + u\right)}} \]
    8. Taylor expanded in u around 0 52.6%

      \[\leadsto \frac{t1}{\color{blue}{\frac{t1 \cdot u}{v}}} \]
    9. Step-by-step derivation
      1. associate-*r/41.2%

        \[\leadsto \frac{t1}{\color{blue}{t1 \cdot \frac{u}{v}}} \]
    10. Simplified41.2%

      \[\leadsto \frac{t1}{\color{blue}{t1 \cdot \frac{u}{v}}} \]
    11. Step-by-step derivation
      1. associate-*r/52.6%

        \[\leadsto \frac{t1}{\color{blue}{\frac{t1 \cdot u}{v}}} \]
      2. associate-/r/52.6%

        \[\leadsto \color{blue}{\frac{t1}{t1 \cdot u} \cdot v} \]
    12. Applied egg-rr52.6%

      \[\leadsto \color{blue}{\frac{t1}{t1 \cdot u} \cdot v} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq 3.4 \cdot 10^{+196}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{t1}{t1 \cdot u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 61.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq 3.4 \cdot 10^{+196}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{t1}{t1 \cdot u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u 3.4e+196) (/ (- v) (+ t1 u)) (* v (/ t1 (* t1 u)))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= 3.4e+196) {
		tmp = -v / (t1 + u);
	} else {
		tmp = v * (t1 / (t1 * u));
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if (u <= 3.4d+196) then
        tmp = -v / (t1 + u)
    else
        tmp = v * (t1 / (t1 * u))
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (u <= 3.4e+196) {
		tmp = -v / (t1 + u);
	} else {
		tmp = v * (t1 / (t1 * u));
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= 3.4e+196:
		tmp = -v / (t1 + u)
	else:
		tmp = v * (t1 / (t1 * u))
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= 3.4e+196)
		tmp = Float64(Float64(-v) / Float64(t1 + u));
	else
		tmp = Float64(v * Float64(t1 / Float64(t1 * u)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= 3.4e+196)
		tmp = -v / (t1 + u);
	else
		tmp = v * (t1 / (t1 * u));
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, 3.4e+196], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(t1 * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq 3.4 \cdot 10^{+196}:\\
\;\;\;\;\frac{-v}{t1 + u}\\

\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{t1 \cdot u}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < 3.4e196

    1. Initial program 67.2%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*66.4%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out66.4%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in66.4%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*80.4%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac280.4%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified80.4%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. distribute-frac-neg280.4%

        \[\leadsto t1 \cdot \color{blue}{\left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)} \]
      2. distribute-rgt-neg-out80.4%

        \[\leadsto \color{blue}{-t1 \cdot \frac{\frac{v}{t1 + u}}{t1 + u}} \]
      3. associate-/r*66.4%

        \[\leadsto -t1 \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      4. distribute-lft-neg-out66.4%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      5. associate-/l*67.2%

        \[\leadsto \color{blue}{\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      6. times-frac98.3%

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
      7. frac-2neg98.3%

        \[\leadsto \frac{-t1}{t1 + u} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. associate-*r/98.7%

        \[\leadsto \color{blue}{\frac{\frac{-t1}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)}} \]
      9. add-sqr-sqrt50.1%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      10. sqrt-unprod43.6%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      11. sqr-neg43.6%

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      12. sqrt-unprod13.6%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      13. add-sqr-sqrt28.3%

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt18.3%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}}} \]
      15. sqrt-unprod50.5%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      16. sqr-neg50.5%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      17. sqrt-prod45.8%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}} \]
      18. add-sqr-sqrt98.7%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{t1 + u}} \]
    6. Applied egg-rr98.7%

      \[\leadsto \color{blue}{\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}} \]
    7. Taylor expanded in t1 around inf 66.2%

      \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \]
    8. Step-by-step derivation
      1. mul-1-neg66.2%

        \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    9. Simplified66.2%

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]

    if 3.4e196 < u

    1. Initial program 73.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*74.4%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out74.4%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in74.4%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*96.2%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac296.2%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified96.2%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around 0 96.2%

      \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
    6. Step-by-step derivation
      1. associate-*r/99.9%

        \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
      2. +-commutative99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
      4. sub-neg99.9%

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.8%

        \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
      6. *-commutative99.8%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
      7. clear-num99.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \cdot \frac{t1}{\left(-u\right) - t1} \]
      8. frac-times96.3%

        \[\leadsto \color{blue}{\frac{1 \cdot t1}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)}} \]
      9. *-un-lft-identity96.3%

        \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)} \]
      10. sub-neg96.3%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
      11. distribute-neg-in96.3%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(-\left(u + t1\right)\right)}} \]
      12. +-commutative96.3%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \left(-\color{blue}{\left(t1 + u\right)}\right)} \]
      13. add-sqr-sqrt0.0%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      14. sqrt-unprod74.4%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      15. sqr-neg74.4%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      16. sqrt-unprod74.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{t1 + u} \cdot \sqrt{t1 + u}\right)}} \]
      17. add-sqr-sqrt74.1%

        \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(t1 + u\right)}} \]
    7. Applied egg-rr74.1%

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot \left(t1 + u\right)}} \]
    8. Taylor expanded in u around 0 52.6%

      \[\leadsto \frac{t1}{\color{blue}{\frac{t1 \cdot u}{v}}} \]
    9. Step-by-step derivation
      1. associate-*r/41.2%

        \[\leadsto \frac{t1}{\color{blue}{t1 \cdot \frac{u}{v}}} \]
    10. Simplified41.2%

      \[\leadsto \frac{t1}{\color{blue}{t1 \cdot \frac{u}{v}}} \]
    11. Step-by-step derivation
      1. associate-*r/52.6%

        \[\leadsto \frac{t1}{\color{blue}{\frac{t1 \cdot u}{v}}} \]
      2. associate-/r/52.6%

        \[\leadsto \color{blue}{\frac{t1}{t1 \cdot u} \cdot v} \]
    12. Applied egg-rr52.6%

      \[\leadsto \color{blue}{\frac{t1}{t1 \cdot u} \cdot v} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq 3.4 \cdot 10^{+196}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{t1}{t1 \cdot u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 98.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{t1}{t1 + u} \cdot \frac{-v}{t1 + u} \end{array} \]
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
	return (t1 / (t1 + u)) * (-v / (t1 + u));
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = (t1 / (t1 + u)) * (-v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
	return (t1 / (t1 + u)) * (-v / (t1 + u));
}
def code(u, v, t1):
	return (t1 / (t1 + u)) * (-v / (t1 + u))
function code(u, v, t1)
	return Float64(Float64(t1 / Float64(t1 + u)) * Float64(Float64(-v) / Float64(t1 + u)))
end
function tmp = code(u, v, t1)
	tmp = (t1 / (t1 + u)) * (-v / (t1 + u));
end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{t1}{t1 + u} \cdot \frac{-v}{t1 + u}
\end{array}
Derivation
  1. Initial program 67.9%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. times-frac98.4%

      \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
    2. distribute-frac-neg98.4%

      \[\leadsto \color{blue}{\left(-\frac{t1}{t1 + u}\right)} \cdot \frac{v}{t1 + u} \]
    3. distribute-neg-frac298.4%

      \[\leadsto \color{blue}{\frac{t1}{-\left(t1 + u\right)}} \cdot \frac{v}{t1 + u} \]
    4. +-commutative98.4%

      \[\leadsto \frac{t1}{-\color{blue}{\left(u + t1\right)}} \cdot \frac{v}{t1 + u} \]
    5. distribute-neg-in98.4%

      \[\leadsto \frac{t1}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \cdot \frac{v}{t1 + u} \]
    6. unsub-neg98.4%

      \[\leadsto \frac{t1}{\color{blue}{\left(-u\right) - t1}} \cdot \frac{v}{t1 + u} \]
  3. Simplified98.4%

    \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
  4. Add Preprocessing
  5. Final simplification98.4%

    \[\leadsto \frac{t1}{t1 + u} \cdot \frac{-v}{t1 + u} \]
  6. Add Preprocessing

Alternative 17: 60.9% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \frac{-v}{t1 + u} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 u)))
double code(double u, double v, double t1) {
	return -v / (t1 + u);
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = -v / (t1 + u)
end function
public static double code(double u, double v, double t1) {
	return -v / (t1 + u);
}
def code(u, v, t1):
	return -v / (t1 + u)
function code(u, v, t1)
	return Float64(Float64(-v) / Float64(t1 + u))
end
function tmp = code(u, v, t1)
	tmp = -v / (t1 + u);
end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{-v}{t1 + u}
\end{array}
Derivation
  1. Initial program 67.9%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*67.2%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out67.2%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in67.2%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*82.0%

      \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
    5. distribute-neg-frac282.0%

      \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  3. Simplified82.0%

    \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. distribute-frac-neg282.0%

      \[\leadsto t1 \cdot \color{blue}{\left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)} \]
    2. distribute-rgt-neg-out82.0%

      \[\leadsto \color{blue}{-t1 \cdot \frac{\frac{v}{t1 + u}}{t1 + u}} \]
    3. associate-/r*67.2%

      \[\leadsto -t1 \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    4. distribute-lft-neg-out67.2%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    5. associate-/l*67.9%

      \[\leadsto \color{blue}{\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    6. times-frac98.4%

      \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
    7. frac-2neg98.4%

      \[\leadsto \frac{-t1}{t1 + u} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
    8. associate-*r/98.8%

      \[\leadsto \color{blue}{\frac{\frac{-t1}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)}} \]
    9. add-sqr-sqrt50.5%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    10. sqrt-unprod46.3%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    11. sqr-neg46.3%

      \[\leadsto \frac{\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    12. sqrt-unprod15.4%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    13. add-sqr-sqrt32.9%

      \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    14. add-sqr-sqrt16.4%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}}} \]
    15. sqrt-unprod52.9%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    16. sqr-neg52.9%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
    17. sqrt-prod51.3%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}} \]
    18. add-sqr-sqrt98.8%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{t1 + u}} \]
  6. Applied egg-rr98.8%

    \[\leadsto \color{blue}{\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}} \]
  7. Taylor expanded in t1 around inf 63.0%

    \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \]
  8. Step-by-step derivation
    1. mul-1-neg63.0%

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  9. Simplified63.0%

    \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  10. Final simplification63.0%

    \[\leadsto \frac{-v}{t1 + u} \]
  11. Add Preprocessing

Alternative 18: 17.0% accurate, 4.0× speedup?

\[\begin{array}{l} \\ \frac{v}{u} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ v u))
double code(double u, double v, double t1) {
	return v / u;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    code = v / u
end function
public static double code(double u, double v, double t1) {
	return v / u;
}
def code(u, v, t1):
	return v / u
function code(u, v, t1)
	return Float64(v / u)
end
function tmp = code(u, v, t1)
	tmp = v / u;
end
code[u_, v_, t1_] := N[(v / u), $MachinePrecision]
\begin{array}{l}

\\
\frac{v}{u}
\end{array}
Derivation
  1. Initial program 67.9%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*67.2%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out67.2%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in67.2%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*82.0%

      \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
    5. distribute-neg-frac282.0%

      \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  3. Simplified82.0%

    \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in t1 around 0 48.5%

    \[\leadsto t1 \cdot \frac{\color{blue}{\frac{v}{u}}}{-\left(t1 + u\right)} \]
  6. Step-by-step derivation
    1. associate-*r/50.5%

      \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{-\left(t1 + u\right)}} \]
    2. +-commutative50.5%

      \[\leadsto \frac{t1 \cdot \frac{v}{u}}{-\color{blue}{\left(u + t1\right)}} \]
    3. distribute-neg-in50.5%

      \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
    4. sub-neg50.5%

      \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{\left(-u\right) - t1}} \]
    5. associate-*l/49.4%

      \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}} \]
    6. *-commutative49.4%

      \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{t1}{\left(-u\right) - t1}} \]
    7. clear-num49.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \cdot \frac{t1}{\left(-u\right) - t1} \]
    8. frac-times48.1%

      \[\leadsto \color{blue}{\frac{1 \cdot t1}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)}} \]
    9. *-un-lft-identity48.1%

      \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot \left(\left(-u\right) - t1\right)} \]
    10. sub-neg48.1%

      \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}} \]
    11. distribute-neg-in48.1%

      \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(-\left(u + t1\right)\right)}} \]
    12. +-commutative48.1%

      \[\leadsto \frac{t1}{\frac{u}{v} \cdot \left(-\color{blue}{\left(t1 + u\right)}\right)} \]
    13. add-sqr-sqrt22.2%

      \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
    14. sqrt-unprod39.5%

      \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    15. sqr-neg39.5%

      \[\leadsto \frac{t1}{\frac{u}{v} \cdot \sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
    16. sqrt-unprod16.5%

      \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(\sqrt{t1 + u} \cdot \sqrt{t1 + u}\right)}} \]
    17. add-sqr-sqrt32.6%

      \[\leadsto \frac{t1}{\frac{u}{v} \cdot \color{blue}{\left(t1 + u\right)}} \]
  7. Applied egg-rr32.6%

    \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot \left(t1 + u\right)}} \]
  8. Taylor expanded in t1 around inf 15.5%

    \[\leadsto \color{blue}{\frac{v}{u}} \]
  9. Final simplification15.5%

    \[\leadsto \frac{v}{u} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024041 
(FPCore (u v t1)
  :name "Rosa's DopplerBench"
  :precision binary64
  (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))