Rosa's DopplerBench

Percentage Accurate: 73.2% → 98.0%
Time: 18.4s
Alternatives: 14
Speedup: 1.1×

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

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

Initial Program: 73.2% 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.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \frac{\frac{v}{-1 - \frac{u}{t1}}}{u + t1} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (/ v (- -1.0 (/ u t1))) (+ u t1)))
double code(double u, double v, double t1) {
	return (v / (-1.0 - (u / t1))) / (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 / ((-1.0d0) - (u / t1))) / (u + t1)
end function
public static double code(double u, double v, double t1) {
	return (v / (-1.0 - (u / t1))) / (u + t1);
}
def code(u, v, t1):
	return (v / (-1.0 - (u / t1))) / (u + t1)
function code(u, v, t1)
	return Float64(Float64(v / Float64(-1.0 - Float64(u / t1))) / Float64(u + t1))
end
function tmp = code(u, v, t1)
	tmp = (v / (-1.0 - (u / t1))) / (u + t1);
end
code[u_, v_, t1_] := N[(N[(v / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{v}{-1 - \frac{u}{t1}}}{u + t1}
\end{array}
Derivation
  1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{t1 + u}}}{t1 + u} \]
    3. *-commutative98.1%

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

      \[\leadsto \frac{-\color{blue}{\frac{v}{\frac{t1 + u}{t1}}}}{t1 + u} \]
    5. distribute-neg-frac97.8%

      \[\leadsto \frac{\color{blue}{\frac{-v}{\frac{t1 + u}{t1}}}}{t1 + u} \]
    6. *-lft-identity97.8%

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

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

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

      \[\leadsto \frac{\frac{-v}{\color{blue}{u \cdot \frac{1}{t1} + t1 \cdot \frac{1}{t1}}}}{t1 + u} \]
    10. rgt-mult-inverse97.7%

      \[\leadsto \frac{\frac{-v}{u \cdot \frac{1}{t1} + \color{blue}{1}}}{t1 + u} \]
    11. rgt-mult-inverse97.6%

      \[\leadsto \frac{\frac{-v}{u \cdot \frac{1}{t1} + \color{blue}{u \cdot \frac{1}{u}}}}{t1 + u} \]
    12. fma-define97.6%

      \[\leadsto \frac{\frac{-v}{\color{blue}{\mathsf{fma}\left(u, \frac{1}{t1}, u \cdot \frac{1}{u}\right)}}}{t1 + u} \]
    13. rgt-mult-inverse97.7%

      \[\leadsto \frac{\frac{-v}{\mathsf{fma}\left(u, \frac{1}{t1}, \color{blue}{1}\right)}}{t1 + u} \]
  9. Simplified97.7%

    \[\leadsto \frac{\color{blue}{\frac{-v}{\mathsf{fma}\left(u, \frac{1}{t1}, 1\right)}}}{t1 + u} \]
  10. Step-by-step derivation
    1. fma-undefine97.7%

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

      \[\leadsto \frac{\frac{-v}{\color{blue}{\frac{u}{t1}} + 1}}{t1 + u} \]
  11. Applied egg-rr97.8%

    \[\leadsto \frac{\frac{-v}{\color{blue}{\frac{u}{t1} + 1}}}{t1 + u} \]
  12. Final simplification97.8%

    \[\leadsto \frac{\frac{v}{-1 - \frac{u}{t1}}}{u + t1} \]
  13. Add Preprocessing

Alternative 2: 90.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.6 \cdot 10^{+134}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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

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


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

    1. Initial program 39.5%

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

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

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

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

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

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

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

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

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

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

    if -3.59999999999999988e134 < t1 < 9.00000000000000018e195

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

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

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

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

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

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

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

    if 9.00000000000000018e195 < t1

    1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.1 \cdot 10^{-99} \lor \neg \left(t1 \leq 2 \cdot 10^{-97}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.10000000000000002e-99 or 2.00000000000000007e-97 < t1

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000002e-99 < t1 < 2.00000000000000007e-97

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.8 \cdot 10^{-104} \lor \neg \left(t1 \leq 5.2 \cdot 10^{-89}\right):\\
\;\;\;\;\frac{v}{u - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -9.8000000000000006e-104 or 5.1999999999999997e-89 < t1

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{v}{t1 + u}} \]
      2. neg-sub080.8%

        \[\leadsto \color{blue}{0 - \frac{v}{t1 + u}} \]
      3. frac-2neg80.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0 - \frac{v}{\color{blue}{t1 - u}} \]
    11. Applied egg-rr80.9%

      \[\leadsto \color{blue}{0 - \frac{v}{t1 - u}} \]
    12. Step-by-step derivation
      1. neg-sub080.9%

        \[\leadsto \color{blue}{-\frac{v}{t1 - u}} \]
      2. distribute-neg-frac80.9%

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

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

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

        \[\leadsto \color{blue}{\left(-\left(-v\right)\right) \cdot \frac{1}{-\left(t1 - u\right)}} \]
      3. remove-double-neg80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{v \cdot 1}{u - t1}} \]
      3. *-rgt-identity80.9%

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

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

    if -9.8000000000000006e-104 < t1 < 5.1999999999999997e-89

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{v}{\frac{u}{t1} \cdot \color{blue}{\left(-1 \cdot u\right)}} \]
    11. Step-by-step derivation
      1. mul-1-neg90.3%

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

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

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

