Rosa's DopplerBench

Percentage Accurate: 72.0% → 97.9%
Time: 16.5s
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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 2: 89.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t1 \leq -7.6 \cdot 10^{-132}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 47.0%

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

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

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

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

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

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

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

    if -1.24e141 < t1 < -7.5999999999999994e-132 or 5.60000000000000027e-212 < t1 < 1.35000000000000003e154

    1. Initial program 85.3%

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

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

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

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

    if -7.5999999999999994e-132 < t1 < 5.60000000000000027e-212

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

      \[\leadsto v \cdot \color{blue}{\frac{-t1}{u \cdot u}} \]
    7. Step-by-step derivation
      1. add-log-exp56.7%

        \[\leadsto \color{blue}{\log \left(e^{v \cdot \frac{-t1}{u \cdot u}}\right)} \]
      2. exp-prod55.8%

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

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

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

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{u \cdot u}\right)}\right) \]
      6. sqrt-unprod35.4%

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

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

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

        \[\leadsto \color{blue}{\frac{t1}{u \cdot u} \cdot \log \left(e^{v}\right)} \]
      2. rem-log-exp49.0%

        \[\leadsto \frac{t1}{u \cdot u} \cdot \color{blue}{v} \]
    10. Simplified49.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35000000000000003e154 < t1

    1. Initial program 33.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.24 \cdot 10^{+141}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -7.6 \cdot 10^{-132}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-212}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\ \mathbf{elif}\;t1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{v \cdot \left(\frac{u}{t1} + -1\right)}{t1 + u}\\ \end{array} \]

Alternative 3: 77.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ t_2 := \frac{v}{u} \cdot \frac{t1}{-u}\\ \mathbf{if}\;t1 \leq -3.85 \cdot 10^{+55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq -1.05 \cdot 10^{-37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t1 \leq -4.3 \cdot 10^{-109}:\\ \;\;\;\;\frac{v}{u - t1}\\ \mathbf{elif}\;t1 \leq 2.3 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 u))) (t_2 (* (/ v u) (/ t1 (- u)))))
   (if (<= t1 -3.85e+55)
     t_1
     (if (<= t1 -1.05e-37)
       t_2
       (if (<= t1 -4.3e-109) (/ v (- u t1)) (if (<= t1 2.3e-54) t_2 t_1))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double t_2 = (v / u) * (t1 / -u);
	double tmp;
	if (t1 <= -3.85e+55) {
		tmp = t_1;
	} else if (t1 <= -1.05e-37) {
		tmp = t_2;
	} else if (t1 <= -4.3e-109) {
		tmp = v / (u - t1);
	} else if (t1 <= 2.3e-54) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = -v / (t1 + u)
    t_2 = (v / u) * (t1 / -u)
    if (t1 <= (-3.85d+55)) then
        tmp = t_1
    else if (t1 <= (-1.05d-37)) then
        tmp = t_2
    else if (t1 <= (-4.3d-109)) then
        tmp = v / (u - t1)
    else if (t1 <= 2.3d-54) then
        tmp = t_2
    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);
	double t_2 = (v / u) * (t1 / -u);
	double tmp;
	if (t1 <= -3.85e+55) {
		tmp = t_1;
	} else if (t1 <= -1.05e-37) {
		tmp = t_2;
	} else if (t1 <= -4.3e-109) {
		tmp = v / (u - t1);
	} else if (t1 <= 2.3e-54) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + u)
	t_2 = (v / u) * (t1 / -u)
	tmp = 0
	if t1 <= -3.85e+55:
		tmp = t_1
	elif t1 <= -1.05e-37:
		tmp = t_2
	elif t1 <= -4.3e-109:
		tmp = v / (u - t1)
	elif t1 <= 2.3e-54:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + u))
	t_2 = Float64(Float64(v / u) * Float64(t1 / Float64(-u)))
	tmp = 0.0
	if (t1 <= -3.85e+55)
		tmp = t_1;
	elseif (t1 <= -1.05e-37)
		tmp = t_2;
	elseif (t1 <= -4.3e-109)
		tmp = Float64(v / Float64(u - t1));
	elseif (t1 <= 2.3e-54)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + u);
	t_2 = (v / u) * (t1 / -u);
	tmp = 0.0;
	if (t1 <= -3.85e+55)
		tmp = t_1;
	elseif (t1 <= -1.05e-37)
		tmp = t_2;
	elseif (t1 <= -4.3e-109)
		tmp = v / (u - t1);
	elseif (t1 <= 2.3e-54)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.85e+55], t$95$1, If[LessEqual[t1, -1.05e-37], t$95$2, If[LessEqual[t1, -4.3e-109], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.3e-54], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -1.05 \cdot 10^{-37}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t1 \leq 2.3 \cdot 10^{-54}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -3.84999999999999984e55 or 2.2999999999999999e-54 < t1

    1. Initial program 60.0%

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

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

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

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

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

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

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

    if -3.84999999999999984e55 < t1 < -1.05e-37 or -4.2999999999999997e-109 < t1 < 2.2999999999999999e-54

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e-37 < t1 < -4.2999999999999997e-109

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.85 \cdot 10^{+55}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -1.05 \cdot 10^{-37}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\ \mathbf{elif}\;t1 \leq -4.3 \cdot 10^{-109}:\\ \;\;\;\;\frac{v}{u - t1}\\ \mathbf{elif}\;t1 \leq 2.3 \cdot 10^{-54}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]

