Rosa's DopplerBench

Percentage Accurate: 73.0% → 95.3%
Time: 12.7s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.0% 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: 95.3% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.7999999999999997e128 < u

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{\color{blue}{\frac{-1 \cdot t1}{t1 + u}}}{t1 + u} \]
      3. neg-mul-197.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -6.8 \cdot 10^{+128}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{t1 + u}}{t1 - u}\\ \mathbf{else}:\\ \;\;\;\;\left(-v\right) \cdot \frac{\frac{t1}{t1 + u}}{t1 + u}\\ \end{array} \]

Alternative 2: 90.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{if}\;t1 \leq -2.4 \cdot 10^{+145}:\\ \;\;\;\;\frac{v \cdot \frac{u}{t1} - v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -1.22 \cdot 10^{-164}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq 4.4 \cdot 10^{-166}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\ \mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+137}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))))
   (if (<= t1 -2.4e+145)
     (/ (- (* v (/ u t1)) v) (+ t1 u))
     (if (<= t1 -1.22e-164)
       t_1
       (if (<= t1 4.4e-166)
         (* (/ v u) (/ t1 (- u)))
         (if (<= t1 1.6e+137) t_1 (/ (- v) (+ t1 u))))))))
double code(double u, double v, double t1) {
	double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
	double tmp;
	if (t1 <= -2.4e+145) {
		tmp = ((v * (u / t1)) - v) / (t1 + u);
	} else if (t1 <= -1.22e-164) {
		tmp = t_1;
	} else if (t1 <= 4.4e-166) {
		tmp = (v / u) * (t1 / -u);
	} else if (t1 <= 1.6e+137) {
		tmp = t_1;
	} else {
		tmp = -v / (t1 + u);
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: tmp
    t_1 = v * (-t1 / ((t1 + u) * (t1 + u)))
    if (t1 <= (-2.4d+145)) then
        tmp = ((v * (u / t1)) - v) / (t1 + u)
    else if (t1 <= (-1.22d-164)) then
        tmp = t_1
    else if (t1 <= 4.4d-166) then
        tmp = (v / u) * (t1 / -u)
    else if (t1 <= 1.6d+137) then
        tmp = t_1
    else
        tmp = -v / (t1 + u)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
	double tmp;
	if (t1 <= -2.4e+145) {
		tmp = ((v * (u / t1)) - v) / (t1 + u);
	} else if (t1 <= -1.22e-164) {
		tmp = t_1;
	} else if (t1 <= 4.4e-166) {
		tmp = (v / u) * (t1 / -u);
	} else if (t1 <= 1.6e+137) {
		tmp = t_1;
	} else {
		tmp = -v / (t1 + u);
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = v * (-t1 / ((t1 + u) * (t1 + u)))
	tmp = 0
	if t1 <= -2.4e+145:
		tmp = ((v * (u / t1)) - v) / (t1 + u)
	elif t1 <= -1.22e-164:
		tmp = t_1
	elif t1 <= 4.4e-166:
		tmp = (v / u) * (t1 / -u)
	elif t1 <= 1.6e+137:
		tmp = t_1
	else:
		tmp = -v / (t1 + u)
	return tmp
function code(u, v, t1)
	t_1 = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u))))
	tmp = 0.0
	if (t1 <= -2.4e+145)
		tmp = Float64(Float64(Float64(v * Float64(u / t1)) - v) / Float64(t1 + u));
	elseif (t1 <= -1.22e-164)
		tmp = t_1;
	elseif (t1 <= 4.4e-166)
		tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u)));
	elseif (t1 <= 1.6e+137)
		tmp = t_1;
	else
		tmp = Float64(Float64(-v) / Float64(t1 + u));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
	tmp = 0.0;
	if (t1 <= -2.4e+145)
		tmp = ((v * (u / t1)) - v) / (t1 + u);
	elseif (t1 <= -1.22e-164)
		tmp = t_1;
	elseif (t1 <= 4.4e-166)
		tmp = (v / u) * (t1 / -u);
	elseif (t1 <= 1.6e+137)
		tmp = t_1;
	else
		tmp = -v / (t1 + u);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.4e+145], N[(N[(N[(v * N[(u / t1), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.22e-164], t$95$1, If[LessEqual[t1, 4.4e-166], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.6e+137], t$95$1, N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -1.22 \cdot 10^{-164}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+137}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -2.39999999999999992e145

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{u}{\frac{t1}{v}} - v}}{t1 + u} \]
    7. Step-by-step derivation
      1. associate-/r/94.1%

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

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

    if -2.39999999999999992e145 < t1 < -1.2199999999999999e-164 or 4.4000000000000002e-166 < t1 < 1.60000000000000009e137

    1. Initial program 87.9%

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

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

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

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

    if -1.2199999999999999e-164 < t1 < 4.4000000000000002e-166

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. metadata-eval71.4%

        \[\leadsto \color{blue}{\frac{1}{-1}} \cdot \frac{t1 \cdot v}{{u}^{2}} \]
      2. *-commutative71.4%

        \[\leadsto \frac{1}{-1} \cdot \frac{\color{blue}{v \cdot t1}}{{u}^{2}} \]
      3. unpow271.4%

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

        \[\leadsto \frac{1}{-1} \cdot \color{blue}{\frac{\frac{v \cdot t1}{u}}{u}} \]
      5. *-commutative80.7%

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

        \[\leadsto \frac{1}{-1} \cdot \frac{\color{blue}{\frac{t1}{u} \cdot v}}{u} \]
      7. times-frac81.0%

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

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

        \[\leadsto \frac{\color{blue}{\frac{t1 \cdot v}{u}}}{-1 \cdot u} \]
      10. *-commutative80.7%

        \[\leadsto \frac{\frac{\color{blue}{v \cdot t1}}{u}}{-1 \cdot u} \]
      11. neg-mul-180.7%

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

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

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

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

    if 1.60000000000000009e137 < t1

    1. Initial program 53.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.4 \cdot 10^{+145}:\\ \;\;\;\;\frac{v \cdot \frac{u}{t1} - v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -1.22 \cdot 10^{-164}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;t1 \leq 4.4 \cdot 10^{-166}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\ \mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+137}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]

Alternative 3: 97.9% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 76.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.38 \cdot 10^{-14} \lor \neg \left(t1 \leq 6.9 \cdot 10^{-40}\right):\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.38000000000000002e-14 or 6.8999999999999996e-40 < t1

    1. Initial program 63.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{t1 + u} \cdot \frac{t1}{\frac{t1 + u}{v}}} \]
      5. div-inv99.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{t1 + u}{v}}} \]
    6. Applied egg-rr85.0%

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

    if -1.38000000000000002e-14 < t1 < 6.8999999999999996e-40

    1. Initial program 81.5%

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{\color{blue}{-t1}}{{u}^{2}} \]
      3. unpow275.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.38 \cdot 10^{-14} \lor \neg \left(t1 \leq 6.9 \cdot 10^{-40}\right):\\ \;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{-t1}{u \cdot u}\\ \end{array} \]

