Rosa's DopplerBench

Percentage Accurate: 72.3% → 97.8%
Time: 9.0s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 72.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 75.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := -\frac{v}{t1}\\
\mathbf{if}\;u \leq -1600000000000:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\

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

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

\mathbf{elif}\;u \leq 8 \cdot 10^{-130}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;u \leq 2.7 \cdot 10^{+23}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if u < -1.6e12

    1. Initial program 76.3%

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

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

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

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

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

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

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

    if -1.6e12 < u < -8.99999999999999911e-106

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999911e-106 < u < -2.70000000000000007e-151

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{v}{\frac{u}{t1}}}{t1 - u}} \]
    9. Step-by-step derivation
      1. associate-/l/80.2%

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

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

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

    if -2.70000000000000007e-151 < u < 8.0000000000000007e-130 or 1.0199999999999999e-83 < u < 2.6999999999999999e23

    1. Initial program 62.8%

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

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

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

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

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

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

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

    if 8.0000000000000007e-130 < u < 1.0199999999999999e-83

    1. Initial program 89.9%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot v}{\frac{t1 + u}{-t1}}}}{t1 + u} \]
      4. *-un-lft-identity96.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.6999999999999999e23 < u

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1600000000000:\\ \;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\ \mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{elif}\;u \leq -2.7 \cdot 10^{-151}:\\ \;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\ \mathbf{elif}\;u \leq 8 \cdot 10^{-130}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{elif}\;u \leq 1.02 \cdot 10^{-83}:\\ \;\;\;\;\frac{\frac{v}{\frac{t1 - u}{t1}}}{t1 + u}\\ \mathbf{elif}\;u \leq 2.7 \cdot 10^{+23}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{u \cdot \frac{\left(-t1\right) - u}{v}}\\ \end{array} \]

Alternative 3: 77.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u} \cdot \frac{-t1}{u}\\
\mathbf{if}\;u \leq -300000000000:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if u < -3e11 or 1.15e20 < u

    1. Initial program 80.3%

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

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

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

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

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

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

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

    if -3e11 < u < -9.99999999999999965e-106

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999965e-106 < u < -2.70000000000000007e-151

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{v}{\frac{u}{t1}}}{t1 - u}} \]
    9. Step-by-step derivation
      1. associate-/l/80.2%

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

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

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

    if -2.70000000000000007e-151 < u < 1.15e20

    1. Initial program 65.4%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified79.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -300000000000:\\ \;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\ \mathbf{elif}\;u \leq -1 \cdot 10^{-105}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{elif}\;u \leq -2.7 \cdot 10^{-151}:\\ \;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\ \mathbf{elif}\;u \leq 1.15 \cdot 10^{+20}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\ \end{array} \]

Alternative 4: 76.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -265000000000:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\

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

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

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

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


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

    1. Initial program 76.3%

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

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

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

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

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

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

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

    if -2.65e11 < u < -8.99999999999999911e-106

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999911e-106 < u < -1.89999999999999985e-151

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{v}{\frac{u}{t1}}}{t1 - u}} \]
    9. Step-by-step derivation
      1. associate-/l/80.2%

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

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

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

    if -1.89999999999999985e-151 < u < 4.5e21

    1. Initial program 65.4%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified79.7%

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

    if 4.5e21 < u

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -265000000000:\\ \;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\ \mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{elif}\;u \leq -1.9 \cdot 10^{-151}:\\ \;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\ \mathbf{elif}\;u \leq 4.5 \cdot 10^{+21}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{u \cdot \frac{\left(-t1\right) - u}{v}}\\ \end{array} \]

Alternative 5: 75.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{if}\;u \leq -5.3 \cdot 10^{+43}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;u \leq -6 \cdot 10^{-123} \lor \neg \left(u \leq 2 \cdot 10^{+21}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -5.2999999999999999e43 or -1.2999999999999999e-105 < u < -5.99999999999999968e-123 or 2e21 < u

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

    if -5.2999999999999999e43 < u < -1.2999999999999999e-105

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{v}{\color{blue}{-2 \cdot u - t1}} \]
      3. *-commutative70.7%

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

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

    if -5.99999999999999968e-123 < u < 2e21

    1. Initial program 65.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5.3 \cdot 10^{+43}:\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{elif}\;u \leq -1.3 \cdot 10^{-105}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{elif}\;u \leq -6 \cdot 10^{-123} \lor \neg \left(u \leq 2 \cdot 10^{+21}\right):\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;-\frac{v}{t1}\\ \end{array} \]

