Rosa's DopplerBench

Percentage Accurate: 73.4% → 98.2%
Time: 12.0s
Alternatives: 19
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 19 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: 73.4% 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: 98.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{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(Float64(t1 / Float64(t1 + u)) * 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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

    \[\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-neg279.3%

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

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

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

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

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

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

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

      \[\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-neg38.0%

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

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

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

      \[\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-unprod57.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-neg57.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-prod53.8%

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

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

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

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

Alternative 2: 90.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\ t_2 := \frac{-v}{t1 + u \cdot 2}\\ \mathbf{if}\;t1 \leq -2.5 \cdot 10^{+157}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-176}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 6 \cdot 10^{-248}:\\ \;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \frac{-u}{t1}}\\ \mathbf{elif}\;t1 \leq 2.75 \cdot 10^{+107}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* t1 (/ (/ v (+ t1 u)) (- (- u) t1))))
        (t_2 (/ (- v) (+ t1 (* u 2.0)))))
   (if (<= t1 -2.5e+157)
     t_2
     (if (<= t1 -1.65e-176)
       t_1
       (if (<= t1 6e-248)
         (/ v (* (+ t1 u) (/ (- u) t1)))
         (if (<= t1 2.75e+107) t_1 t_2))))))
double code(double u, double v, double t1) {
	double t_1 = t1 * ((v / (t1 + u)) / (-u - t1));
	double t_2 = -v / (t1 + (u * 2.0));
	double tmp;
	if (t1 <= -2.5e+157) {
		tmp = t_2;
	} else if (t1 <= -1.65e-176) {
		tmp = t_1;
	} else if (t1 <= 6e-248) {
		tmp = v / ((t1 + u) * (-u / t1));
	} else if (t1 <= 2.75e+107) {
		tmp = t_1;
	} 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 / (t1 + u)) / (-u - t1))
    t_2 = -v / (t1 + (u * 2.0d0))
    if (t1 <= (-2.5d+157)) then
        tmp = t_2
    else if (t1 <= (-1.65d-176)) then
        tmp = t_1
    else if (t1 <= 6d-248) then
        tmp = v / ((t1 + u) * (-u / t1))
    else if (t1 <= 2.75d+107) then
        tmp = t_1
    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 / (t1 + u)) / (-u - t1));
	double t_2 = -v / (t1 + (u * 2.0));
	double tmp;
	if (t1 <= -2.5e+157) {
		tmp = t_2;
	} else if (t1 <= -1.65e-176) {
		tmp = t_1;
	} else if (t1 <= 6e-248) {
		tmp = v / ((t1 + u) * (-u / t1));
	} else if (t1 <= 2.75e+107) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = t1 * ((v / (t1 + u)) / (-u - t1))
	t_2 = -v / (t1 + (u * 2.0))
	tmp = 0
	if t1 <= -2.5e+157:
		tmp = t_2
	elif t1 <= -1.65e-176:
		tmp = t_1
	elif t1 <= 6e-248:
		tmp = v / ((t1 + u) * (-u / t1))
	elif t1 <= 2.75e+107:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(u, v, t1)
	t_1 = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1)))
	t_2 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)))
	tmp = 0.0
	if (t1 <= -2.5e+157)
		tmp = t_2;
	elseif (t1 <= -1.65e-176)
		tmp = t_1;
	elseif (t1 <= 6e-248)
		tmp = Float64(v / Float64(Float64(t1 + u) * Float64(Float64(-u) / t1)));
	elseif (t1 <= 2.75e+107)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = t1 * ((v / (t1 + u)) / (-u - t1));
	t_2 = -v / (t1 + (u * 2.0));
	tmp = 0.0;
	if (t1 <= -2.5e+157)
		tmp = t_2;
	elseif (t1 <= -1.65e-176)
		tmp = t_1;
	elseif (t1 <= 6e-248)
		tmp = v / ((t1 + u) * (-u / t1));
	elseif (t1 <= 2.75e+107)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.5e+157], t$95$2, If[LessEqual[t1, -1.65e-176], t$95$1, If[LessEqual[t1, 6e-248], N[(v / N[(N[(t1 + u), $MachinePrecision] * N[((-u) / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.75e+107], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t1 \leq 2.75 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -2.49999999999999988e157 or 2.7500000000000002e107 < t1

    1. Initial program 44.2%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified60.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/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/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-times98.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod4.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-neg4.3%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt13.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-unprod46.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-rr98.1%

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

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

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

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

    if -2.49999999999999988e157 < t1 < -1.65000000000000006e-176 or 6.00000000000000027e-248 < t1 < 2.7500000000000002e107

    1. Initial program 84.2%

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

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

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

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

    if -1.65000000000000006e-176 < t1 < 6.00000000000000027e-248

    1. Initial program 71.4%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified81.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/89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod50.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-neg50.3%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt30.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-unprod60.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-rr99.7%

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

      \[\leadsto \frac{-v}{\color{blue}{\frac{u}{t1}} \cdot \left(t1 + u\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.5 \cdot 10^{+157}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-176}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq 6 \cdot 10^{-248}:\\ \;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \frac{-u}{t1}}\\ \mathbf{elif}\;t1 \leq 2.75 \cdot 10^{+107}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-u\right) - t1\\ t_2 := \frac{-v}{t1 + u \cdot 2}\\ \mathbf{if}\;t1 \leq -1.85 \cdot 10^{+158}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t1 \leq -1.46 \cdot 10^{-176}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\ \mathbf{elif}\;t1 \leq 2.8 \cdot 10^{-265}:\\ \;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \frac{-u}{t1}}\\ \mathbf{elif}\;t1 \leq 1.36 \cdot 10^{+104}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (- (- u) t1)) (t_2 (/ (- v) (+ t1 (* u 2.0)))))
   (if (<= t1 -1.85e+158)
     t_2
     (if (<= t1 -1.46e-176)
       (* t1 (/ (/ v (+ t1 u)) t_1))
       (if (<= t1 2.8e-265)
         (/ v (* (+ t1 u) (/ (- u) t1)))
         (if (<= t1 1.36e+104) (* v (/ t1 (* (+ t1 u) t_1))) t_2))))))
double code(double u, double v, double t1) {
	double t_1 = -u - t1;
	double t_2 = -v / (t1 + (u * 2.0));
	double tmp;
	if (t1 <= -1.85e+158) {
		tmp = t_2;
	} else if (t1 <= -1.46e-176) {
		tmp = t1 * ((v / (t1 + u)) / t_1);
	} else if (t1 <= 2.8e-265) {
		tmp = v / ((t1 + u) * (-u / t1));
	} else if (t1 <= 1.36e+104) {
		tmp = v * (t1 / ((t1 + u) * t_1));
	} 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 = -u - t1
    t_2 = -v / (t1 + (u * 2.0d0))
    if (t1 <= (-1.85d+158)) then
        tmp = t_2
    else if (t1 <= (-1.46d-176)) then
        tmp = t1 * ((v / (t1 + u)) / t_1)
    else if (t1 <= 2.8d-265) then
        tmp = v / ((t1 + u) * (-u / t1))
    else if (t1 <= 1.36d+104) then
        tmp = v * (t1 / ((t1 + u) * t_1))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -u - t1;
	double t_2 = -v / (t1 + (u * 2.0));
	double tmp;
	if (t1 <= -1.85e+158) {
		tmp = t_2;
	} else if (t1 <= -1.46e-176) {
		tmp = t1 * ((v / (t1 + u)) / t_1);
	} else if (t1 <= 2.8e-265) {
		tmp = v / ((t1 + u) * (-u / t1));
	} else if (t1 <= 1.36e+104) {
		tmp = v * (t1 / ((t1 + u) * t_1));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -u - t1
	t_2 = -v / (t1 + (u * 2.0))
	tmp = 0
	if t1 <= -1.85e+158:
		tmp = t_2
	elif t1 <= -1.46e-176:
		tmp = t1 * ((v / (t1 + u)) / t_1)
	elif t1 <= 2.8e-265:
		tmp = v / ((t1 + u) * (-u / t1))
	elif t1 <= 1.36e+104:
		tmp = v * (t1 / ((t1 + u) * t_1))
	else:
		tmp = t_2
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-u) - t1)
	t_2 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)))
	tmp = 0.0
	if (t1 <= -1.85e+158)
		tmp = t_2;
	elseif (t1 <= -1.46e-176)
		tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1));
	elseif (t1 <= 2.8e-265)
		tmp = Float64(v / Float64(Float64(t1 + u) * Float64(Float64(-u) / t1)));
	elseif (t1 <= 1.36e+104)
		tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * t_1)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -u - t1;
	t_2 = -v / (t1 + (u * 2.0));
	tmp = 0.0;
	if (t1 <= -1.85e+158)
		tmp = t_2;
	elseif (t1 <= -1.46e-176)
		tmp = t1 * ((v / (t1 + u)) / t_1);
	elseif (t1 <= 2.8e-265)
		tmp = v / ((t1 + u) * (-u / t1));
	elseif (t1 <= 1.36e+104)
		tmp = v * (t1 / ((t1 + u) * t_1));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, Block[{t$95$2 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.85e+158], t$95$2, If[LessEqual[t1, -1.46e-176], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.8e-265], N[(v / N[(N[(t1 + u), $MachinePrecision] * N[((-u) / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.36e+104], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -1.46 \cdot 10^{-176}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\

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

\mathbf{elif}\;t1 \leq 1.36 \cdot 10^{+104}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -1.85000000000000005e158 or 1.3599999999999999e104 < t1

    1. Initial program 44.5%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified60.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/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-times98.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-identity98.2%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg98.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-in98.2%

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod4.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-neg4.3%

        \[\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-sqrt30.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt13.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-unprod47.1%

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

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

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

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

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

    if -1.85000000000000005e158 < t1 < -1.46e-176

    1. Initial program 81.7%

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

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

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

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

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

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

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

    if -1.46e-176 < t1 < 2.80000000000000023e-265

    1. Initial program 65.9%

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

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

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

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

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

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

      \[\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/87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt29.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-unprod59.1%

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

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

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

    if 2.80000000000000023e-265 < t1 < 1.3599999999999999e104

    1. Initial program 87.4%

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

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

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

      \[\leadsto \color{blue}{v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    4. Add Preprocessing
  3. Recombined 4 regimes into one program.
  4. Final simplification91.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.85 \cdot 10^{+158}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \mathbf{elif}\;t1 \leq -1.46 \cdot 10^{-176}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq 2.8 \cdot 10^{-265}:\\ \;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \frac{-u}{t1}}\\ \mathbf{elif}\;t1 \leq 1.36 \cdot 10^{+104}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 78.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u \cdot 2}\\ t_2 := \frac{t1}{t1 + u}\\ \mathbf{if}\;t1 \leq -3.2 \cdot 10^{-31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq -8.6 \cdot 10^{-118}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq -1.7 \cdot 10^{-159}:\\ \;\;\;\;t\_2 \cdot \frac{v}{-t1}\\ \mathbf{elif}\;t1 \leq 1.35 \cdot 10^{-15}:\\ \;\;\;\;t\_2 \cdot \frac{v}{-u}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))) (t_2 (/ t1 (+ t1 u))))
   (if (<= t1 -3.2e-31)
     t_1
     (if (<= t1 -8.6e-118)
       (* t1 (/ (/ v u) (- (- u) t1)))
       (if (<= t1 -1.7e-159)
         (* t_2 (/ v (- t1)))
         (if (<= t1 1.35e-15) (* t_2 (/ v (- u))) t_1))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + (u * 2.0));
	double t_2 = t1 / (t1 + u);
	double tmp;
	if (t1 <= -3.2e-31) {
		tmp = t_1;
	} else if (t1 <= -8.6e-118) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (t1 <= -1.7e-159) {
		tmp = t_2 * (v / -t1);
	} else if (t1 <= 1.35e-15) {
		tmp = t_2 * (v / -u);
	} 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) :: t_2
    real(8) :: tmp
    t_1 = -v / (t1 + (u * 2.0d0))
    t_2 = t1 / (t1 + u)
    if (t1 <= (-3.2d-31)) then
        tmp = t_1
    else if (t1 <= (-8.6d-118)) then
        tmp = t1 * ((v / u) / (-u - t1))
    else if (t1 <= (-1.7d-159)) then
        tmp = t_2 * (v / -t1)
    else if (t1 <= 1.35d-15) then
        tmp = t_2 * (v / -u)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + (u * 2.0));
	double t_2 = t1 / (t1 + u);
	double tmp;
	if (t1 <= -3.2e-31) {
		tmp = t_1;
	} else if (t1 <= -8.6e-118) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (t1 <= -1.7e-159) {
		tmp = t_2 * (v / -t1);
	} else if (t1 <= 1.35e-15) {
		tmp = t_2 * (v / -u);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + (u * 2.0))
	t_2 = t1 / (t1 + u)
	tmp = 0
	if t1 <= -3.2e-31:
		tmp = t_1
	elif t1 <= -8.6e-118:
		tmp = t1 * ((v / u) / (-u - t1))
	elif t1 <= -1.7e-159:
		tmp = t_2 * (v / -t1)
	elif t1 <= 1.35e-15:
		tmp = t_2 * (v / -u)
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)))
	t_2 = Float64(t1 / Float64(t1 + u))
	tmp = 0.0
	if (t1 <= -3.2e-31)
		tmp = t_1;
	elseif (t1 <= -8.6e-118)
		tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1)));
	elseif (t1 <= -1.7e-159)
		tmp = Float64(t_2 * Float64(v / Float64(-t1)));
	elseif (t1 <= 1.35e-15)
		tmp = Float64(t_2 * Float64(v / Float64(-u)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + (u * 2.0));
	t_2 = t1 / (t1 + u);
	tmp = 0.0;
	if (t1 <= -3.2e-31)
		tmp = t_1;
	elseif (t1 <= -8.6e-118)
		tmp = t1 * ((v / u) / (-u - t1));
	elseif (t1 <= -1.7e-159)
		tmp = t_2 * (v / -t1);
	elseif (t1 <= 1.35e-15)
		tmp = t_2 * (v / -u);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.2e-31], t$95$1, If[LessEqual[t1, -8.6e-118], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.7e-159], N[(t$95$2 * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.35e-15], N[(t$95$2 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t1 \leq -1.7 \cdot 10^{-159}:\\
\;\;\;\;t\_2 \cdot \frac{v}{-t1}\\

\mathbf{elif}\;t1 \leq 1.35 \cdot 10^{-15}:\\
\;\;\;\;t\_2 \cdot \frac{v}{-u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -3.20000000000000018e-31 or 1.35000000000000005e-15 < t1

    1. Initial program 60.9%

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

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

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

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

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

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

      \[\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-times95.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-identity95.3%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg95.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-in95.3%

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod22.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-neg22.3%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt10.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-unprod50.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-rr95.3%

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

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

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

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

    if -3.20000000000000018e-31 < t1 < -8.60000000000000036e-118

    1. Initial program 84.4%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified99.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.6%

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

    if -8.60000000000000036e-118 < t1 < -1.69999999999999992e-159

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

    if -1.69999999999999992e-159 < t1 < 1.35000000000000005e-15

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{u}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.2 \cdot 10^{-31}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \mathbf{elif}\;t1 \leq -8.6 \cdot 10^{-118}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq -1.7 \cdot 10^{-159}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\ \mathbf{elif}\;t1 \leq 1.35 \cdot 10^{-15}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 77.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u \cdot 2}\\ \mathbf{if}\;t1 \leq -1.2 \cdot 10^{-31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq -2.05 \cdot 10^{-117}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq -1 \cdot 10^{-159}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\ \mathbf{elif}\;t1 \leq 1.9 \cdot 10^{-16}:\\ \;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \frac{-u}{t1}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))))
   (if (<= t1 -1.2e-31)
     t_1
     (if (<= t1 -2.05e-117)
       (* t1 (/ (/ v u) (- (- u) t1)))
       (if (<= t1 -1e-159)
         (* (/ t1 (+ t1 u)) (/ v (- t1)))
         (if (<= t1 1.9e-16) (/ v (* (+ t1 u) (/ (- u) t1))) t_1))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + (u * 2.0));
	double tmp;
	if (t1 <= -1.2e-31) {
		tmp = t_1;
	} else if (t1 <= -2.05e-117) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (t1 <= -1e-159) {
		tmp = (t1 / (t1 + u)) * (v / -t1);
	} else if (t1 <= 1.9e-16) {
		tmp = v / ((t1 + u) * (-u / 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 = -v / (t1 + (u * 2.0d0))
    if (t1 <= (-1.2d-31)) then
        tmp = t_1
    else if (t1 <= (-2.05d-117)) then
        tmp = t1 * ((v / u) / (-u - t1))
    else if (t1 <= (-1d-159)) then
        tmp = (t1 / (t1 + u)) * (v / -t1)
    else if (t1 <= 1.9d-16) then
        tmp = v / ((t1 + u) * (-u / t1))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + (u * 2.0));
	double tmp;
	if (t1 <= -1.2e-31) {
		tmp = t_1;
	} else if (t1 <= -2.05e-117) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (t1 <= -1e-159) {
		tmp = (t1 / (t1 + u)) * (v / -t1);
	} else if (t1 <= 1.9e-16) {
		tmp = v / ((t1 + u) * (-u / t1));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + (u * 2.0))
	tmp = 0
	if t1 <= -1.2e-31:
		tmp = t_1
	elif t1 <= -2.05e-117:
		tmp = t1 * ((v / u) / (-u - t1))
	elif t1 <= -1e-159:
		tmp = (t1 / (t1 + u)) * (v / -t1)
	elif t1 <= 1.9e-16:
		tmp = v / ((t1 + u) * (-u / t1))
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)))
	tmp = 0.0
	if (t1 <= -1.2e-31)
		tmp = t_1;
	elseif (t1 <= -2.05e-117)
		tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1)));
	elseif (t1 <= -1e-159)
		tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1)));
	elseif (t1 <= 1.9e-16)
		tmp = Float64(v / Float64(Float64(t1 + u) * Float64(Float64(-u) / t1)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + (u * 2.0));
	tmp = 0.0;
	if (t1 <= -1.2e-31)
		tmp = t_1;
	elseif (t1 <= -2.05e-117)
		tmp = t1 * ((v / u) / (-u - t1));
	elseif (t1 <= -1e-159)
		tmp = (t1 / (t1 + u)) * (v / -t1);
	elseif (t1 <= 1.9e-16)
		tmp = v / ((t1 + u) * (-u / t1));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.2e-31], t$95$1, If[LessEqual[t1, -2.05e-117], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1e-159], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.9e-16], N[(v / N[(N[(t1 + u), $MachinePrecision] * N[((-u) / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -1.2e-31 or 1.90000000000000006e-16 < t1

    1. Initial program 60.9%

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

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

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

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

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

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

      \[\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-times95.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-identity95.3%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg95.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-in95.3%

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod22.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-neg22.3%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt10.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-unprod50.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-rr95.3%

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

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

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

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

    if -1.2e-31 < t1 < -2.05000000000000016e-117

    1. Initial program 84.4%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified99.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.6%

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

    if -2.05000000000000016e-117 < t1 < -9.99999999999999989e-160

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

    if -9.99999999999999989e-160 < t1 < 1.90000000000000006e-16

    1. Initial program 80.6%

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

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

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

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

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

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

      \[\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/95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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-neg42.0%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt23.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-unprod70.2%

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

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

      \[\leadsto \frac{-v}{\color{blue}{\frac{u}{t1}} \cdot \left(t1 + u\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.2 \cdot 10^{-31}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \mathbf{elif}\;t1 \leq -2.05 \cdot 10^{-117}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq -1 \cdot 10^{-159}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\ \mathbf{elif}\;t1 \leq 1.9 \cdot 10^{-16}:\\ \;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \frac{-u}{t1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 77.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u \cdot 2}\\ \mathbf{if}\;t1 \leq -9.2 \cdot 10^{-32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq -3.4 \cdot 10^{-118}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq -1.6 \cdot 10^{-159}:\\ \;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{t1}{-v}}\\ \mathbf{elif}\;t1 \leq 1.9 \cdot 10^{-16}:\\ \;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \frac{-u}{t1}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))))
   (if (<= t1 -9.2e-32)
     t_1
     (if (<= t1 -3.4e-118)
       (* t1 (/ (/ v u) (- (- u) t1)))
       (if (<= t1 -1.6e-159)
         (/ (/ t1 (+ t1 u)) (/ t1 (- v)))
         (if (<= t1 1.9e-16) (/ v (* (+ t1 u) (/ (- u) t1))) t_1))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + (u * 2.0));
	double tmp;
	if (t1 <= -9.2e-32) {
		tmp = t_1;
	} else if (t1 <= -3.4e-118) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (t1 <= -1.6e-159) {
		tmp = (t1 / (t1 + u)) / (t1 / -v);
	} else if (t1 <= 1.9e-16) {
		tmp = v / ((t1 + u) * (-u / 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 = -v / (t1 + (u * 2.0d0))
    if (t1 <= (-9.2d-32)) then
        tmp = t_1
    else if (t1 <= (-3.4d-118)) then
        tmp = t1 * ((v / u) / (-u - t1))
    else if (t1 <= (-1.6d-159)) then
        tmp = (t1 / (t1 + u)) / (t1 / -v)
    else if (t1 <= 1.9d-16) then
        tmp = v / ((t1 + u) * (-u / t1))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + (u * 2.0));
	double tmp;
	if (t1 <= -9.2e-32) {
		tmp = t_1;
	} else if (t1 <= -3.4e-118) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (t1 <= -1.6e-159) {
		tmp = (t1 / (t1 + u)) / (t1 / -v);
	} else if (t1 <= 1.9e-16) {
		tmp = v / ((t1 + u) * (-u / t1));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + (u * 2.0))
	tmp = 0
	if t1 <= -9.2e-32:
		tmp = t_1
	elif t1 <= -3.4e-118:
		tmp = t1 * ((v / u) / (-u - t1))
	elif t1 <= -1.6e-159:
		tmp = (t1 / (t1 + u)) / (t1 / -v)
	elif t1 <= 1.9e-16:
		tmp = v / ((t1 + u) * (-u / t1))
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)))
	tmp = 0.0
	if (t1 <= -9.2e-32)
		tmp = t_1;
	elseif (t1 <= -3.4e-118)
		tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1)));
	elseif (t1 <= -1.6e-159)
		tmp = Float64(Float64(t1 / Float64(t1 + u)) / Float64(t1 / Float64(-v)));
	elseif (t1 <= 1.9e-16)
		tmp = Float64(v / Float64(Float64(t1 + u) * Float64(Float64(-u) / t1)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + (u * 2.0));
	tmp = 0.0;
	if (t1 <= -9.2e-32)
		tmp = t_1;
	elseif (t1 <= -3.4e-118)
		tmp = t1 * ((v / u) / (-u - t1));
	elseif (t1 <= -1.6e-159)
		tmp = (t1 / (t1 + u)) / (t1 / -v);
	elseif (t1 <= 1.9e-16)
		tmp = v / ((t1 + u) * (-u / t1));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -9.2e-32], t$95$1, If[LessEqual[t1, -3.4e-118], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.6e-159], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 / (-v)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.9e-16], N[(v / N[(N[(t1 + u), $MachinePrecision] * N[((-u) / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -9.2000000000000002e-32 or 1.90000000000000006e-16 < t1

    1. Initial program 60.9%

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

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

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

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

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

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

      \[\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-times95.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-identity95.3%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg95.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-in95.3%

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod22.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-neg22.3%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt10.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-unprod50.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-rr95.3%

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

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

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

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

    if -9.2000000000000002e-32 < t1 < -3.39999999999999991e-118

    1. Initial program 84.4%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified99.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.6%

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

    if -3.39999999999999991e-118 < t1 < -1.6e-159

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. *-commutative96.5%

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

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

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

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

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

        \[\leadsto \frac{-t1}{\frac{t1}{v} \cdot \color{blue}{\left(0 - \left(\left(-u\right) - t1\right)\right)}} \]
      7. add-sqr-sqrt34.4%

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

        \[\leadsto \frac{-t1}{\frac{t1}{v} \cdot \left(0 - \left(\color{blue}{\sqrt{\left(-u\right) \cdot \left(-u\right)}} - t1\right)\right)} \]
      9. sqr-neg75.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-t1}{\frac{t1}{v} \cdot \left(t1 + u\right)}} \]
    8. Step-by-step derivation
      1. *-commutative65.9%

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

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

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

    if -1.6e-159 < t1 < 1.90000000000000006e-16

    1. Initial program 80.6%

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

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

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

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

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

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

      \[\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/95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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-neg42.0%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt23.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-unprod70.2%

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

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

      \[\leadsto \frac{-v}{\color{blue}{\frac{u}{t1}} \cdot \left(t1 + u\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -9.2 \cdot 10^{-32}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \mathbf{elif}\;t1 \leq -3.4 \cdot 10^{-118}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq -1.6 \cdot 10^{-159}:\\ \;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{t1}{-v}}\\ \mathbf{elif}\;t1 \leq 1.9 \cdot 10^{-16}:\\ \;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \frac{-u}{t1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 77.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -1 \cdot 10^{+80}:\\ \;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{t1 - u}\\ \mathbf{elif}\;u \leq -1750000:\\ \;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\ \mathbf{elif}\;u \leq -7.6 \cdot 10^{-51}:\\ \;\;\;\;t1 \cdot \left(\frac{v}{u} \cdot \frac{-1}{u - t1}\right)\\ \mathbf{elif}\;u \leq 1.25 \cdot 10^{+21}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u -1e+80)
   (/ (/ t1 (/ u v)) (- t1 u))
   (if (<= u -1750000.0)
     (/ v (* t1 (/ (- u t1) t1)))
     (if (<= u -7.6e-51)
       (* t1 (* (/ v u) (/ -1.0 (- u t1))))
       (if (<= u 1.25e+21)
         (/ (- v) (+ t1 (* u 2.0)))
         (/ (* t1 (/ v (- u))) (+ t1 u)))))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= -1e+80) {
		tmp = (t1 / (u / v)) / (t1 - u);
	} else if (u <= -1750000.0) {
		tmp = v / (t1 * ((u - t1) / t1));
	} else if (u <= -7.6e-51) {
		tmp = t1 * ((v / u) * (-1.0 / (u - t1)));
	} else if (u <= 1.25e+21) {
		tmp = -v / (t1 + (u * 2.0));
	} else {
		tmp = (t1 * (v / -u)) / (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 <= (-1d+80)) then
        tmp = (t1 / (u / v)) / (t1 - u)
    else if (u <= (-1750000.0d0)) then
        tmp = v / (t1 * ((u - t1) / t1))
    else if (u <= (-7.6d-51)) then
        tmp = t1 * ((v / u) * ((-1.0d0) / (u - t1)))
    else if (u <= 1.25d+21) then
        tmp = -v / (t1 + (u * 2.0d0))
    else
        tmp = (t1 * (v / -u)) / (t1 + u)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (u <= -1e+80) {
		tmp = (t1 / (u / v)) / (t1 - u);
	} else if (u <= -1750000.0) {
		tmp = v / (t1 * ((u - t1) / t1));
	} else if (u <= -7.6e-51) {
		tmp = t1 * ((v / u) * (-1.0 / (u - t1)));
	} else if (u <= 1.25e+21) {
		tmp = -v / (t1 + (u * 2.0));
	} else {
		tmp = (t1 * (v / -u)) / (t1 + u);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= -1e+80:
		tmp = (t1 / (u / v)) / (t1 - u)
	elif u <= -1750000.0:
		tmp = v / (t1 * ((u - t1) / t1))
	elif u <= -7.6e-51:
		tmp = t1 * ((v / u) * (-1.0 / (u - t1)))
	elif u <= 1.25e+21:
		tmp = -v / (t1 + (u * 2.0))
	else:
		tmp = (t1 * (v / -u)) / (t1 + u)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= -1e+80)
		tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(t1 - u));
	elseif (u <= -1750000.0)
		tmp = Float64(v / Float64(t1 * Float64(Float64(u - t1) / t1)));
	elseif (u <= -7.6e-51)
		tmp = Float64(t1 * Float64(Float64(v / u) * Float64(-1.0 / Float64(u - t1))));
	elseif (u <= 1.25e+21)
		tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)));
	else
		tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / Float64(t1 + u));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= -1e+80)
		tmp = (t1 / (u / v)) / (t1 - u);
	elseif (u <= -1750000.0)
		tmp = v / (t1 * ((u - t1) / t1));
	elseif (u <= -7.6e-51)
		tmp = t1 * ((v / u) * (-1.0 / (u - t1)));
	elseif (u <= 1.25e+21)
		tmp = -v / (t1 + (u * 2.0));
	else
		tmp = (t1 * (v / -u)) / (t1 + u);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, -1e+80], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -1750000.0], N[(v / N[(t1 * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -7.6e-51], N[(t1 * N[(N[(v / u), $MachinePrecision] * N[(-1.0 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.25e+21], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;u \leq -1750000:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\

\mathbf{elif}\;u \leq -7.6 \cdot 10^{-51}:\\
\;\;\;\;t1 \cdot \left(\frac{v}{u} \cdot \frac{-1}{u - t1}\right)\\

\mathbf{elif}\;u \leq 1.25 \cdot 10^{+21}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if u < -1e80

    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*70.8%

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

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

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

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

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

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

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

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

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

        \[\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-frac97.9%

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

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

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

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

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

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

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

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

        \[\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-unprod56.8%

        \[\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-neg56.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-\frac{t1 \cdot v}{u}}}{t1 + u} \]
      2. associate-/l*85.0%

        \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{u}}}{t1 + u} \]
      3. distribute-rgt-neg-in85.0%

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

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

      \[\leadsto \frac{\color{blue}{t1 \cdot \frac{v}{-u}}}{t1 + u} \]
    10. Step-by-step derivation
      1. frac-2neg85.0%

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

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

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

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

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

        \[\leadsto \left(t1 \cdot \color{blue}{\frac{1}{\frac{u}{v}}}\right) \cdot \frac{1}{-\left(t1 + u\right)} \]
      7. un-div-inv86.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{u - t1}} \]
    13. Simplified54.6%

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

        \[\leadsto \frac{\color{blue}{\frac{t1 \cdot v}{u}}}{u - t1} \]
      2. add-sqr-sqrt0.0%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{u} \cdot \sqrt{u}}}}{u - t1} \]
      3. sqrt-unprod65.7%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{u \cdot u}}}}{u - t1} \]
      4. sqr-neg65.7%

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

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{-u} \cdot \sqrt{-u}}}}{u - t1} \]
      6. add-sqr-sqrt72.7%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{-u}}}{u - t1} \]
      7. distribute-frac-neg272.7%

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

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

        \[\leadsto \frac{-t1 \cdot \color{blue}{\frac{1}{\frac{u}{v}}}}{u - t1} \]
      10. un-div-inv86.2%

        \[\leadsto \frac{-\color{blue}{\frac{t1}{\frac{u}{v}}}}{u - t1} \]
    15. Applied egg-rr86.2%

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

    if -1e80 < u < -1.75e6

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num89.8%

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

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

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

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{-u} \cdot \sqrt{-u}} - t1}{t1} \cdot t1} \]
      5. sqrt-unprod89.8%

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

        \[\leadsto \frac{v}{\frac{\sqrt{\color{blue}{u \cdot u}} - t1}{t1} \cdot t1} \]
      7. sqrt-unprod0.0%

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{u} \cdot \sqrt{u}} - t1}{t1} \cdot t1} \]
      8. add-sqr-sqrt89.3%

        \[\leadsto \frac{v}{\frac{\color{blue}{u} - t1}{t1} \cdot t1} \]
    7. Applied egg-rr89.3%

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

    if -1.75e6 < u < -7.60000000000000006e-51

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      10. sqrt-unprod45.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-neg45.3%

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

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

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt26.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-unprod38.8%

        \[\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-neg38.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-\frac{t1 \cdot v}{u}}}{t1 + u} \]
      2. associate-/l*80.0%

        \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{u}}}{t1 + u} \]
      3. distribute-rgt-neg-in80.0%

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

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

      \[\leadsto \frac{\color{blue}{t1 \cdot \frac{v}{-u}}}{t1 + u} \]
    10. Step-by-step derivation
      1. frac-2neg80.0%

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

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

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

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

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

        \[\leadsto \left(t1 \cdot \color{blue}{\frac{1}{\frac{u}{v}}}\right) \cdot \frac{1}{-\left(t1 + u\right)} \]
      7. un-div-inv79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t1 \cdot v}{u \cdot 1}}}{u + \left(-t1\right)} \]
      6. *-rgt-identity20.7%

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

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

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{u - t1}} \]
    13. Simplified20.6%

      \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{u - t1}} \]
    14. Step-by-step derivation
      1. frac-2neg20.6%

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

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

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

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

        \[\leadsto \left(\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}} \cdot \frac{v}{u}\right) \cdot \frac{1}{-\left(u - t1\right)} \]
      6. sqr-neg40.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t1 \cdot \frac{v}{u}\right) \cdot \frac{1}{\color{blue}{t1 - u}} \]
    15. Applied egg-rr80.6%

      \[\leadsto \color{blue}{\left(t1 \cdot \frac{v}{u}\right) \cdot \frac{1}{t1 - u}} \]
    16. Step-by-step derivation
      1. associate-*l*82.3%

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

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

    if -7.60000000000000006e-51 < u < 1.25e21

    1. Initial program 66.8%

      \[\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*71.8%

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified71.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/95.8%

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times99.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-identity99.8%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg99.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-in99.8%

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

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

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

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

        \[\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-neg21.6%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt6.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-unprod55.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-rr99.8%

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

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

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

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

    if 1.25e21 < u

    1. Initial program 76.0%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified88.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-neg288.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      10. sqrt-unprod55.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-neg55.3%

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

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

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt0.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-unprod74.8%

        \[\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-neg74.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-\frac{t1 \cdot v}{u}}}{t1 + u} \]
      2. associate-/l*82.5%

        \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{u}}}{t1 + u} \]
      3. distribute-rgt-neg-in82.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1 \cdot 10^{+80}:\\ \;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{t1 - u}\\ \mathbf{elif}\;u \leq -1750000:\\ \;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\ \mathbf{elif}\;u \leq -7.6 \cdot 10^{-51}:\\ \;\;\;\;t1 \cdot \left(\frac{v}{u} \cdot \frac{-1}{u - t1}\right)\\ \mathbf{elif}\;u \leq 1.25 \cdot 10^{+21}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 76.9% 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.85 \cdot 10^{+79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq -1350000:\\ \;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\ \mathbf{elif}\;u \leq -7.4 \cdot 10^{-54} \lor \neg \left(u \leq 2.6 \cdot 10^{+21}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (* t1 (/ v u)) (- t1 u))))
   (if (<= u -1.85e+79)
     t_1
     (if (<= u -1350000.0)
       (/ v (* t1 (/ (- u t1) t1)))
       (if (or (<= u -7.4e-54) (not (<= u 2.6e+21)))
         t_1
         (/ (- v) (+ t1 (* u 2.0))))))))