Alternative 5: 79.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.5 \cdot 10^{-60} \lor \neg \left(t1 \leq 2.9 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{v}{u - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -9.49999999999999958e-60 or 2.9e-19 < t1

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{v}{t1 + u}} \]
      2. neg-sub083.6%

        \[\leadsto \color{blue}{0 - \frac{v}{t1 + u}} \]
      3. frac-2neg83.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0 - \frac{v}{\color{blue}{t1 - u}} \]
    11. Applied egg-rr83.7%

      \[\leadsto \color{blue}{0 - \frac{v}{t1 - u}} \]
    12. Step-by-step derivation
      1. neg-sub083.7%

        \[\leadsto \color{blue}{-\frac{v}{t1 - u}} \]
      2. distribute-neg-frac83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{v \cdot 1}{u - t1}} \]
      3. *-rgt-identity83.7%

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

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

    if -9.49999999999999958e-60 < t1 < 2.9e-19

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 78.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.12 \cdot 10^{-55} \lor \neg \left(t1 \leq 1.35 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{v}{u - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.11999999999999997e-55 or 1.35e-19 < t1

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{v}{t1 + u}} \]
      2. neg-sub083.6%

        \[\leadsto \color{blue}{0 - \frac{v}{t1 + u}} \]
      3. frac-2neg83.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0 - \frac{v}{\color{blue}{t1 - u}} \]
    11. Applied egg-rr83.7%

      \[\leadsto \color{blue}{0 - \frac{v}{t1 - u}} \]
    12. Step-by-step derivation
      1. neg-sub083.7%

        \[\leadsto \color{blue}{-\frac{v}{t1 - u}} \]
      2. distribute-neg-frac83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{v \cdot 1}{u - t1}} \]
      3. *-rgt-identity83.7%

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

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

    if -1.11999999999999997e-55 < t1 < 1.35e-19

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 68.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.65 \cdot 10^{+75} \lor \neg \left(u \leq 4.2 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.64999999999999999e75 or 4.20000000000000011e66 < u

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t1}{\frac{-u}{\frac{v}{u}}}} \]
      3. div-inv83.0%

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

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

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

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

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

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

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

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

    if -1.64999999999999999e75 < u < 4.20000000000000011e66

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 23.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.75 \cdot 10^{+132} \lor \neg \left(t1 \leq 2.3 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{v}{t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.7500000000000001e132 or 2.3e79 < t1

    1. Initial program 51.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]
    8. Step-by-step derivation
      1. neg-sub088.8%

        \[\leadsto \frac{\color{blue}{0 - v}}{t1} \]
      2. sub-neg88.8%

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

        \[\leadsto \frac{0 + \color{blue}{\sqrt{-v} \cdot \sqrt{-v}}}{t1} \]
      4. sqrt-unprod56.2%

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

        \[\leadsto \frac{0 + \sqrt{\color{blue}{v \cdot v}}}{t1} \]
      6. sqrt-unprod20.9%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{v} \cdot \sqrt{v}}}{t1} \]
      7. add-sqr-sqrt39.0%

        \[\leadsto \frac{0 + \color{blue}{v}}{t1} \]
    9. Applied egg-rr39.0%

      \[\leadsto \frac{\color{blue}{0 + v}}{t1} \]
    10. Step-by-step derivation
      1. +-lft-identity39.0%

        \[\leadsto \frac{\color{blue}{v}}{t1} \]
    11. Simplified39.0%

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

    if -1.7500000000000001e132 < t1 < 2.3e79

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{v}{t1 + u}} \]
      2. neg-sub047.2%

        \[\leadsto \color{blue}{0 - \frac{v}{t1 + u}} \]
      3. frac-2neg47.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0 - \frac{v}{\color{blue}{t1 - u}} \]
    11. Applied egg-rr48.4%

      \[\leadsto \color{blue}{0 - \frac{v}{t1 - u}} \]
    12. Step-by-step derivation
      1. neg-sub048.4%

        \[\leadsto \color{blue}{-\frac{v}{t1 - u}} \]
      2. distribute-neg-frac48.4%

        \[\leadsto \color{blue}{\frac{-v}{t1 - u}} \]
    13. Simplified48.4%

      \[\leadsto \color{blue}{\frac{-v}{t1 - u}} \]
    14. Taylor expanded in t1 around 0 17.3%

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

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