Alternative 6: 76.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{if}\;u \leq -4.3 \cdot 10^{+35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{elif}\;u \leq -6 \cdot 10^{-123}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;u \leq 12000000:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* (/ (- t1) u) (/ v u))))
   (if (<= u -4.3e+35)
     t_1
     (if (<= u -9e-106)
       (/ v (- (* u -2.0) t1))
       (if (<= u -6e-123)
         t_1
         (if (<= u 12000000.0) (- (/ v t1)) (/ t1 (* u (/ (- u) v)))))))))
double code(double u, double v, double t1) {
	double t_1 = (-t1 / u) * (v / u);
	double tmp;
	if (u <= -4.3e+35) {
		tmp = t_1;
	} else if (u <= -9e-106) {
		tmp = v / ((u * -2.0) - t1);
	} else if (u <= -6e-123) {
		tmp = t_1;
	} else if (u <= 12000000.0) {
		tmp = -(v / t1);
	} else {
		tmp = t1 / (u * (-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) :: t_1
    real(8) :: tmp
    t_1 = (-t1 / u) * (v / u)
    if (u <= (-4.3d+35)) then
        tmp = t_1
    else if (u <= (-9d-106)) then
        tmp = v / ((u * (-2.0d0)) - t1)
    else if (u <= (-6d-123)) then
        tmp = t_1
    else if (u <= 12000000.0d0) then
        tmp = -(v / t1)
    else
        tmp = t1 / (u * (-u / v))
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = (-t1 / u) * (v / u);
	double tmp;
	if (u <= -4.3e+35) {
		tmp = t_1;
	} else if (u <= -9e-106) {
		tmp = v / ((u * -2.0) - t1);
	} else if (u <= -6e-123) {
		tmp = t_1;
	} else if (u <= 12000000.0) {
		tmp = -(v / t1);
	} else {
		tmp = t1 / (u * (-u / v));
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = (-t1 / u) * (v / u)
	tmp = 0
	if u <= -4.3e+35:
		tmp = t_1
	elif u <= -9e-106:
		tmp = v / ((u * -2.0) - t1)
	elif u <= -6e-123:
		tmp = t_1
	elif u <= 12000000.0:
		tmp = -(v / t1)
	else:
		tmp = t1 / (u * (-u / v))
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(Float64(-t1) / u) * Float64(v / u))
	tmp = 0.0
	if (u <= -4.3e+35)
		tmp = t_1;
	elseif (u <= -9e-106)
		tmp = Float64(v / Float64(Float64(u * -2.0) - t1));
	elseif (u <= -6e-123)
		tmp = t_1;
	elseif (u <= 12000000.0)
		tmp = Float64(-Float64(v / t1));
	else
		tmp = Float64(t1 / Float64(u * Float64(Float64(-u) / v)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = (-t1 / u) * (v / u);
	tmp = 0.0;
	if (u <= -4.3e+35)
		tmp = t_1;
	elseif (u <= -9e-106)
		tmp = v / ((u * -2.0) - t1);
	elseif (u <= -6e-123)
		tmp = t_1;
	elseif (u <= 12000000.0)
		tmp = -(v / t1);
	else
		tmp = t1 / (u * (-u / v));
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4.3e+35], t$95$1, If[LessEqual[u, -9e-106], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -6e-123], t$95$1, If[LessEqual[u, 12000000.0], (-N[(v / t1), $MachinePrecision]), N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{if}\;u \leq -4.3 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;u \leq -6 \cdot 10^{-123}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if u < -4.2999999999999998e35 or -8.99999999999999911e-106 < u < -5.99999999999999968e-123

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

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

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

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

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

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

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

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

    if -4.2999999999999998e35 < u < -8.99999999999999911e-106

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{v}{\color{blue}{-2 \cdot u - t1}} \]
      3. *-commutative70.7%

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

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

    if -5.99999999999999968e-123 < u < 1.2e7

    1. Initial program 63.9%

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

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

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

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

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

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

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

    if 1.2e7 < u

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.3 \cdot 10^{+35}:\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{elif}\;u \leq -6 \cdot 10^{-123}:\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{elif}\;u \leq 12000000:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\ \end{array} \]

Alternative 7: 75.3% accurate, 0.7× speedup?

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

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

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

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

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

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


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

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

    if -2.54999999999999997e43 < u < -8.99999999999999911e-106

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{v}{\color{blue}{-2 \cdot u - t1}} \]
      3. *-commutative70.7%

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

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

    if -8.99999999999999911e-106 < u < -2.70000000000000007e-151

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{v}{\frac{u}{t1}}}{t1 - u}} \]
    9. Step-by-step derivation
      1. associate-/l/80.2%

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

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

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

    if -2.70000000000000007e-151 < u < 1.65e7

    1. Initial program 64.1%

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

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

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

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

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

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

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

    if 1.65e7 < u

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.55 \cdot 10^{+43}:\\ \;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\ \mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{elif}\;u \leq -2.7 \cdot 10^{-151}:\\ \;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\ \mathbf{elif}\;u \leq 16500000:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\ \end{array} \]