double code(double u, double v, double t1) {
	double t_1 = (t1 * (v / u)) / (t1 - u);
	double tmp;
	if (u <= -1.85e+79) {
		tmp = t_1;
	} else if (u <= -1350000.0) {
		tmp = v / (t1 * ((u - t1) / t1));
	} else if ((u <= -7.4e-54) || !(u <= 2.6e+21)) {
		tmp = t_1;
	} else {
		tmp = -v / (t1 + (u * 2.0));
	}
	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.85d+79)) then
        tmp = t_1
    else if (u <= (-1350000.0d0)) then
        tmp = v / (t1 * ((u - t1) / t1))
    else if ((u <= (-7.4d-54)) .or. (.not. (u <= 2.6d+21))) then
        tmp = t_1
    else
        tmp = -v / (t1 + (u * 2.0d0))
    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.85e+79) {
		tmp = t_1;
	} else if (u <= -1350000.0) {
		tmp = v / (t1 * ((u - t1) / t1));
	} else if ((u <= -7.4e-54) || !(u <= 2.6e+21)) {
		tmp = t_1;
	} else {
		tmp = -v / (t1 + (u * 2.0));
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = (t1 * (v / u)) / (t1 - u)
	tmp = 0
	if u <= -1.85e+79:
		tmp = t_1
	elif u <= -1350000.0:
		tmp = v / (t1 * ((u - t1) / t1))
	elif (u <= -7.4e-54) or not (u <= 2.6e+21):
		tmp = t_1
	else:
		tmp = -v / (t1 + (u * 2.0))
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u))
	tmp = 0.0
	if (u <= -1.85e+79)
		tmp = t_1;
	elseif (u <= -1350000.0)
		tmp = Float64(v / Float64(t1 * Float64(Float64(u - t1) / t1)));
	elseif ((u <= -7.4e-54) || !(u <= 2.6e+21))
		tmp = t_1;
	else
		tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = (t1 * (v / u)) / (t1 - u);
	tmp = 0.0;
	if (u <= -1.85e+79)
		tmp = t_1;
	elseif (u <= -1350000.0)
		tmp = v / (t1 * ((u - t1) / t1));
	elseif ((u <= -7.4e-54) || ~((u <= 2.6e+21)))
		tmp = t_1;
	else
		tmp = -v / (t1 + (u * 2.0));
	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.85e+79], t$95$1, If[LessEqual[u, -1350000.0], N[(v / N[(t1 * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[u, -7.4e-54], N[Not[LessEqual[u, 2.6e+21]], $MachinePrecision]], t$95$1, N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;u \leq -1350000:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\

\mathbf{elif}\;u \leq -7.4 \cdot 10^{-54} \lor \neg \left(u \leq 2.6 \cdot 10^{+21}\right):\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -1.85000000000000005e79 or -1.35e6 < u < -7.4000000000000006e-54 or 2.6e21 < u

    1. Initial program 75.1%

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

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

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

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

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

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

      \[\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-neg289.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt26.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-unprod62.2%

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

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

        \[\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 0 75.9%

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

        \[\leadsto \frac{\color{blue}{-\frac{t1 \cdot v}{u}}}{t1 + u} \]
      2. associate-/l*83.2%

        \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{u}}}{t1 + u} \]
      3. distribute-rgt-neg-in83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t1 \cdot v}{u \cdot 1}}}{u + \left(-t1\right)} \]
      6. *-rgt-identity51.7%

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

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

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{u - t1}} \]
    13. Simplified52.0%

      \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{u - t1}} \]
    14. Step-by-step derivation
      1. frac-2neg52.0%

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

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

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

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

        \[\leadsto \left(\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}} \cdot \frac{v}{u}\right) \cdot \frac{1}{-\left(u - t1\right)} \]
      6. sqr-neg58.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t1 \cdot \frac{v}{u}\right) \cdot \frac{1}{\color{blue}{t1 - u}} \]
    15. Applied egg-rr83.0%

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

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

        \[\leadsto \frac{\color{blue}{t1 \cdot \frac{v}{u}}}{t1 - u} \]
    17. Simplified83.2%

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

    if -1.85000000000000005e79 < u < -1.35e6

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num89.8%

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

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

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

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{-u} \cdot \sqrt{-u}} - t1}{t1} \cdot t1} \]
      5. sqrt-unprod89.8%

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

        \[\leadsto \frac{v}{\frac{\sqrt{\color{blue}{u \cdot u}} - t1}{t1} \cdot t1} \]
      7. sqrt-unprod0.0%

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{u} \cdot \sqrt{u}} - t1}{t1} \cdot t1} \]
      8. add-sqr-sqrt89.3%

        \[\leadsto \frac{v}{\frac{\color{blue}{u} - t1}{t1} \cdot t1} \]
    7. Applied egg-rr89.3%

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

    if -7.4000000000000006e-54 < u < 2.6e21

    1. Initial program 66.8%

      \[\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*71.8%

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified71.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/95.8%

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times99.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-identity99.8%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg99.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-in99.8%

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

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

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

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

        \[\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-neg21.6%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt6.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-unprod55.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-rr99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.85 \cdot 10^{+79}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\ \mathbf{elif}\;u \leq -1350000:\\ \;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\ \mathbf{elif}\;u \leq -7.4 \cdot 10^{-54} \lor \neg \left(u \leq 2.6 \cdot 10^{+21}\right):\\ \;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 77.4% 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.9 \cdot 10^{+79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq -2200000:\\ \;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\ \mathbf{elif}\;u \leq -2.65 \cdot 10^{-51}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;u \leq 2.2 \cdot 10^{+25}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \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.9e+79)
     t_1
     (if (<= u -2200000.0)
       (/ v (* t1 (/ (- u t1) t1)))
       (if (<= u -2.65e-51)
         (* t1 (/ (/ v u) (- (- u) t1)))
         (if (<= u 2.2e+25) (/ (- v) (+ t1 (* u 2.0))) t_1))))))
