Rosa's DopplerBench

Percentage Accurate: 72.8% → 98.3%
Time: 10.8s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 72.8% 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.3% 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 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)}}} \]
  6. Applied egg-rr98.6%

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

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

Alternative 2: 90.2% 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}{u \cdot \left(-2\right) - t1}\\ \mathbf{if}\;t1 \leq -5.4 \cdot 10^{+137}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t1 \leq -2.7 \cdot 10^{-195}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 1.45 \cdot 10^{-164}:\\ \;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\ \mathbf{elif}\;t1 \leq 1.3 \cdot 10^{+83}:\\ \;\;\;\;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 (- (* u (- 2.0)) t1))))
   (if (<= t1 -5.4e+137)
     t_2
     (if (<= t1 -2.7e-195)
       t_1
       (if (<= t1 1.45e-164)
         (/ v (* (/ u t1) (- t1 u)))
         (if (<= t1 1.3e+83) 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 / ((u * -2.0) - t1);
	double tmp;
	if (t1 <= -5.4e+137) {
		tmp = t_2;
	} else if (t1 <= -2.7e-195) {
		tmp = t_1;
	} else if (t1 <= 1.45e-164) {
		tmp = v / ((u / t1) * (t1 - u));
	} else if (t1 <= 1.3e+83) {
		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 / ((u * -2.0d0) - t1)
    if (t1 <= (-5.4d+137)) then
        tmp = t_2
    else if (t1 <= (-2.7d-195)) then
        tmp = t_1
    else if (t1 <= 1.45d-164) then
        tmp = v / ((u / t1) * (t1 - u))
    else if (t1 <= 1.3d+83) 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 / ((u * -2.0) - t1);
	double tmp;
	if (t1 <= -5.4e+137) {
		tmp = t_2;
	} else if (t1 <= -2.7e-195) {
		tmp = t_1;
	} else if (t1 <= 1.45e-164) {
		tmp = v / ((u / t1) * (t1 - u));
	} else if (t1 <= 1.3e+83) {
		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 / ((u * -2.0) - t1)
	tmp = 0
	if t1 <= -5.4e+137:
		tmp = t_2
	elif t1 <= -2.7e-195:
		tmp = t_1
	elif t1 <= 1.45e-164:
		tmp = v / ((u / t1) * (t1 - u))
	elif t1 <= 1.3e+83:
		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(v / Float64(Float64(u * Float64(-2.0)) - t1))
	tmp = 0.0
	if (t1 <= -5.4e+137)
		tmp = t_2;
	elseif (t1 <= -2.7e-195)
		tmp = t_1;
	elseif (t1 <= 1.45e-164)
		tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u)));
	elseif (t1 <= 1.3e+83)
		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 / ((u * -2.0) - t1);
	tmp = 0.0;
	if (t1 <= -5.4e+137)
		tmp = t_2;
	elseif (t1 <= -2.7e-195)
		tmp = t_1;
	elseif (t1 <= 1.45e-164)
		tmp = v / ((u / t1) * (t1 - u));
	elseif (t1 <= 1.3e+83)
		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[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -5.4e+137], t$95$2, If[LessEqual[t1, -2.7e-195], t$95$1, If[LessEqual[t1, 1.45e-164], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.3e+83], 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}{u \cdot \left(-2\right) - t1}\\
\mathbf{if}\;t1 \leq -5.4 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t1 \leq -2.7 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t1 \leq 1.3 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -5.40000000000000034e137 or 1.3000000000000001e83 < t1

    1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.40000000000000034e137 < t1 < -2.7e-195 or 1.45e-164 < t1 < 1.3000000000000001e83

    1. Initial program 90.6%

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

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

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

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

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

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

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

    if -2.7e-195 < t1 < 1.45e-164

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{v}{u \cdot \left(t1 + u\right)}} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt23.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -5.4 \cdot 10^{+137}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{elif}\;t1 \leq -2.7 \cdot 10^{-195}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq 1.45 \cdot 10^{-164}:\\ \;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\ \mathbf{elif}\;t1 \leq 1.3 \cdot 10^{+83}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-u\right) - t1\\ t_2 := \frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{if}\;t1 \leq -2.2 \cdot 10^{+124}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t1 \leq -4.8 \cdot 10^{-195}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\ \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{-163}:\\ \;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\ \mathbf{elif}\;t1 \leq 1.5 \cdot 10^{+133}:\\ \;\;\;\;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 (- (* u (- 2.0)) t1))))
   (if (<= t1 -2.2e+124)
     t_2
     (if (<= t1 -4.8e-195)
       (* t1 (/ (/ v (+ t1 u)) t_1))
       (if (<= t1 2.5e-163)
         (/ v (* (/ u t1) (- t1 u)))
         (if (<= t1 1.5e+133) (* 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 / ((u * -2.0) - t1);
	double tmp;
	if (t1 <= -2.2e+124) {
		tmp = t_2;
	} else if (t1 <= -4.8e-195) {
		tmp = t1 * ((v / (t1 + u)) / t_1);
	} else if (t1 <= 2.5e-163) {
		tmp = v / ((u / t1) * (t1 - u));
	} else if (t1 <= 1.5e+133) {
		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 / ((u * -2.0d0) - t1)
    if (t1 <= (-2.2d+124)) then
        tmp = t_2
    else if (t1 <= (-4.8d-195)) then
        tmp = t1 * ((v / (t1 + u)) / t_1)
    else if (t1 <= 2.5d-163) then
        tmp = v / ((u / t1) * (t1 - u))
    else if (t1 <= 1.5d+133) 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 / ((u * -2.0) - t1);
	double tmp;
	if (t1 <= -2.2e+124) {
		tmp = t_2;
	} else if (t1 <= -4.8e-195) {
		tmp = t1 * ((v / (t1 + u)) / t_1);
	} else if (t1 <= 2.5e-163) {
		tmp = v / ((u / t1) * (t1 - u));
	} else if (t1 <= 1.5e+133) {
		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 / ((u * -2.0) - t1)
	tmp = 0
	if t1 <= -2.2e+124:
		tmp = t_2
	elif t1 <= -4.8e-195:
		tmp = t1 * ((v / (t1 + u)) / t_1)
	elif t1 <= 2.5e-163:
		tmp = v / ((u / t1) * (t1 - u))
	elif t1 <= 1.5e+133:
		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(v / Float64(Float64(u * Float64(-2.0)) - t1))
	tmp = 0.0
	if (t1 <= -2.2e+124)
		tmp = t_2;
	elseif (t1 <= -4.8e-195)
		tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1));
	elseif (t1 <= 2.5e-163)
		tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u)));
	elseif (t1 <= 1.5e+133)
		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 / ((u * -2.0) - t1);
	tmp = 0.0;
	if (t1 <= -2.2e+124)
		tmp = t_2;
	elseif (t1 <= -4.8e-195)
		tmp = t1 * ((v / (t1 + u)) / t_1);
	elseif (t1 <= 2.5e-163)
		tmp = v / ((u / t1) * (t1 - u));
	elseif (t1 <= 1.5e+133)
		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[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.2e+124], t$95$2, If[LessEqual[t1, -4.8e-195], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.5e-163], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.5e+133], 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}{u \cdot \left(-2\right) - t1}\\