Alternative 4: 77.7% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -7.0000000000000002e54 or 2.2e-54 < t1

    1. Initial program 60.0%

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

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

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

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

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

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

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

    if -7.0000000000000002e54 < t1 < -5.59999999999999995e-49

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{u}{\frac{v}{u}}}} \]
      5. distribute-neg-frac73.3%

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

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

    if -5.59999999999999995e-49 < t1 < -5.0000000000000002e-109

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e-109 < t1 < 2.2e-54

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -7 \cdot 10^{+54}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -5.6 \cdot 10^{-49}:\\ \;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\ \mathbf{elif}\;t1 \leq -5 \cdot 10^{-109}:\\ \;\;\;\;\frac{v}{u - t1}\\ \mathbf{elif}\;t1 \leq 2.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]

Alternative 5: 77.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ \mathbf{if}\;t1 \leq -3.25 \cdot 10^{+56}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq -3.7 \cdot 10^{-41}:\\ \;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\ \mathbf{elif}\;t1 \leq -2.05 \cdot 10^{-109}:\\ \;\;\;\;\frac{v}{u - t1}\\ \mathbf{elif}\;t1 \leq 2.35 \cdot 10^{-48}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 u))))
   (if (<= t1 -3.25e+56)
     t_1
     (if (<= t1 -3.7e-41)
       (/ (- t1) (/ u (/ v u)))
       (if (<= t1 -2.05e-109)
         (/ v (- u t1))
         (if (<= t1 2.35e-48) (/ (* t1 (/ v u)) (- u)) t_1))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double tmp;
	if (t1 <= -3.25e+56) {
		tmp = t_1;
	} else if (t1 <= -3.7e-41) {
		tmp = -t1 / (u / (v / u));
	} else if (t1 <= -2.05e-109) {
		tmp = v / (u - t1);
	} else if (t1 <= 2.35e-48) {
		tmp = (t1 * (v / u)) / -u;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: tmp
    t_1 = -v / (t1 + u)
    if (t1 <= (-3.25d+56)) then
        tmp = t_1
    else if (t1 <= (-3.7d-41)) then
        tmp = -t1 / (u / (v / u))
    else if (t1 <= (-2.05d-109)) then
        tmp = v / (u - t1)
    else if (t1 <= 2.35d-48) then
        tmp = (t1 * (v / u)) / -u
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double tmp;
	if (t1 <= -3.25e+56) {
		tmp = t_1;
	} else if (t1 <= -3.7e-41) {
		tmp = -t1 / (u / (v / u));
	} else if (t1 <= -2.05e-109) {
		tmp = v / (u - t1);
	} else if (t1 <= 2.35e-48) {
		tmp = (t1 * (v / u)) / -u;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + u)
	tmp = 0
	if t1 <= -3.25e+56:
		tmp = t_1
	elif t1 <= -3.7e-41:
		tmp = -t1 / (u / (v / u))
	elif t1 <= -2.05e-109:
		tmp = v / (u - t1)
	elif t1 <= 2.35e-48:
		tmp = (t1 * (v / u)) / -u
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + u))
	tmp = 0.0
	if (t1 <= -3.25e+56)
		tmp = t_1;
	elseif (t1 <= -3.7e-41)
		tmp = Float64(Float64(-t1) / Float64(u / Float64(v / u)));
	elseif (t1 <= -2.05e-109)
		tmp = Float64(v / Float64(u - t1));
	elseif (t1 <= 2.35e-48)
		tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + u);
	tmp = 0.0;
	if (t1 <= -3.25e+56)
		tmp = t_1;
	elseif (t1 <= -3.7e-41)
		tmp = -t1 / (u / (v / u));
	elseif (t1 <= -2.05e-109)
		tmp = v / (u - t1);
	elseif (t1 <= 2.35e-48)
		tmp = (t1 * (v / u)) / -u;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.25e+56], t$95$1, If[LessEqual[t1, -3.7e-41], N[((-t1) / N[(u / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -2.05e-109], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.35e-48], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -3.25e56 or 2.3499999999999999e-48 < t1

    1. Initial program 60.0%

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

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

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

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

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

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

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

    if -3.25e56 < t1 < -3.7000000000000002e-41

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{u}{\frac{v}{u}}}} \]
      5. distribute-neg-frac73.3%

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

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

    if -3.7000000000000002e-41 < t1 < -2.0500000000000001e-109

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0500000000000001e-109 < t1 < 2.3499999999999999e-48

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

      \[\leadsto v \cdot \color{blue}{\frac{-t1}{u \cdot u}} \]
    7. Step-by-step derivation
      1. add-log-exp51.7%

        \[\leadsto \color{blue}{\log \left(e^{v \cdot \frac{-t1}{u \cdot u}}\right)} \]
      2. exp-prod51.0%

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

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{u \cdot u}\right)}\right) \]
      4. sqrt-unprod46.8%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{u \cdot u}\right)}\right) \]
      5. sqr-neg46.8%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{u \cdot u}\right)}\right) \]
      6. sqrt-unprod34.9%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{u \cdot u}\right)}\right) \]
      7. add-sqr-sqrt45.2%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{t1}}{u \cdot u}\right)}\right) \]
    8. Applied egg-rr45.2%

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

        \[\leadsto \color{blue}{\frac{t1}{u \cdot u} \cdot \log \left(e^{v}\right)} \]
      2. rem-log-exp45.0%

        \[\leadsto \frac{t1}{u \cdot u} \cdot \color{blue}{v} \]
    10. Simplified45.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.25 \cdot 10^{+56}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -3.7 \cdot 10^{-41}:\\ \;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\ \mathbf{elif}\;t1 \leq -2.05 \cdot 10^{-109}:\\ \;\;\;\;\frac{v}{u - t1}\\ \mathbf{elif}\;t1 \leq 2.35 \cdot 10^{-48}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]