double code(double u, double v, double t1) {
	double t_1 = (t1 * (v / u)) / (t1 - u);
	double tmp;
	if (u <= -1.9e+79) {
		tmp = t_1;
	} else if (u <= -2200000.0) {
		tmp = v / (t1 * ((u - t1) / t1));
	} else if (u <= -2.65e-51) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (u <= 2.2e+25) {
		tmp = -v / (t1 + (u * 2.0));
	} 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.9d+79)) then
        tmp = t_1
    else if (u <= (-2200000.0d0)) then
        tmp = v / (t1 * ((u - t1) / t1))
    else if (u <= (-2.65d-51)) then
        tmp = t1 * ((v / u) / (-u - t1))
    else if (u <= 2.2d+25) then
        tmp = -v / (t1 + (u * 2.0d0))
    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.9e+79) {
		tmp = t_1;
	} else if (u <= -2200000.0) {
		tmp = v / (t1 * ((u - t1) / t1));
	} else if (u <= -2.65e-51) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else if (u <= 2.2e+25) {
		tmp = -v / (t1 + (u * 2.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = (t1 * (v / u)) / (t1 - u)
	tmp = 0
	if u <= -1.9e+79:
		tmp = t_1
	elif u <= -2200000.0:
		tmp = v / (t1 * ((u - t1) / t1))
	elif u <= -2.65e-51:
		tmp = t1 * ((v / u) / (-u - t1))
	elif u <= 2.2e+25:
		tmp = -v / (t1 + (u * 2.0))
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u))
	tmp = 0.0
	if (u <= -1.9e+79)
		tmp = t_1;
	elseif (u <= -2200000.0)
		tmp = Float64(v / Float64(t1 * Float64(Float64(u - t1) / t1)));
	elseif (u <= -2.65e-51)
		tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1)));
	elseif (u <= 2.2e+25)
		tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)));
	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.9e+79)
		tmp = t_1;
	elseif (u <= -2200000.0)
		tmp = v / (t1 * ((u - t1) / t1));
	elseif (u <= -2.65e-51)
		tmp = t1 * ((v / u) / (-u - t1));
	elseif (u <= 2.2e+25)
		tmp = -v / (t1 + (u * 2.0));
	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.9e+79], t$95$1, If[LessEqual[u, -2200000.0], N[(v / N[(t1 * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -2.65e-51], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.2e+25], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $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.9 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq -2200000:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if u < -1.9000000000000001e79 or 2.2000000000000001e25 < u

    1. Initial program 72.0%

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

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

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

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

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

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

      \[\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-neg287.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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-unprod66.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-neg66.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-prod51.8%

        \[\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 0 75.9%

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

        \[\leadsto \frac{\color{blue}{-\frac{t1 \cdot v}{u}}}{t1 + u} \]
      2. associate-/l*83.7%

        \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{u}}}{t1 + u} \]
      3. distribute-rgt-neg-in83.7%

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

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

      \[\leadsto \frac{\color{blue}{t1 \cdot \frac{v}{-u}}}{t1 + u} \]
    10. Step-by-step derivation
      1. frac-2neg83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{t1 \cdot v}{u \cdot 1}}}{u + \left(-t1\right)} \]
      6. *-rgt-identity56.7%

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

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

        \[\leadsto \frac{t1 \cdot \frac{v}{u}}{\color{blue}{u - t1}} \]
    13. Simplified57.1%

      \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{u}}{u - t1}} \]
    14. Step-by-step derivation
      1. frac-2neg57.1%

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

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

        \[\leadsto \color{blue}{\left(\left(-t1\right) \cdot \frac{v}{u}\right)} \cdot \frac{1}{-\left(u - t1\right)} \]
      4. add-sqr-sqrt26.5%

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

        \[\leadsto \left(\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}} \cdot \frac{v}{u}\right) \cdot \frac{1}{-\left(u - t1\right)} \]
      6. sqr-neg60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t1 \cdot \frac{v}{u}\right) \cdot \frac{1}{\color{blue}{t1 - u}} \]
    15. Applied egg-rr83.4%

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

        \[\leadsto \color{blue}{\frac{\left(t1 \cdot \frac{v}{u}\right) \cdot 1}{t1 - u}} \]
      2. *-rgt-identity83.5%

        \[\leadsto \frac{\color{blue}{t1 \cdot \frac{v}{u}}}{t1 - u} \]
    17. Simplified83.5%

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

    if -1.9000000000000001e79 < u < -2.2e6

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num89.8%

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

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

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

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{-u} \cdot \sqrt{-u}} - t1}{t1} \cdot t1} \]
      5. sqrt-unprod89.8%

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

        \[\leadsto \frac{v}{\frac{\sqrt{\color{blue}{u \cdot u}} - t1}{t1} \cdot t1} \]
      7. sqrt-unprod0.0%

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{u} \cdot \sqrt{u}} - t1}{t1} \cdot t1} \]
      8. add-sqr-sqrt89.3%

        \[\leadsto \frac{v}{\frac{\color{blue}{u} - t1}{t1} \cdot t1} \]
    7. Applied egg-rr89.3%

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

    if -2.2e6 < u < -2.64999999999999987e-51

    1. Initial program 94.0%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified99.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.5%

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

    if -2.64999999999999987e-51 < u < 2.2000000000000001e25

    1. Initial program 66.8%

      \[\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*71.8%

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified71.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/95.8%

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times99.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-identity99.8%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg99.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-in99.8%

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

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

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

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

        \[\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-neg21.6%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt6.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-unprod55.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-rr99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.9 \cdot 10^{+79}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\ \mathbf{elif}\;u \leq -2200000:\\ \;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\ \mathbf{elif}\;u \leq -2.65 \cdot 10^{-51}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;u \leq 2.2 \cdot 10^{+25}:\\ \;\;\;\;\frac{-v}{t1 + u \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 69.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+122} \lor \neg \left(u \leq 3.9 \cdot 10^{+68}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t1 + u}\\

\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.10000000000000016e122 or 3.90000000000000019e68 < u

    1. Initial program 69.4%

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

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

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

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

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

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

      \[\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-neg286.1%

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

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

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

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

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

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

        \[\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-sqrt44.4%

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

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

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

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

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

        \[\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-unprod69.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-neg69.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-prod55.2%

        \[\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 0 76.0%

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

        \[\leadsto \frac{\color{blue}{-\frac{t1 \cdot v}{u}}}{t1 + u} \]
      2. associate-/l*85.2%

        \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{u}}}{t1 + u} \]
      3. distribute-rgt-neg-in85.2%

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

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

      \[\leadsto \frac{\color{blue}{t1 \cdot \frac{v}{-u}}}{t1 + u} \]
    10. Step-by-step derivation
      1. associate-/l*80.1%

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

        \[\leadsto \color{blue}{\frac{\frac{v}{-u}}{t1 + u} \cdot t1} \]
      3. add-sqr-sqrt36.9%

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

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

        \[\leadsto \frac{\frac{v}{\sqrt{\color{blue}{u \cdot u}}}}{t1 + u} \cdot t1 \]
      6. sqrt-unprod35.4%

        \[\leadsto \frac{\frac{v}{\color{blue}{\sqrt{u} \cdot \sqrt{u}}}}{t1 + u} \cdot t1 \]
      7. add-sqr-sqrt64.3%

        \[\leadsto \frac{\frac{v}{\color{blue}{u}}}{t1 + u} \cdot t1 \]
    11. Applied egg-rr64.3%

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

    if -2.10000000000000016e122 < u < 3.90000000000000019e68

    1. Initial program 71.0%

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

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

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

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

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

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

      \[\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/96.7%

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times99.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-identity99.8%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg99.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-in99.8%

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod27.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-neg27.3%

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt11.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-unprod52.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-rr99.8%

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

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

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

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

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

Alternative 11: 23.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -9.5 \cdot 10^{+157} \lor \neg \left(t1 \leq 4.3 \cdot 10^{+72}\right):\\ \;\;\;\;\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= t1 -9.5e+157) (not (<= t1 4.3e+72))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -9.5e+157) || !(t1 <= 4.3e+72)) {
		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 ((t1 <= (-9.5d+157)) .or. (.not. (t1 <= 4.3d+72))) 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 ((t1 <= -9.5e+157) || !(t1 <= 4.3e+72)) {
		tmp = v / t1;
	} else {
		tmp = v / u;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (t1 <= -9.5e+157) or not (t1 <= 4.3e+72):
		tmp = v / t1
	else:
		tmp = v / u
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((t1 <= -9.5e+157) || !(t1 <= 4.3e+72))
		tmp = Float64(v / t1);
	else
		tmp = Float64(v / u);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((t1 <= -9.5e+157) || ~((t1 <= 4.3e+72)))
		tmp = v / t1;
	else
		tmp = v / u;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9.5e+157], N[Not[LessEqual[t1, 4.3e+72]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.5 \cdot 10^{+157} \lor \neg \left(t1 \leq 4.3 \cdot 10^{+72}\right):\\
\;\;\;\;\frac{v}{t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -9.4999999999999996e157 or 4.3000000000000001e72 < t1

    1. Initial program 47.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. remove-double-neg87.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u}} \cdot \frac{v}{t1} \]
      6. div-inv87.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t1 \cdot 1}{t1 + u}} \cdot \frac{v}{t1} \]
      2. *-rgt-identity27.1%

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

      \[\leadsto \color{blue}{\frac{t1}{t1 + u}} \cdot \frac{v}{t1} \]
    10. Taylor expanded in t1 around inf 26.8%

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

    if -9.4999999999999996e157 < t1 < 4.3000000000000001e72

    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. times-frac97.6%

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. remove-double-neg53.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u}} \cdot \frac{v}{t1} \]
      6. div-inv53.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t1 \cdot 1}{t1 + u}} \cdot \frac{v}{t1} \]
      2. *-rgt-identity20.3%

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

      \[\leadsto \color{blue}{\frac{t1}{t1 + u}} \cdot \frac{v}{t1} \]
    10. Taylor expanded in t1 around 0 17.1%

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

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