\mathbf{if}\;t1 \leq -2.2 \cdot 10^{+124}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;t1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;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 < -2.2000000000000001e124 or 1.50000000000000003e133 < t1

    1. Initial program 43.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000001e124 < t1 < -4.8e-195

    1. Initial program 89.3%

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

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

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

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

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

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

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

    if -4.8e-195 < t1 < 2.49999999999999989e-163

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{v}{u \cdot \left(t1 + u\right)}} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt23.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.49999999999999989e-163 < t1 < 1.50000000000000003e133

    1. Initial program 90.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.2 \cdot 10^{+124}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \mathbf{elif}\;t1 \leq -4.8 \cdot 10^{-195}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{-163}:\\ \;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\ \mathbf{elif}\;t1 \leq 1.5 \cdot 10^{+133}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 78.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -3.4 \cdot 10^{-17} \lor \neg \left(u \leq 1.15 \cdot 10^{-54}\right):\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= u -3.4e-17) (not (<= u 1.15e-54)))
   (* t1 (/ (/ v u) (- (- u) t1)))
   (/ v (- t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -3.4e-17) || !(u <= 1.15e-54)) {
		tmp = t1 * ((v / u) / (-u - t1));
	} 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 <= (-3.4d-17)) .or. (.not. (u <= 1.15d-54))) then
        tmp = t1 * ((v / u) / (-u - t1))
    else
        tmp = v / -t1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -3.4e-17) || !(u <= 1.15e-54)) {
		tmp = t1 * ((v / u) / (-u - t1));
	} else {
		tmp = v / -t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -3.4e-17) or not (u <= 1.15e-54):
		tmp = t1 * ((v / u) / (-u - t1))
	else:
		tmp = v / -t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -3.4e-17) || !(u <= 1.15e-54))
		tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1)));
	else
		tmp = Float64(v / Float64(-t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -3.4e-17) || ~((u <= 1.15e-54)))
		tmp = t1 * ((v / u) / (-u - t1));
	else
		tmp = v / -t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.4e-17], N[Not[LessEqual[u, 1.15e-54]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{-17} \lor \neg \left(u \leq 1.15 \cdot 10^{-54}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -3.3999999999999998e-17 or 1.1499999999999999e-54 < u

    1. Initial program 82.6%

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

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

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

        \[\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
    5. Taylor expanded in t1 around 0 80.7%

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

    if -3.3999999999999998e-17 < u < 1.1499999999999999e-54

    1. Initial program 66.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified84.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.4 \cdot 10^{-17} \lor \neg \left(u \leq 1.15 \cdot 10^{-54}\right):\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 79.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.62 \cdot 10^{-18}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -1.62000000000000005e-18

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

    if -1.62000000000000005e-18 < u < 4.8e-67

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified85.4%

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

    if 4.8e-67 < u

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{v}{u \cdot \left(t1 + u\right)}} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt28.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{t1}{-u}}{\frac{t1 + u}{v}}} \]
    13. Simplified82.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.62 \cdot 10^{-18}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\ \mathbf{elif}\;u \leq 4.8 \cdot 10^{-67}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t1}{-u}}{\frac{t1 + u}{v}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.02 \cdot 10^{-36} \lor \neg \left(u \leq 1.15 \cdot 10^{-54}\right):\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(t1 - u\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.02e-36 or 1.1499999999999999e-54 < u

    1. Initial program 82.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*83.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.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02e-36 < u < 1.1499999999999999e-54

    1. Initial program 66.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.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified85.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.02 \cdot 10^{-36} \lor \neg \left(u \leq 1.15 \cdot 10^{-54}\right):\\ \;\;\;\;t1 \cdot \frac{v}{u \cdot \left(t1 - u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 80.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.06 \cdot 10^{-36} \lor \neg \left(u \leq 1.7 \cdot 10^{-67}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{t1 - u}}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.05999999999999999e-36 or 1.70000000000000005e-67 < u

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{v}{u \cdot \left(t1 + u\right)}} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt26.8%

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

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

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

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

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

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

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

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

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

    if -1.05999999999999999e-36 < u < 1.70000000000000005e-67

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 79.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.6 \cdot 10^{-18} \lor \neg \left(t1 \leq 5.4 \cdot 10^{-9}\right):\\ \;\;\;\;\frac{v}{\left(-u\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= t1 -1.6e-18) (not (<= t1 5.4e-9)))
   (/ v (- (- u) t1))
   (* (/ v u) (/ t1 (- u)))))
double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -1.6e-18) || !(t1 <= 5.4e-9)) {
		tmp = v / (-u - t1);
	} else {
		tmp = (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 ((t1 <= (-1.6d-18)) .or. (.not. (t1 <= 5.4d-9))) then
        tmp = v / (-u - t1)
    else
        tmp = (v / u) * (t1 / -u)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -1.6e-18) || !(t1 <= 5.4e-9)) {
		tmp = v / (-u - t1);
	} else {
		tmp = (v / u) * (t1 / -u);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (t1 <= -1.6e-18) or not (t1 <= 5.4e-9):
		tmp = v / (-u - t1)
	else:
		tmp = (v / u) * (t1 / -u)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((t1 <= -1.6e-18) || !(t1 <= 5.4e-9))
		tmp = Float64(v / Float64(Float64(-u) - t1));
	else
		tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((t1 <= -1.6e-18) || ~((t1 <= 5.4e-9)))
		tmp = v / (-u - t1);
	else
		tmp = (v / u) * (t1 / -u);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.6e-18], N[Not[LessEqual[t1, 5.4e-9]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.6 \cdot 10^{-18} \lor \neg \left(t1 \leq 5.4 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.6e-18 or 5.4000000000000004e-9 < t1

    1. Initial program 66.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.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. frac-2neg99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}}} \]
      19. sqrt-unprod51.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)}}} \]
    6. Applied egg-rr99.9%

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

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

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

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

    if -1.6e-18 < t1 < 5.4000000000000004e-9

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-t1}{u}} \cdot \frac{v}{t1 + u} \]
    8. Taylor expanded in t1 around 0 75.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.6 \cdot 10^{-18} \lor \neg \left(t1 \leq 5.4 \cdot 10^{-9}\right):\\ \;\;\;\;\frac{v}{\left(-u\right) - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 79.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3 \cdot 10^{-15} \lor \neg \left(t1 \leq 2.8 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3e-15 or 2.8e-11 < t1

    1. Initial program 66.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.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. frac-2neg99.9%

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

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

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

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

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

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

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

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

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

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

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

    if -3e-15 < t1 < 2.8e-11

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-t1}{u}} \cdot \frac{v}{t1 + u} \]
    8. Taylor expanded in t1 around 0 75.5%

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

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