Alternative 5: 78.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.45 \cdot 10^{-14} \lor \neg \left(t1 \leq 3.3 \cdot 10^{-39}\right):\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.4500000000000001e-14 or 3.29999999999999985e-39 < t1

    1. Initial program 63.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{t1 + u} \cdot \frac{t1}{\frac{t1 + u}{v}}} \]
      5. div-inv99.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{t1 + u}{v}}} \]
    6. Applied egg-rr85.0%

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

    if -1.4500000000000001e-14 < t1 < 3.29999999999999985e-39

    1. Initial program 81.5%

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{\color{blue}{-t1}}{{u}^{2}} \]
      3. unpow275.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.45 \cdot 10^{-14} \lor \neg \left(t1 \leq 3.3 \cdot 10^{-39}\right):\\ \;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{\frac{t1}{u}}{-u}\\ \end{array} \]

Alternative 6: 79.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.18 \cdot 10^{-14} \lor \neg \left(t1 \leq 7.6 \cdot 10^{-41}\right):\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.17999999999999993e-14 or 7.59999999999999958e-41 < t1

    1. Initial program 63.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{t1 + u} \cdot \frac{t1}{\frac{t1 + u}{v}}} \]
      5. div-inv99.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{t1 + u}{v}}} \]
    6. Applied egg-rr85.0%

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

    if -1.17999999999999993e-14 < t1 < 7.59999999999999958e-41

    1. Initial program 81.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{t1 + u} \cdot \frac{t1}{\frac{t1 + u}{v}}} \]
      5. div-inv94.5%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. metadata-eval73.8%

        \[\leadsto \color{blue}{\frac{1}{-1}} \cdot \frac{t1 \cdot v}{{u}^{2}} \]
      2. *-commutative73.8%

        \[\leadsto \frac{1}{-1} \cdot \frac{\color{blue}{v \cdot t1}}{{u}^{2}} \]
      3. unpow273.8%

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

        \[\leadsto \frac{1}{-1} \cdot \color{blue}{\frac{\frac{v \cdot t1}{u}}{u}} \]
      5. *-commutative80.1%

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

        \[\leadsto \frac{1}{-1} \cdot \frac{\color{blue}{\frac{t1}{u} \cdot v}}{u} \]
      7. times-frac80.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{t1 \cdot v}{u}}}{-1 \cdot u} \]
      10. *-commutative80.1%

        \[\leadsto \frac{\frac{\color{blue}{v \cdot t1}}{u}}{-1 \cdot u} \]
      11. neg-mul-180.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.18 \cdot 10^{-14} \lor \neg \left(t1 \leq 7.6 \cdot 10^{-41}\right):\\ \;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\ \end{array} \]