Alternative 12: 98.2% 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(Float64(t1 / Float64(t1 + u)) * 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 70.5%

    \[\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 13: 57.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -4.2 \cdot 10^{+170}:\\ \;\;\;\;\frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u -4.2e+170) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= -4.2e+170) {
		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 <= (-4.2d+170)) 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 <= -4.2e+170) {
		tmp = v / u;
	} else {
		tmp = v / -t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= -4.2e+170:
		tmp = v / u
	else:
		tmp = v / -t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= -4.2e+170)
		tmp = Float64(v / u);
	else
		tmp = Float64(v / Float64(-t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= -4.2e+170)
		tmp = v / u;
	else
		tmp = v / -t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, -4.2e+170], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.19999999999999996e170

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. remove-double-neg50.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u}} \cdot \frac{v}{t1} \]
      6. div-inv50.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t1 \cdot 1}{t1 + u}} \cdot \frac{v}{t1} \]
      2. *-rgt-identity45.7%

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

      \[\leadsto \color{blue}{\frac{t1}{t1 + u}} \cdot \frac{v}{t1} \]
    10. Taylor expanded in t1 around 0 35.2%

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

    if -4.19999999999999996e170 < u

    1. Initial program 71.1%

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

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

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in70.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*78.6%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac278.6%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified78.6%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 58.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/58.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-158.9%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified58.9%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.2 \cdot 10^{+170}:\\ \;\;\;\;\frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 57.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -5.8 \cdot 10^{+170}:\\ \;\;\;\;\frac{v}{-u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u -5.8e+170) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= -5.8e+170) {
		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 <= (-5.8d+170)) 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 <= -5.8e+170) {
		tmp = v / -u;
	} else {
		tmp = v / -t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= -5.8e+170:
		tmp = v / -u
	else:
		tmp = v / -t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= -5.8e+170)
		tmp = Float64(v / Float64(-u));
	else
		tmp = Float64(v / Float64(-t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= -5.8e+170)
		tmp = v / -u;
	else
		tmp = v / -t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, -5.8e+170], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.8 \cdot 10^{+170}:\\