Alternative 10: 57.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -5.2 \cdot 10^{+177} \lor \neg \left(u \leq 8.5 \cdot 10^{+224}\right):\\ \;\;\;\;\frac{v}{u} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= u -5.2e+177) (not (<= u 8.5e+224)))
   (* (/ v u) -0.5)
   (/ v (- t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -5.2e+177) || !(u <= 8.5e+224)) {
		tmp = (v / u) * -0.5;
	} 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.2d+177)) .or. (.not. (u <= 8.5d+224))) then
        tmp = (v / u) * (-0.5d0)
    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.2e+177) || !(u <= 8.5e+224)) {
		tmp = (v / u) * -0.5;
	} else {
		tmp = v / -t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -5.2e+177) or not (u <= 8.5e+224):
		tmp = (v / u) * -0.5
	else:
		tmp = v / -t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -5.2e+177) || !(u <= 8.5e+224))
		tmp = Float64(Float64(v / u) * -0.5);
	else
		tmp = Float64(v / Float64(-t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -5.2e+177) || ~((u <= 8.5e+224)))
		tmp = (v / u) * -0.5;
	else
		tmp = v / -t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.2e+177], N[Not[LessEqual[u, 8.5e+224]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.2 \cdot 10^{+177} \lor \neg \left(u \leq 8.5 \cdot 10^{+224}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -5.19999999999999959e177 or 8.50000000000000046e224 < u

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
    10. Taylor expanded in t1 around 0 42.3%

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

    if -5.19999999999999959e177 < u < 8.50000000000000046e224

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified62.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5.2 \cdot 10^{+177} \lor \neg \left(u \leq 8.5 \cdot 10^{+224}\right):\\ \;\;\;\;\frac{v}{u} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -2.05 \cdot 10^{+169} \lor \neg \left(u \leq 5 \cdot 10^{+176}\right):\\ \;\;\;\;\frac{1}{\frac{u}{v}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= u -2.05e+169) (not (<= u 5e+176))) (/ 1.0 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -2.05e+169) || !(u <= 5e+176)) {
		tmp = 1.0 / (u / v);
	} 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 <= (-2.05d+169)) .or. (.not. (u <= 5d+176))) then
        tmp = 1.0d0 / (u / v)
    else
        tmp = v / -t1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -2.05e+169) || !(u <= 5e+176)) {
		tmp = 1.0 / (u / v);
	} else {
		tmp = v / -t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -2.05e+169) or not (u <= 5e+176):
		tmp = 1.0 / (u / v)
	else:
		tmp = v / -t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -2.05e+169) || !(u <= 5e+176))
		tmp = Float64(1.0 / Float64(u / v));
	else
		tmp = Float64(v / Float64(-t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -2.05e+169) || ~((u <= 5e+176)))
		tmp = 1.0 / (u / v);
	else
		tmp = v / -t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.05e+169], N[Not[LessEqual[u, 5e+176]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.05 \cdot 10^{+169} \lor \neg \left(u \leq 5 \cdot 10^{+176}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.0500000000000002e169 or 5e176 < u

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t1 \cdot \color{blue}{\frac{-v}{t1 \cdot u}} \]
    9. Step-by-step derivation
      1. clear-num45.1%

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

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

        \[\leadsto \frac{t1}{\color{blue}{t1 \cdot \frac{u}{-v}}} \]
      4. add-sqr-sqrt19.9%

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

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

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

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

        \[\leadsto \frac{t1}{t1 \cdot \frac{u}{\color{blue}{v}}} \]
    10. Applied egg-rr44.5%

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

        \[\leadsto \color{blue}{\frac{\frac{t1}{t1}}{\frac{u}{v}}} \]
      2. *-inverses42.9%

        \[\leadsto \frac{\color{blue}{1}}{\frac{u}{v}} \]
    12. Simplified42.9%

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

    if -2.0500000000000002e169 < u < 5e176

    1. Initial program 71.5%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified63.4%

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

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

Alternative 12: 57.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -6 \cdot 10^{+169}:\\ \;\;\;\;\frac{v}{u} \cdot -0.5\\ \mathbf{elif}\;u \leq 9 \cdot 10^{+224}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{-0.5}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u -6e+169)
   (* (/ v u) -0.5)
   (if (<= u 9e+224) (/ v (- t1)) (* v (/ -0.5 u)))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= -6e+169) {
		tmp = (v / u) * -0.5;
	} else if (u <= 9e+224) {
		tmp = v / -t1;
	} else {
		tmp = v * (-0.5 / 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 <= (-6d+169)) then
        tmp = (v / u) * (-0.5d0)
    else if (u <= 9d+224) then
        tmp = v / -t1
    else
        tmp = v * ((-0.5d0) / u)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (u <= -6e+169) {
		tmp = (v / u) * -0.5;
	} else if (u <= 9e+224) {
		tmp = v / -t1;
	} else {
		tmp = v * (-0.5 / u);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= -6e+169:
		tmp = (v / u) * -0.5
	elif u <= 9e+224:
		tmp = v / -t1
	else:
		tmp = v * (-0.5 / u)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= -6e+169)
		tmp = Float64(Float64(v / u) * -0.5);
	elseif (u <= 9e+224)
		tmp = Float64(v / Float64(-t1));
	else
		tmp = Float64(v * Float64(-0.5 / u));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= -6e+169)
		tmp = (v / u) * -0.5;
	elseif (u <= 9e+224)
		tmp = v / -t1;
	else
		tmp = v * (-0.5 / u);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, -6e+169], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 9e+224], N[(v / (-t1)), $MachinePrecision], N[(v * N[(-0.5 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{\left(-u\right) - t1}{t1} \cdot \color{blue}{\left(\left(-u\right) - t1\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 39.3%

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

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

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
    10. Taylor expanded in t1 around 0 35.9%

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

    if -5.9999999999999999e169 < u < 8.9999999999999995e224

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified62.1%

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

    if 8.9999999999999995e224 < u

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{-v}{\color{blue}{t1 + u \cdot 2}} \]
    10. Taylor expanded in t1 around 0 50.6%

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

        \[\leadsto \color{blue}{\frac{-0.5 \cdot v}{u}} \]
      2. *-commutative50.6%

        \[\leadsto \frac{\color{blue}{v \cdot -0.5}}{u} \]
      3. associate-/l*50.6%

        \[\leadsto \color{blue}{v \cdot \frac{-0.5}{u}} \]
    12. Simplified50.6%

      \[\leadsto \color{blue}{v \cdot \frac{-0.5}{u}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -6 \cdot 10^{+169}:\\ \;\;\;\;\frac{v}{u} \cdot -0.5\\ \mathbf{elif}\;u \leq 9 \cdot 10^{+224}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{-0.5}{u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 57.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -4.2 \cdot 10^{+170} \lor \neg \left(u \leq 1.05 \cdot 10^{+225}\right):\\ \;\;\;\;\frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= u -4.2e+170) (not (<= u 1.05e+225))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -4.2e+170) || !(u <= 1.05e+225)) {
		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)) .or. (.not. (u <= 1.05d+225))) 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) || !(u <= 1.05e+225)) {
		tmp = v / u;
	} else {
		tmp = v / -t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -4.2e+170) or not (u <= 1.05e+225):
		tmp = v / u
	else:
		tmp = v / -t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -4.2e+170) || !(u <= 1.05e+225))
		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) || ~((u <= 1.05e+225)))
		tmp = v / u;
	else
		tmp = v / -t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.2e+170], N[Not[LessEqual[u, 1.05e+225]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.2 \cdot 10^{+170} \lor \neg \left(u \leq 1.05 \cdot 10^{+225}\right):\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.19999999999999996e170 or 1.05e225 < u

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.19999999999999996e170 < u < 1.05e225

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified62.1%

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

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

Alternative 14: 57.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.05 \cdot 10^{+169} \lor \neg \left(u \leq 8.5 \cdot 10^{+224}\right):\\
\;\;\;\;\frac{v}{-u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.0500000000000001e169 or 8.50000000000000046e224 < u

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0500000000000001e169 < u < 8.50000000000000046e224

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified62.1%

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

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

Alternative 15: 98.1% accurate, 1.0× speedup?

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

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

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

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

Alternative 16: 61.3% 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 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)}}} \]
  6. Applied egg-rr98.6%

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

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

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

    \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  10. Final simplification60.6%

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

Alternative 17: 17.5% accurate, 4.0× speedup?

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

\\
\frac{v}{u}
\end{array}
Derivation
  1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{v}{u}} \]
  11. Final simplification16.6%

    \[\leadsto \frac{v}{u} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024081 
(FPCore (u v t1)
  :name "Rosa's DopplerBench"
  :precision binary64
  (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))