Alternative 9: 98.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{v \cdot \frac{-t1}{u + t1}}{u + t1} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (* v (/ (- t1) (+ u t1))) (+ u t1)))
double code(double u, double v, double t1) {
	return (v * (-t1 / (u + t1))) / (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 * (-t1 / (u + t1))) / (u + t1)
end function
public static double code(double u, double v, double t1) {
	return (v * (-t1 / (u + t1))) / (u + t1);
}
def code(u, v, t1):
	return (v * (-t1 / (u + t1))) / (u + t1)
function code(u, v, t1)
	return Float64(Float64(v * Float64(Float64(-t1) / Float64(u + t1))) / Float64(u + t1))
end
function tmp = code(u, v, t1)
	tmp = (v * (-t1 / (u + t1))) / (u + t1);
end
code[u_, v_, t1_] := N[(N[(v * N[((-t1) / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{v \cdot \frac{-t1}{u + t1}}{u + t1}
\end{array}
Derivation
  1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 56.4% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < 3.0000000000000002e145

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

    if 3.0000000000000002e145 < u

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    10. Simplified45.3%

      \[\leadsto \color{blue}{\frac{-v}{u}} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt26.7%

        \[\leadsto \frac{\color{blue}{\sqrt{-v} \cdot \sqrt{-v}}}{u} \]
      2. sqrt-unprod45.0%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{v} \cdot \sqrt{v}}}{u} \]
      5. add-sqr-sqrt45.4%

        \[\leadsto \frac{\color{blue}{v}}{u} \]
      6. clear-num46.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \]
      7. inv-pow46.4%

        \[\leadsto \color{blue}{{\left(\frac{u}{v}\right)}^{-1}} \]
    12. Applied egg-rr46.4%

      \[\leadsto \color{blue}{{\left(\frac{u}{v}\right)}^{-1}} \]
    13. Step-by-step derivation
      1. unpow-146.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \]
    14. Simplified46.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq 3 \cdot 10^{+145}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{u}{v}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 56.3% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < 5.50000000000000022e144

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

    if 5.50000000000000022e144 < u

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}}} \]
      15. sqrt-unprod79.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)}}} \]
      16. sqr-neg79.6%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    10. Step-by-step derivation
      1. distribute-frac-neg45.3%

        \[\leadsto \color{blue}{-\frac{v}{t1 + u}} \]
      2. neg-sub045.3%

        \[\leadsto \color{blue}{0 - \frac{v}{t1 + u}} \]
      3. frac-2neg45.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0 - \frac{v}{\color{blue}{t1 - u}} \]
    11. Applied egg-rr45.4%

      \[\leadsto \color{blue}{0 - \frac{v}{t1 - u}} \]
    12. Step-by-step derivation
      1. neg-sub045.4%

        \[\leadsto \color{blue}{-\frac{v}{t1 - u}} \]
      2. distribute-neg-frac45.4%

        \[\leadsto \color{blue}{\frac{-v}{t1 - u}} \]
    13. Simplified45.4%

      \[\leadsto \color{blue}{\frac{-v}{t1 - u}} \]
    14. Taylor expanded in t1 around 0 45.4%

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

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