\;\;\;\;\frac{v}{-u}\\

\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -5.8000000000000001e170

    1. Initial program 64.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. times-frac99.9%

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
      2. distribute-frac-neg99.9%

        \[\leadsto \color{blue}{\left(-\frac{t1}{t1 + u}\right)} \cdot \frac{v}{t1 + u} \]
      3. distribute-neg-frac299.9%

        \[\leadsto \color{blue}{\frac{t1}{-\left(t1 + u\right)}} \cdot \frac{v}{t1 + u} \]
      4. +-commutative99.9%

        \[\leadsto \frac{t1}{-\color{blue}{\left(u + t1\right)}} \cdot \frac{v}{t1 + u} \]
      5. distribute-neg-in99.9%

        \[\leadsto \frac{t1}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \cdot \frac{v}{t1 + u} \]
      6. unsub-neg99.9%

        \[\leadsto \frac{t1}{\color{blue}{\left(-u\right) - t1}} \cdot \frac{v}{t1 + u} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 50.0%

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Taylor expanded in t1 around 0 35.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{u}} \]
    7. Step-by-step derivation
      1. associate-*r/35.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{u}} \]
      2. mul-1-neg35.2%

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    8. Simplified35.2%

      \[\leadsto \color{blue}{\frac{-v}{u}} \]

    if -5.8000000000000001e170 < u

    1. Initial program 71.1%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*70.1%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out70.1%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in70.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*78.6%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac278.6%

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified78.6%

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in t1 around inf 58.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/58.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-158.9%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified58.9%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5.8 \cdot 10^{+170}:\\ \;\;\;\;\frac{v}{-u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 69.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ v \cdot \frac{\frac{t1}{u - t1}}{t1} \end{array} \]
(FPCore (u v t1) :precision binary64 (* v (/ (/ t1 (- u t1)) t1)))
double code(double u, double v, double t1) {
	return v * ((t1 / (u - t1)) / t1);
}
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 - t1)) / t1)
end function
public static double code(double u, double v, double t1) {
	return v * ((t1 / (u - t1)) / t1);
}
def code(u, v, t1):
	return v * ((t1 / (u - t1)) / t1)