Alternative 7: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 8: 67.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -6 \cdot 10^{+128} \lor \neg \left(u \leq 6.5 \cdot 10^{+201}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -5.9999999999999997e128 or 6.5000000000000004e201 < u

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.9999999999999997e128 < u < 6.5000000000000004e201

    1. Initial program 68.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -6 \cdot 10^{+128} \lor \neg \left(u \leq 6.5 \cdot 10^{+201}\right):\\ \;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]

Alternative 9: 67.5% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 78.7%

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{\color{blue}{-t1}}{{u}^{2}} \]
      3. unpow277.2%

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

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

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

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

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

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

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

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

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

    if -6.20000000000000008e128 < u < 5.19999999999999971e201

    1. Initial program 68.2%

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

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

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

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

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

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

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

    if 5.19999999999999971e201 < u

    1. Initial program 91.3%

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{\color{blue}{-t1}}{{u}^{2}} \]
      3. unpow291.8%

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{\color{blue}{-t1}}{u \cdot u} \]
      3. add-sqr-sqrt56.5%

        \[\leadsto v \cdot \frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{u \cdot u} \]
      4. sqrt-unprod73.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -6.2 \cdot 10^{+128}:\\ \;\;\;\;\frac{t1 \cdot v}{u \cdot u}\\ \mathbf{elif}\;u \leq 5.2 \cdot 10^{+201}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\ \end{array} \]

Alternative 10: 58.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{+128} \lor \neg \left(u \leq 1.1 \cdot 10^{+178}\right):\\
\;\;\;\;\frac{-v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.20000000000000017e128 or 1.09999999999999999e178 < u

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000017e128 < u < 1.09999999999999999e178

    1. Initial program 67.9%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified64.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.2 \cdot 10^{+128} \lor \neg \left(u \leq 1.1 \cdot 10^{+178}\right):\\ \;\;\;\;\frac{-v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1}\\ \end{array} \]

Alternative 11: 62.2% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.0% 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 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 54.2% accurate, 3.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(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 72.1%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1} \]
  6. Simplified51.3%

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

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

Alternative 14: 13.9% 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 72.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{u}{\frac{t1}{v}} - v}}{t1 + u} \]
  7. Step-by-step derivation
    1. associate-/r/49.3%

      \[\leadsto \frac{\color{blue}{\frac{u}{t1} \cdot v} - v}{t1 + u} \]
  8. Applied egg-rr49.3%

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

    \[\leadsto \color{blue}{\frac{v}{t1}} \]
  10. Final simplification15.1%

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

Reproduce

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