Alternative 13: 61.7% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \frac{v}{u - 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(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}{u - t1}
\end{array}
Derivation
  1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  10. Step-by-step derivation
    1. distribute-frac-neg61.4%

      \[\leadsto \color{blue}{-\frac{v}{t1 + u}} \]
    2. neg-sub061.4%

      \[\leadsto \color{blue}{0 - \frac{v}{t1 + u}} \]
    3. frac-2neg61.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0 - \frac{v}{\color{blue}{t1 - u}} \]
  11. Applied egg-rr62.2%

    \[\leadsto \color{blue}{0 - \frac{v}{t1 - u}} \]
  12. Step-by-step derivation
    1. neg-sub062.2%

      \[\leadsto \color{blue}{-\frac{v}{t1 - u}} \]
    2. distribute-neg-frac62.2%

      \[\leadsto \color{blue}{\frac{-v}{t1 - u}} \]
  13. Simplified62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{v \cdot 1}{u - t1}} \]
    3. *-rgt-identity62.2%

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

    \[\leadsto \color{blue}{\frac{v}{u - t1}} \]
  18. Add Preprocessing

Alternative 14: 13.6% accurate, 4.0× speedup?

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

\\
\frac{v}{t1}
\end{array}
Derivation
  1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{-v}{t1}} \]
  8. Step-by-step derivation
    1. neg-sub054.0%

      \[\leadsto \frac{\color{blue}{0 - v}}{t1} \]
    2. sub-neg54.0%

      \[\leadsto \frac{\color{blue}{0 + \left(-v\right)}}{t1} \]
    3. add-sqr-sqrt26.7%

      \[\leadsto \frac{0 + \color{blue}{\sqrt{-v} \cdot \sqrt{-v}}}{t1} \]
    4. sqrt-unprod35.4%

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

      \[\leadsto \frac{0 + \sqrt{\color{blue}{v \cdot v}}}{t1} \]
    6. sqrt-unprod7.8%

      \[\leadsto \frac{0 + \color{blue}{\sqrt{v} \cdot \sqrt{v}}}{t1} \]
    7. add-sqr-sqrt14.7%

      \[\leadsto \frac{0 + \color{blue}{v}}{t1} \]
  9. Applied egg-rr14.7%

    \[\leadsto \frac{\color{blue}{0 + v}}{t1} \]
  10. Step-by-step derivation
    1. +-lft-identity14.7%

      \[\leadsto \frac{\color{blue}{v}}{t1} \]
  11. Simplified14.7%

    \[\leadsto \frac{\color{blue}{v}}{t1} \]
  12. Add Preprocessing

Reproduce

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