function code(u, v, t1)
	return Float64(v * Float64(Float64(t1 / Float64(u - t1)) / t1))
end
function tmp = code(u, v, t1)
	tmp = v * ((t1 / (u - t1)) / t1);
end
code[u_, v_, t1_] := N[(v * N[(N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
v \cdot \frac{\frac{t1}{u - t1}}{t1}
\end{array}
Derivation
  1. Initial program 70.5%

    \[\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. Taylor expanded in t1 around inf 64.6%

    \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
  6. Step-by-step derivation
    1. clear-num63.7%

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{1}{\frac{t1}{v}}} \]
    2. frac-times47.1%

      \[\leadsto \color{blue}{\frac{t1 \cdot 1}{\left(\left(-u\right) - t1\right) \cdot \frac{t1}{v}}} \]
    3. *-commutative47.1%

      \[\leadsto \frac{\color{blue}{1 \cdot t1}}{\left(\left(-u\right) - t1\right) \cdot \frac{t1}{v}} \]
    4. *-un-lft-identity47.1%

      \[\leadsto \frac{\color{blue}{t1}}{\left(\left(-u\right) - t1\right) \cdot \frac{t1}{v}} \]
    5. add-sqr-sqrt25.3%

      \[\leadsto \frac{t1}{\left(\color{blue}{\sqrt{-u} \cdot \sqrt{-u}} - t1\right) \cdot \frac{t1}{v}} \]
    6. sqrt-unprod51.3%

      \[\leadsto \frac{t1}{\left(\color{blue}{\sqrt{\left(-u\right) \cdot \left(-u\right)}} - t1\right) \cdot \frac{t1}{v}} \]
    7. sqr-neg51.3%

      \[\leadsto \frac{t1}{\left(\sqrt{\color{blue}{u \cdot u}} - t1\right) \cdot \frac{t1}{v}} \]
    8. sqrt-unprod21.7%

      \[\leadsto \frac{t1}{\left(\color{blue}{\sqrt{u} \cdot \sqrt{u}} - t1\right) \cdot \frac{t1}{v}} \]
    9. add-sqr-sqrt46.0%

      \[\leadsto \frac{t1}{\left(\color{blue}{u} - t1\right) \cdot \frac{t1}{v}} \]
  7. Applied egg-rr46.0%

    \[\leadsto \color{blue}{\frac{t1}{\left(u - t1\right) \cdot \frac{t1}{v}}} \]
  8. Step-by-step derivation
    1. associate-/r*62.5%

      \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1}}{\frac{t1}{v}}} \]
    2. associate-/r/64.5%

      \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1}}{t1} \cdot v} \]
  9. Simplified64.5%

    \[\leadsto \color{blue}{\frac{\frac{t1}{u - t1}}{t1} \cdot v} \]
  10. Final simplification64.5%

    \[\leadsto v \cdot \frac{\frac{t1}{u - t1}}{t1} \]
  11. Add Preprocessing