Alternative 8: 67.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -5 \cdot 10^{+68} \lor \neg \left(u \leq 4.7 \cdot 10^{+160}\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 -5e+68) (not (<= u 4.7e+160)))
   (/ t1 (* u (/ u v)))
   (- (/ v t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -5e+68) || !(u <= 4.7e+160)) {
		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 <= (-5d+68)) .or. (.not. (u <= 4.7d+160))) 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 <= -5e+68) || !(u <= 4.7e+160)) {
		tmp = t1 / (u * (u / v));
	} else {
		tmp = -(v / t1);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -5e+68) or not (u <= 4.7e+160):
		tmp = t1 / (u * (u / v))
	else:
		tmp = -(v / t1)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -5e+68) || !(u <= 4.7e+160))
		tmp = Float64(t1 / Float64(u * Float64(u / v)));
	else
		tmp = Float64(-Float64(v / t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -5e+68) || ~((u <= 4.7e+160)))
		tmp = t1 / (u * (u / v));
	else
		tmp = -(v / t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5e+68], N[Not[LessEqual[u, 4.7e+160]], $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 -5 \cdot 10^{+68} \lor \neg \left(u \leq 4.7 \cdot 10^{+160}\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 < -5.0000000000000004e68 or 4.6999999999999997e160 < u

    1. Initial program 77.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000004e68 < u < 4.6999999999999997e160

    1. Initial program 72.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5 \cdot 10^{+68} \lor \neg \left(u \leq 4.7 \cdot 10^{+160}\right):\\ \;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\ \mathbf{else}:\\ \;\;\;\;-\frac{v}{t1}\\ \end{array} \]

Alternative 9: 68.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.4 \cdot 10^{+73} \lor \neg \left(u \leq 5 \cdot 10^{+160}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -9.4000000000000004e73 or 5.0000000000000002e160 < u

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4000000000000004e73 < u < 5.0000000000000002e160

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -9.4 \cdot 10^{+73} \lor \neg \left(u \leq 5 \cdot 10^{+160}\right):\\ \;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \end{array} \]

Alternative 10: 55.2% accurate, 1.7× speedup?

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

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

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


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

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{v}{u}} \]
    8. Step-by-step derivation
      1. *-commutative35.1%

        \[\leadsto \color{blue}{\frac{v}{u} \cdot -0.5} \]
    9. Simplified35.1%

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

    if -9.199999999999999e73 < u

    1. Initial program 73.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -9.2 \cdot 10^{+73}:\\ \;\;\;\;\frac{v}{u} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;-\frac{v}{t1}\\ \end{array} \]

Alternative 11: 55.2% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

    if -9.199999999999999e73 < u

    1. Initial program 73.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -9.2 \cdot 10^{+73}:\\ \;\;\;\;-\frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;-\frac{v}{t1}\\ \end{array} \]

Alternative 12: 53.8% 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 73.8%

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

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

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

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

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

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

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

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

Alternative 13: 13.8% 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 73.8%

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

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

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

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

    \[\leadsto \color{blue}{\frac{v}{t1}} \]
  6. Final simplification13.2%

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

Reproduce

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