Alternative 6: 76.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.2 \cdot 10^{-108}:\\
\;\;\;\;\frac{v}{u - t1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -1.20000000000000009e-108

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000009e-108 < t1 < 1.8e-72

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

    if 1.8e-72 < t1

    1. Initial program 57.4%

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

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

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

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

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

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

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

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

Alternative 7: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 68.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+124} \lor \neg \left(u \leq 2.5 \cdot 10^{+141}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.20000000000000003e124 or 2.50000000000000013e141 < u

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

      \[\leadsto v \cdot \color{blue}{\frac{-t1}{u \cdot u}} \]
    7. Step-by-step derivation
      1. add-log-exp68.6%

        \[\leadsto \color{blue}{\log \left(e^{v \cdot \frac{-t1}{u \cdot u}}\right)} \]
      2. exp-prod68.6%

        \[\leadsto \log \color{blue}{\left({\left(e^{v}\right)}^{\left(\frac{-t1}{u \cdot u}\right)}\right)} \]
      3. add-sqr-sqrt58.8%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{u \cdot u}\right)}\right) \]
      4. sqrt-unprod67.8%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{u \cdot u}\right)}\right) \]
      5. sqr-neg67.8%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{u \cdot u}\right)}\right) \]
      6. sqrt-unprod55.3%

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

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{t1}}{u \cdot u}\right)}\right) \]
    8. Applied egg-rr68.5%

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

        \[\leadsto \color{blue}{\frac{t1}{u \cdot u} \cdot \log \left(e^{v}\right)} \]
      2. rem-log-exp68.5%

        \[\leadsto \frac{t1}{u \cdot u} \cdot \color{blue}{v} \]
    10. Simplified68.5%

      \[\leadsto \color{blue}{\frac{t1}{u \cdot u} \cdot v} \]
    11. Taylor expanded in t1 around 0 68.1%

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

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

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

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

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

    if -1.20000000000000003e124 < u < 2.50000000000000013e141

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.2 \cdot 10^{+124} \lor \neg \left(u \leq 2.5 \cdot 10^{+141}\right):\\ \;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u - t1}\\ \end{array} \]