Alternative 16: 69.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{v}{t1 \cdot \frac{u - t1}{t1}} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ v (* t1 (/ (- u t1) t1))))
double code(double u, double v, double t1) {
	return v / (t1 * ((u - t1) / t1));
}
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 - t1) / t1))
end function
public static double code(double u, double v, double t1) {
	return v / (t1 * ((u - t1) / t1));
}
def code(u, v, t1):
	return v / (t1 * ((u - t1) / t1))
function code(u, v, t1)
	return Float64(v / Float64(t1 * Float64(Float64(u - t1) / t1)))
end
function tmp = code(u, v, t1)
	tmp = v / (t1 * ((u - t1) / t1));
end
code[u_, v_, t1_] := N[(v / N[(t1 * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{v}{t1 \cdot \frac{u - t1}{t1}}
\end{array}
Derivation
  1. Initial program 70.5%

    \[\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. Taylor expanded in t1 around inf 64.6%

    \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
  6. Step-by-step derivation
    1. clear-num66.4%

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1} \]
    2. frac-times68.0%

      \[\leadsto \color{blue}{\frac{1 \cdot v}{\frac{\left(-u\right) - t1}{t1} \cdot t1}} \]
    3. *-un-lft-identity68.0%

      \[\leadsto \frac{\color{blue}{v}}{\frac{\left(-u\right) - t1}{t1} \cdot t1} \]
    4. add-sqr-sqrt34.6%

      \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{-u} \cdot \sqrt{-u}} - t1}{t1} \cdot t1} \]
    5. sqrt-unprod67.7%

      \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{\left(-u\right) \cdot \left(-u\right)}} - t1}{t1} \cdot t1} \]
    6. sqr-neg67.7%

      \[\leadsto \frac{v}{\frac{\sqrt{\color{blue}{u \cdot u}} - t1}{t1} \cdot t1} \]
    7. sqrt-unprod33.2%

      \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{u} \cdot \sqrt{u}} - t1}{t1} \cdot t1} \]
    8. add-sqr-sqrt66.9%

      \[\leadsto \frac{v}{\frac{\color{blue}{u} - t1}{t1} \cdot t1} \]
  7. Applied egg-rr66.9%

    \[\leadsto \color{blue}{\frac{v}{\frac{u - t1}{t1} \cdot t1}} \]
  8. Final simplification66.9%

    \[\leadsto \frac{v}{t1 \cdot \frac{u - t1}{t1}} \]
  9. Add Preprocessing

Alternative 17: 63.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \frac{-v}{t1 + u \cdot 2} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 (* u 2.0))))
double code(double u, double v, double t1) {
	return -v / (t1 + (u * 2.0));
}
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 * 2.0d0))
end function
public static double code(double u, double v, double t1) {
	return -v / (t1 + (u * 2.0));
}
def code(u, v, t1):
	return -v / (t1 + (u * 2.0))
function code(u, v, t1)
	return Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0)))
end
function tmp = code(u, v, t1)
	tmp = -v / (t1 + (u * 2.0));
end
code[u_, v_, t1_] := N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{-v}{t1 + u \cdot 2}
\end{array}
Derivation
  1. Initial program 70.5%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*69.7%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out69.7%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in69.7%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*79.3%

      \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
    5. distribute-neg-frac279.3%

      \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  3. Simplified79.3%

    \[\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/97.7%

      \[\leadsto \color{blue}{\frac{t1 \cdot \frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    2. +-commutative97.7%

      \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
    3. distribute-neg-in97.7%

      \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \]
    4. sub-neg97.7%

      \[\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-times95.7%

      \[\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.7%

      \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
    10. frac-2neg95.7%

      \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
    11. sub-neg95.7%

      \[\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.7%

      \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(-\left(u + t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
    13. +-commutative95.7%

      \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
    14. remove-double-neg95.7%

      \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
    15. add-sqr-sqrt40.4%

      \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
    16. sqrt-unprod36.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-neg36.9%

      \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
    18. sqrt-unprod16.9%

      \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
    19. add-sqr-sqrt32.8%

      \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
    20. add-sqr-sqrt16.5%

      \[\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-unprod57.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-rr95.7%

    \[\leadsto \color{blue}{\frac{-v}{\frac{t1 + u}{t1} \cdot \left(t1 + u\right)}} \]
  7. Taylor expanded in u around 0 62.4%

    \[\leadsto \frac{-v}{\color{blue}{t1 + 2 \cdot u}} \]
  8. Step-by-step derivation
    1. *-commutative62.4%

      \[\leadsto \frac{-v}{t1 + \color{blue}{u \cdot 2}} \]
  9. Simplified62.4%

    \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
  10. Final simplification62.4%

    \[\leadsto \frac{-v}{t1 + u \cdot 2} \]
  11. Add Preprocessing

Alternative 18: 62.7% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \frac{v}{\left(-u\right) - t1} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ v (- (- u) t1)))
double code(double u, double v, double t1) {
	return 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 = v / (-u - t1)
end function
public static double code(double u, double v, double t1) {
	return v / (-u - t1);
}
def code(u, v, t1):
	return v / (-u - t1)
function code(u, v, t1)
	return Float64(v / Float64(Float64(-u) - t1))
end
function tmp = code(u, v, t1)
	tmp = v / (-u - t1);
end
code[u_, v_, t1_] := N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{v}{\left(-u\right) - t1}
\end{array}
Derivation
  1. Initial program 70.5%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*69.7%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out69.7%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in69.7%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*79.3%

      \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
    5. distribute-neg-frac279.3%

      \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  3. Simplified79.3%

    \[\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-neg279.3%

      \[\leadsto t1 \cdot \color{blue}{\left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)} \]
    2. distribute-rgt-neg-out79.3%

      \[\leadsto \color{blue}{-t1 \cdot \frac{\frac{v}{t1 + u}}{t1 + u}} \]
    3. associate-/r*69.7%

      \[\leadsto -t1 \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    4. distribute-lft-neg-out69.7%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    5. associate-/l*70.5%

      \[\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.4%

      \[\leadsto \color{blue}{\frac{\frac{-t1}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)}} \]
    9. add-sqr-sqrt41.2%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    10. sqrt-unprod38.0%

      \[\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-neg38.0%

      \[\leadsto \frac{\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    12. sqrt-unprod16.9%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    13. add-sqr-sqrt32.7%

      \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    14. add-sqr-sqrt16.5%

      \[\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-unprod57.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-neg57.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-prod53.8%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}} \]
    18. add-sqr-sqrt98.4%

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{t1 + u}} \]
  6. Applied egg-rr98.4%

    \[\leadsto \color{blue}{\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}} \]
  7. Taylor expanded in t1 around inf 61.8%

    \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \]
  8. Step-by-step derivation
    1. mul-1-neg61.8%

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  9. Simplified61.8%

    \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  10. Final simplification61.8%

    \[\leadsto \frac{v}{\left(-u\right) - t1} \]
  11. Add Preprocessing

Alternative 19: 15.2% accurate, 4.0× speedup?

\[\begin{array}{l} \\ \frac{v}{t1} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
	return v / t1;
}
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
end function
public static double code(double u, double v, double t1) {
	return v / t1;
}
def code(u, v, t1):
	return v / t1
function code(u, v, t1)
	return Float64(v / t1)
end
function tmp = code(u, v, t1)
	tmp = v / t1;
end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}

\\
\frac{v}{t1}
\end{array}
Derivation
  1. Initial program 70.5%

    \[\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. Taylor expanded in t1 around inf 64.6%

    \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
  6. Step-by-step derivation
    1. remove-double-neg64.6%

      \[\leadsto \frac{\color{blue}{-\left(-t1\right)}}{\left(-u\right) - t1} \cdot \frac{v}{t1} \]
    2. sub-neg64.6%

      \[\leadsto \frac{-\left(-t1\right)}{\color{blue}{\left(-u\right) + \left(-t1\right)}} \cdot \frac{v}{t1} \]
    3. distribute-neg-in64.6%

      \[\leadsto \frac{-\left(-t1\right)}{\color{blue}{-\left(u + t1\right)}} \cdot \frac{v}{t1} \]
    4. +-commutative64.6%

      \[\leadsto \frac{-\left(-t1\right)}{-\color{blue}{\left(t1 + u\right)}} \cdot \frac{v}{t1} \]
    5. frac-2neg64.6%

      \[\leadsto \color{blue}{\frac{-t1}{t1 + u}} \cdot \frac{v}{t1} \]
    6. div-inv64.5%

      \[\leadsto \color{blue}{\left(\left(-t1\right) \cdot \frac{1}{t1 + u}\right)} \cdot \frac{v}{t1} \]
    7. add-sqr-sqrt25.3%

      \[\leadsto \left(\color{blue}{\left(\sqrt{-t1} \cdot \sqrt{-t1}\right)} \cdot \frac{1}{t1 + u}\right) \cdot \frac{v}{t1} \]
    8. sqrt-unprod25.3%

      \[\leadsto \left(\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}} \cdot \frac{1}{t1 + u}\right) \cdot \frac{v}{t1} \]
    9. sqr-neg25.3%

      \[\leadsto \left(\sqrt{\color{blue}{t1 \cdot t1}} \cdot \frac{1}{t1 + u}\right) \cdot \frac{v}{t1} \]
    10. sqrt-unprod12.1%

      \[\leadsto \left(\color{blue}{\left(\sqrt{t1} \cdot \sqrt{t1}\right)} \cdot \frac{1}{t1 + u}\right) \cdot \frac{v}{t1} \]
    11. add-sqr-sqrt22.6%

      \[\leadsto \left(\color{blue}{t1} \cdot \frac{1}{t1 + u}\right) \cdot \frac{v}{t1} \]
  7. Applied egg-rr22.6%

    \[\leadsto \color{blue}{\left(t1 \cdot \frac{1}{t1 + u}\right)} \cdot \frac{v}{t1} \]
  8. Step-by-step derivation
    1. associate-*r/22.6%

      \[\leadsto \color{blue}{\frac{t1 \cdot 1}{t1 + u}} \cdot \frac{v}{t1} \]
    2. *-rgt-identity22.6%

      \[\leadsto \frac{\color{blue}{t1}}{t1 + u} \cdot \frac{v}{t1} \]
  9. Simplified22.6%

    \[\leadsto \color{blue}{\frac{t1}{t1 + u}} \cdot \frac{v}{t1} \]
  10. Taylor expanded in t1 around inf 11.3%

    \[\leadsto \color{blue}{\frac{v}{t1}} \]
  11. Final simplification11.3%

    \[\leadsto \frac{v}{t1} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024079 
(FPCore (u v t1)
  :name "Rosa's DopplerBench"
  :precision binary64
  (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))