Alternative 9: 68.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{+130} \lor \neg \left(u \leq 8.8 \cdot 10^{+141}\right):\\
\;\;\;\;v \cdot \frac{t1}{u \cdot u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.8999999999999999e130 or 8.8e141 < u

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

      \[\leadsto v \cdot \color{blue}{\frac{-t1}{u \cdot u}} \]
    7. Step-by-step derivation
      1. add-log-exp68.6%

        \[\leadsto \color{blue}{\log \left(e^{v \cdot \frac{-t1}{u \cdot u}}\right)} \]
      2. exp-prod68.6%

        \[\leadsto \log \color{blue}{\left({\left(e^{v}\right)}^{\left(\frac{-t1}{u \cdot u}\right)}\right)} \]
      3. add-sqr-sqrt58.8%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{u \cdot u}\right)}\right) \]
      4. sqrt-unprod67.8%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{u \cdot u}\right)}\right) \]
      5. sqr-neg67.8%

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{u \cdot u}\right)}\right) \]
      6. sqrt-unprod55.3%

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

        \[\leadsto \log \left({\left(e^{v}\right)}^{\left(\frac{\color{blue}{t1}}{u \cdot u}\right)}\right) \]
    8. Applied egg-rr68.5%

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

        \[\leadsto \color{blue}{\frac{t1}{u \cdot u} \cdot \log \left(e^{v}\right)} \]
      2. rem-log-exp68.5%

        \[\leadsto \frac{t1}{u \cdot u} \cdot \color{blue}{v} \]
    10. Simplified68.5%

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

    if -2.8999999999999999e130 < u < 8.8e141

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.9 \cdot 10^{+130} \lor \neg \left(u \leq 8.8 \cdot 10^{+141}\right):\\ \;\;\;\;v \cdot \frac{t1}{u \cdot u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u - t1}\\ \end{array} \]

Alternative 10: 57.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2 \cdot 10^{+202} \lor \neg \left(u \leq 1.8 \cdot 10^{+143}\right):\\
\;\;\;\;\frac{-v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.9999999999999998e202 or 1.8e143 < u

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999998e202 < u < 1.8e143

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

Alternative 11: 60.9% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 53.5% 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 69.5%

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

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

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

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

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

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

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

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

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

Alternative 13: 13.4% 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 69.5%

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

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

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

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

    \[\leadsto v \cdot \color{blue}{\frac{-1}{t1}} \]
  5. Step-by-step derivation
    1. expm1-log1p-u46.0%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(v \cdot \frac{-1}{t1}\right)\right)} \]
    2. expm1-udef30.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(v \cdot \frac{-1}{t1}\right)} - 1} \]
    3. *-commutative30.7%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-1}{t1} \cdot v}\right)} - 1 \]
    4. associate-*l/30.7%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-1 \cdot v}{t1}}\right)} - 1 \]
    5. neg-mul-130.7%

      \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{-v}}{t1}\right)} - 1 \]
    6. add-sqr-sqrt15.4%

      \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-v} \cdot \sqrt{-v}}}{t1}\right)} - 1 \]
    7. sqrt-unprod27.2%

      \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-v\right) \cdot \left(-v\right)}}}{t1}\right)} - 1 \]
    8. sqr-neg27.2%

      \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{v \cdot v}}}{t1}\right)} - 1 \]
    9. sqrt-unprod11.4%

      \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{v} \cdot \sqrt{v}}}{t1}\right)} - 1 \]
    10. add-sqr-sqrt22.6%

      \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{v}}{t1}\right)} - 1 \]
  6. Applied egg-rr22.6%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{v}{t1}\right)} - 1} \]
  7. Step-by-step derivation
    1. expm1-def15.4%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{v}{t1}\right)\right)} \]
    2. expm1-log1p15.8%

      \[\leadsto \color{blue}{\frac{v}{t1}} \]
  8. Simplified15.8%

    \[\leadsto \color{blue}{\frac{v}{t1}} \]
  9. Final simplification15.8%

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

Reproduce

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