Rosa's DopplerBench

Percentage Accurate: 73.5% → 98.1%
Time: 10.8s
Alternatives: 11
Speedup: 0.8×

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

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

Initial Program: 73.5% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 0.8× speedup?

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

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

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. lift-*.f64N/A

      \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    3. lift-*.f64N/A

      \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    4. times-fracN/A

      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \frac{v}{t1 + u}} \]
    5. frac-2negN/A

      \[\leadsto \frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \color{blue}{\frac{\mathsf{neg}\left(v\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)}} \]
    6. associate-*r/N/A

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)}} \]
    7. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)}} \]
    8. lower-*.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    9. lift-neg.f64N/A

      \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(t1\right)}}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    10. distribute-frac-negN/A

      \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right)} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    11. lower-neg.f64N/A

      \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right)} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    12. lower-/.f64N/A

      \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\frac{t1}{t1 + u}}\right)\right) \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    13. lower-neg.f64N/A

      \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(v\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    14. lower-neg.f6499.8

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

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

      \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right) \cdot \left(\mathsf{neg}\left(v\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    2. lift-neg.f64N/A

      \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right)} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    3. distribute-lft-neg-outN/A

      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{t1}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    4. distribute-rgt-neg-inN/A

      \[\leadsto \frac{\color{blue}{\frac{t1}{t1 + u} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(v\right)\right)\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    5. lift-neg.f64N/A

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(v\right)\right)}\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    6. remove-double-negN/A

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \color{blue}{v}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
    7. lower-*.f6499.8

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

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

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

Alternative 2: 89.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{if}\;t1 \leq -2.6 \cdot 10^{+159}:\\ \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -4.7 \cdot 10^{-155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{-188}:\\ \;\;\;\;\frac{v \cdot \frac{t1}{u}}{\left(-t1\right) - u}\\ \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))))
   (if (<= t1 -2.6e+159)
     (- (* 1.0 (/ v (+ t1 u))))
     (if (<= t1 -4.7e-155)
       t_1
       (if (<= t1 2.5e-188)
         (/ (* v (/ t1 u)) (- (- t1) u))
         (if (<= t1 5.8e+75) t_1 (* (/ t1 (+ t1 u)) (/ v (- t1)))))))))
double code(double u, double v, double t1) {
	double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
	double tmp;
	if (t1 <= -2.6e+159) {
		tmp = -(1.0 * (v / (t1 + u)));
	} else if (t1 <= -4.7e-155) {
		tmp = t_1;
	} else if (t1 <= 2.5e-188) {
		tmp = (v * (t1 / u)) / (-t1 - u);
	} else if (t1 <= 5.8e+75) {
		tmp = t_1;
	} else {
		tmp = (t1 / (t1 + u)) * (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 = v * (-t1 / ((t1 + u) * (t1 + u)))
    if (t1 <= (-2.6d+159)) then
        tmp = -(1.0d0 * (v / (t1 + u)))
    else if (t1 <= (-4.7d-155)) then
        tmp = t_1
    else if (t1 <= 2.5d-188) then
        tmp = (v * (t1 / u)) / (-t1 - u)
    else if (t1 <= 5.8d+75) then
        tmp = t_1
    else
        tmp = (t1 / (t1 + u)) * (v / -t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
	double tmp;
	if (t1 <= -2.6e+159) {
		tmp = -(1.0 * (v / (t1 + u)));
	} else if (t1 <= -4.7e-155) {
		tmp = t_1;
	} else if (t1 <= 2.5e-188) {
		tmp = (v * (t1 / u)) / (-t1 - u);
	} else if (t1 <= 5.8e+75) {
		tmp = t_1;
	} else {
		tmp = (t1 / (t1 + u)) * (v / -t1);
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = v * (-t1 / ((t1 + u) * (t1 + u)))
	tmp = 0
	if t1 <= -2.6e+159:
		tmp = -(1.0 * (v / (t1 + u)))
	elif t1 <= -4.7e-155:
		tmp = t_1
	elif t1 <= 2.5e-188:
		tmp = (v * (t1 / u)) / (-t1 - u)
	elif t1 <= 5.8e+75:
		tmp = t_1
	else:
		tmp = (t1 / (t1 + u)) * (v / -t1)
	return tmp
function code(u, v, t1)
	t_1 = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u))))
	tmp = 0.0
	if (t1 <= -2.6e+159)
		tmp = Float64(-Float64(1.0 * Float64(v / Float64(t1 + u))));
	elseif (t1 <= -4.7e-155)
		tmp = t_1;
	elseif (t1 <= 2.5e-188)
		tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(Float64(-t1) - u));
	elseif (t1 <= 5.8e+75)
		tmp = t_1;
	else
		tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
	tmp = 0.0;
	if (t1 <= -2.6e+159)
		tmp = -(1.0 * (v / (t1 + u)));
	elseif (t1 <= -4.7e-155)
		tmp = t_1;
	elseif (t1 <= 2.5e-188)
		tmp = (v * (t1 / u)) / (-t1 - u);
	elseif (t1 <= 5.8e+75)
		tmp = t_1;
	else
		tmp = (t1 / (t1 + u)) * (v / -t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.6e+159], (-N[(1.0 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t1, -4.7e-155], t$95$1, If[LessEqual[t1, 2.5e-188], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.8e+75], t$95$1, N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -4.7 \cdot 10^{-155}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 39.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      4. lift-neg.f64N/A

        \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      5. neg-mul-1N/A

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

        \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      8. times-fracN/A

        \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      10. neg-mul-1N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
      12. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
      13. lower-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      14. lower-/.f64100.0

        \[\leadsto \frac{-v}{t1 + u} \cdot \color{blue}{\frac{t1}{t1 + u}} \]
    4. Applied rewrites100.0%

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

      \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \color{blue}{1} \]
    6. Step-by-step derivation
      1. Applied rewrites97.8%

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

      if -2.6e159 < t1 < -4.6999999999999998e-155 or 2.5e-188 < t1 < 5.7999999999999997e75

      1. Initial program 84.9%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        4. associate-/l*N/A

          \[\leadsto \color{blue}{v \cdot \frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        5. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
        7. lower-/.f6494.5

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

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

      if -4.6999999999999998e-155 < t1 < 2.5e-188

      1. Initial program 78.2%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        4. times-fracN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \frac{v}{t1 + u}} \]
        5. frac-2negN/A

          \[\leadsto \frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \color{blue}{\frac{\mathsf{neg}\left(v\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)}} \]
        6. associate-*r/N/A

          \[\leadsto \color{blue}{\frac{\frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)}} \]
        7. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)}} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{\mathsf{neg}\left(t1\right)}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        9. lift-neg.f64N/A

          \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(t1\right)}}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        10. distribute-frac-negN/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right)} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        11. lower-neg.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right)} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        12. lower-/.f64N/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\frac{t1}{t1 + u}}\right)\right) \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        13. lower-neg.f64N/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(v\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        14. lower-neg.f6499.7

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

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

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right) \cdot \left(\mathsf{neg}\left(v\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        2. lift-neg.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{t1}{t1 + u}\right)\right)} \cdot \left(\mathsf{neg}\left(v\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        3. distribute-lft-neg-outN/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{t1}{t1 + u} \cdot \left(\mathsf{neg}\left(v\right)\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        4. distribute-rgt-neg-inN/A

          \[\leadsto \frac{\color{blue}{\frac{t1}{t1 + u} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(v\right)\right)\right)\right)}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        5. lift-neg.f64N/A

          \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(v\right)\right)}\right)\right)}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        6. remove-double-negN/A

          \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \color{blue}{v}}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
        7. lower-*.f6499.7

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

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

        \[\leadsto \frac{\color{blue}{\frac{t1}{u}} \cdot v}{\mathsf{neg}\left(\left(t1 + u\right)\right)} \]
      8. Step-by-step derivation
        1. lower-/.f6494.5

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

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

      if 5.7999999999999997e75 < t1

      1. Initial program 47.5%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        4. lift-neg.f64N/A

          \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        5. neg-mul-1N/A

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

          \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        8. times-fracN/A

          \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
        9. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
        10. neg-mul-1N/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
        11. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
        12. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
        13. lower-neg.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
        14. lower-/.f6499.9

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{v}{t1}\right)} \cdot \frac{t1}{t1 + u} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{v}{t1}\right)\right)} \cdot \frac{t1}{t1 + u} \]
        2. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\frac{v}{\mathsf{neg}\left(t1\right)}} \cdot \frac{t1}{t1 + u} \]
        3. mul-1-negN/A

          \[\leadsto \frac{v}{\color{blue}{-1 \cdot t1}} \cdot \frac{t1}{t1 + u} \]
        4. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{v}{-1 \cdot t1}} \cdot \frac{t1}{t1 + u} \]
        5. mul-1-negN/A

          \[\leadsto \frac{v}{\color{blue}{\mathsf{neg}\left(t1\right)}} \cdot \frac{t1}{t1 + u} \]
        6. lower-neg.f6484.4

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.6 \cdot 10^{+159}:\\ \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -4.7 \cdot 10^{-155}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{-188}:\\ \;\;\;\;\frac{v \cdot \frac{t1}{u}}{\left(-t1\right) - u}\\ \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 87.7% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -2.6 \cdot 10^{+159}:\\ \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (if (<= t1 -2.6e+159)
       (- (* 1.0 (/ v (+ t1 u))))
       (if (<= t1 5.8e+75)
         (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))
         (* (/ t1 (+ t1 u)) (/ v (- t1))))))
    double code(double u, double v, double t1) {
    	double tmp;
    	if (t1 <= -2.6e+159) {
    		tmp = -(1.0 * (v / (t1 + u)));
    	} else if (t1 <= 5.8e+75) {
    		tmp = v * (-t1 / ((t1 + u) * (t1 + u)));
    	} else {
    		tmp = (t1 / (t1 + u)) * (v / -t1);
    	}
    	return tmp;
    }
    
    real(8) function code(u, v, t1)
        real(8), intent (in) :: u
        real(8), intent (in) :: v
        real(8), intent (in) :: t1
        real(8) :: tmp
        if (t1 <= (-2.6d+159)) then
            tmp = -(1.0d0 * (v / (t1 + u)))
        else if (t1 <= 5.8d+75) then
            tmp = v * (-t1 / ((t1 + u) * (t1 + u)))
        else
            tmp = (t1 / (t1 + u)) * (v / -t1)
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double tmp;
    	if (t1 <= -2.6e+159) {
    		tmp = -(1.0 * (v / (t1 + u)));
    	} else if (t1 <= 5.8e+75) {
    		tmp = v * (-t1 / ((t1 + u) * (t1 + u)));
    	} else {
    		tmp = (t1 / (t1 + u)) * (v / -t1);
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if t1 <= -2.6e+159:
    		tmp = -(1.0 * (v / (t1 + u)))
    	elif t1 <= 5.8e+75:
    		tmp = v * (-t1 / ((t1 + u) * (t1 + u)))
    	else:
    		tmp = (t1 / (t1 + u)) * (v / -t1)
    	return tmp
    
    function code(u, v, t1)
    	tmp = 0.0
    	if (t1 <= -2.6e+159)
    		tmp = Float64(-Float64(1.0 * Float64(v / Float64(t1 + u))));
    	elseif (t1 <= 5.8e+75)
    		tmp = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u))));
    	else
    		tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	tmp = 0.0;
    	if (t1 <= -2.6e+159)
    		tmp = -(1.0 * (v / (t1 + u)));
    	elseif (t1 <= 5.8e+75)
    		tmp = v * (-t1 / ((t1 + u) * (t1 + u)));
    	else
    		tmp = (t1 / (t1 + u)) * (v / -t1);
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := If[LessEqual[t1, -2.6e+159], (-N[(1.0 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t1, 5.8e+75], N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t1 \leq -2.6 \cdot 10^{+159}:\\
    \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\
    
    \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\
    \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t1 < -2.6e159

      1. Initial program 39.8%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        4. lift-neg.f64N/A

          \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        5. neg-mul-1N/A

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

          \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        8. times-fracN/A

          \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
        9. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
        10. neg-mul-1N/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
        11. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
        12. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
        13. lower-neg.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
        14. lower-/.f64100.0

          \[\leadsto \frac{-v}{t1 + u} \cdot \color{blue}{\frac{t1}{t1 + u}} \]
      4. Applied rewrites100.0%

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

        \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \color{blue}{1} \]
      6. Step-by-step derivation
        1. Applied rewrites97.8%

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

        if -2.6e159 < t1 < 5.7999999999999997e75

        1. Initial program 82.3%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          4. associate-/l*N/A

            \[\leadsto \color{blue}{v \cdot \frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
          5. *-commutativeN/A

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
          6. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
          7. lower-/.f6488.5

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

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

        if 5.7999999999999997e75 < t1

        1. Initial program 47.5%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          4. lift-neg.f64N/A

            \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          5. neg-mul-1N/A

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

            \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
          8. times-fracN/A

            \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
          9. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
          10. neg-mul-1N/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
          12. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
          13. lower-neg.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
          14. lower-/.f6499.9

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

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

          \[\leadsto \color{blue}{\left(-1 \cdot \frac{v}{t1}\right)} \cdot \frac{t1}{t1 + u} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{v}{t1}\right)\right)} \cdot \frac{t1}{t1 + u} \]
          2. distribute-neg-frac2N/A

            \[\leadsto \color{blue}{\frac{v}{\mathsf{neg}\left(t1\right)}} \cdot \frac{t1}{t1 + u} \]
          3. mul-1-negN/A

            \[\leadsto \frac{v}{\color{blue}{-1 \cdot t1}} \cdot \frac{t1}{t1 + u} \]
          4. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{v}{-1 \cdot t1}} \cdot \frac{t1}{t1 + u} \]
          5. mul-1-negN/A

            \[\leadsto \frac{v}{\color{blue}{\mathsf{neg}\left(t1\right)}} \cdot \frac{t1}{t1 + u} \]
          6. lower-neg.f6484.4

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.6 \cdot 10^{+159}:\\ \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 87.7% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \frac{v}{t1 + u}\\ \mathbf{if}\;t1 \leq -2.6 \cdot 10^{+159}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (u v t1)
       :precision binary64
       (let* ((t_1 (- (* 1.0 (/ v (+ t1 u))))))
         (if (<= t1 -2.6e+159)
           t_1
           (if (<= t1 5.8e+75) (* v (/ (- t1) (* (+ t1 u) (+ t1 u)))) t_1))))
      double code(double u, double v, double t1) {
      	double t_1 = -(1.0 * (v / (t1 + u)));
      	double tmp;
      	if (t1 <= -2.6e+159) {
      		tmp = t_1;
      	} else if (t1 <= 5.8e+75) {
      		tmp = v * (-t1 / ((t1 + 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 = -(1.0d0 * (v / (t1 + u)))
          if (t1 <= (-2.6d+159)) then
              tmp = t_1
          else if (t1 <= 5.8d+75) then
              tmp = v * (-t1 / ((t1 + 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 = -(1.0 * (v / (t1 + u)));
      	double tmp;
      	if (t1 <= -2.6e+159) {
      		tmp = t_1;
      	} else if (t1 <= 5.8e+75) {
      		tmp = v * (-t1 / ((t1 + u) * (t1 + u)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(u, v, t1):
      	t_1 = -(1.0 * (v / (t1 + u)))
      	tmp = 0
      	if t1 <= -2.6e+159:
      		tmp = t_1
      	elif t1 <= 5.8e+75:
      		tmp = v * (-t1 / ((t1 + u) * (t1 + u)))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(u, v, t1)
      	t_1 = Float64(-Float64(1.0 * Float64(v / Float64(t1 + u))))
      	tmp = 0.0
      	if (t1 <= -2.6e+159)
      		tmp = t_1;
      	elseif (t1 <= 5.8e+75)
      		tmp = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(u, v, t1)
      	t_1 = -(1.0 * (v / (t1 + u)));
      	tmp = 0.0;
      	if (t1 <= -2.6e+159)
      		tmp = t_1;
      	elseif (t1 <= 5.8e+75)
      		tmp = v * (-t1 / ((t1 + u) * (t1 + u)));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[u_, v_, t1_] := Block[{t$95$1 = (-N[(1.0 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t1, -2.6e+159], t$95$1, If[LessEqual[t1, 5.8e+75], N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := -1 \cdot \frac{v}{t1 + u}\\
      \mathbf{if}\;t1 \leq -2.6 \cdot 10^{+159}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\
      \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t1 < -2.6e159 or 5.7999999999999997e75 < t1

        1. Initial program 44.5%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          4. lift-neg.f64N/A

            \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          5. neg-mul-1N/A

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

            \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
          8. times-fracN/A

            \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
          9. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
          10. neg-mul-1N/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
          12. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
          13. lower-neg.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
          14. lower-/.f6499.9

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

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

          \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \color{blue}{1} \]
        6. Step-by-step derivation
          1. Applied rewrites89.6%

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

          if -2.6e159 < t1 < 5.7999999999999997e75

          1. Initial program 82.3%

            \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            3. *-commutativeN/A

              \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            4. associate-/l*N/A

              \[\leadsto \color{blue}{v \cdot \frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
            5. *-commutativeN/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
            6. lower-*.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
            7. lower-/.f6488.5

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

            \[\leadsto \color{blue}{\frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification88.9%

          \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.6 \cdot 10^{+159}:\\ \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+75}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 5: 77.8% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \frac{v}{t1 + u}\\ \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 9 \cdot 10^{-35}:\\ \;\;\;\;\frac{t1}{u} \cdot \left(-\frac{v}{u}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (u v t1)
         :precision binary64
         (let* ((t_1 (- (* 1.0 (/ v (+ t1 u))))))
           (if (<= t1 -3.1e-145) t_1 (if (<= t1 9e-35) (* (/ t1 u) (- (/ v u))) t_1))))
        double code(double u, double v, double t1) {
        	double t_1 = -(1.0 * (v / (t1 + u)));
        	double tmp;
        	if (t1 <= -3.1e-145) {
        		tmp = t_1;
        	} else if (t1 <= 9e-35) {
        		tmp = (t1 / u) * -(v / 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 = -(1.0d0 * (v / (t1 + u)))
            if (t1 <= (-3.1d-145)) then
                tmp = t_1
            else if (t1 <= 9d-35) then
                tmp = (t1 / u) * -(v / u)
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double u, double v, double t1) {
        	double t_1 = -(1.0 * (v / (t1 + u)));
        	double tmp;
        	if (t1 <= -3.1e-145) {
        		tmp = t_1;
        	} else if (t1 <= 9e-35) {
        		tmp = (t1 / u) * -(v / u);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(u, v, t1):
        	t_1 = -(1.0 * (v / (t1 + u)))
        	tmp = 0
        	if t1 <= -3.1e-145:
        		tmp = t_1
        	elif t1 <= 9e-35:
        		tmp = (t1 / u) * -(v / u)
        	else:
        		tmp = t_1
        	return tmp
        
        function code(u, v, t1)
        	t_1 = Float64(-Float64(1.0 * Float64(v / Float64(t1 + u))))
        	tmp = 0.0
        	if (t1 <= -3.1e-145)
        		tmp = t_1;
        	elseif (t1 <= 9e-35)
        		tmp = Float64(Float64(t1 / u) * Float64(-Float64(v / u)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(u, v, t1)
        	t_1 = -(1.0 * (v / (t1 + u)));
        	tmp = 0.0;
        	if (t1 <= -3.1e-145)
        		tmp = t_1;
        	elseif (t1 <= 9e-35)
        		tmp = (t1 / u) * -(v / u);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[u_, v_, t1_] := Block[{t$95$1 = (-N[(1.0 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t1, -3.1e-145], t$95$1, If[LessEqual[t1, 9e-35], N[(N[(t1 / u), $MachinePrecision] * (-N[(v / u), $MachinePrecision])), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := -1 \cdot \frac{v}{t1 + u}\\
        \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-145}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t1 \leq 9 \cdot 10^{-35}:\\
        \;\;\;\;\frac{t1}{u} \cdot \left(-\frac{v}{u}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t1 < -3.1e-145 or 9.0000000000000002e-35 < t1

          1. Initial program 61.8%

            \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            3. *-commutativeN/A

              \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            4. lift-neg.f64N/A

              \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            5. neg-mul-1N/A

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

              \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
            8. times-fracN/A

              \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
            9. *-commutativeN/A

              \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
            10. neg-mul-1N/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
            11. lower-*.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
            12. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
            13. lower-neg.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
            14. lower-/.f6499.9

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

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

            \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \color{blue}{1} \]
          6. Step-by-step derivation
            1. Applied rewrites80.1%

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

            if -3.1e-145 < t1 < 9.0000000000000002e-35

            1. Initial program 82.0%

              \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              3. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              4. lift-neg.f64N/A

                \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              5. neg-mul-1N/A

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

                \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              7. lift-*.f64N/A

                \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
              8. times-fracN/A

                \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
              9. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
              10. neg-mul-1N/A

                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
              11. lower-*.f64N/A

                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
              12. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
              13. lower-neg.f64N/A

                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
              14. lower-/.f6496.7

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

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

              \[\leadsto \color{blue}{\left(-1 \cdot \frac{v}{u}\right)} \cdot \frac{t1}{t1 + u} \]
            6. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{v}{u}\right)\right)} \cdot \frac{t1}{t1 + u} \]
              2. distribute-neg-frac2N/A

                \[\leadsto \color{blue}{\frac{v}{\mathsf{neg}\left(u\right)}} \cdot \frac{t1}{t1 + u} \]
              3. mul-1-negN/A

                \[\leadsto \frac{v}{\color{blue}{-1 \cdot u}} \cdot \frac{t1}{t1 + u} \]
              4. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{v}{-1 \cdot u}} \cdot \frac{t1}{t1 + u} \]
              5. mul-1-negN/A

                \[\leadsto \frac{v}{\color{blue}{\mathsf{neg}\left(u\right)}} \cdot \frac{t1}{t1 + u} \]
              6. lower-neg.f6481.8

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

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

              \[\leadsto \frac{v}{\mathsf{neg}\left(u\right)} \cdot \color{blue}{\frac{t1}{u}} \]
            9. Step-by-step derivation
              1. lower-/.f6485.3

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-145}:\\ \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 9 \cdot 10^{-35}:\\ \;\;\;\;\frac{t1}{u} \cdot \left(-\frac{v}{u}\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{v}{t1 + u}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 6: 75.2% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \frac{v}{t1 + u}\\ \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 8.5 \cdot 10^{-113}:\\ \;\;\;\;v \cdot \frac{-t1}{u \cdot u}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (u v t1)
           :precision binary64
           (let* ((t_1 (- (* 1.0 (/ v (+ t1 u))))))
             (if (<= t1 -3.1e-145)
               t_1
               (if (<= t1 8.5e-113) (* v (/ (- t1) (* u u))) t_1))))
          double code(double u, double v, double t1) {
          	double t_1 = -(1.0 * (v / (t1 + u)));
          	double tmp;
          	if (t1 <= -3.1e-145) {
          		tmp = t_1;
          	} else if (t1 <= 8.5e-113) {
          		tmp = v * (-t1 / (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 = -(1.0d0 * (v / (t1 + u)))
              if (t1 <= (-3.1d-145)) then
                  tmp = t_1
              else if (t1 <= 8.5d-113) then
                  tmp = v * (-t1 / (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 = -(1.0 * (v / (t1 + u)));
          	double tmp;
          	if (t1 <= -3.1e-145) {
          		tmp = t_1;
          	} else if (t1 <= 8.5e-113) {
          		tmp = v * (-t1 / (u * u));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(u, v, t1):
          	t_1 = -(1.0 * (v / (t1 + u)))
          	tmp = 0
          	if t1 <= -3.1e-145:
          		tmp = t_1
          	elif t1 <= 8.5e-113:
          		tmp = v * (-t1 / (u * u))
          	else:
          		tmp = t_1
          	return tmp
          
          function code(u, v, t1)
          	t_1 = Float64(-Float64(1.0 * Float64(v / Float64(t1 + u))))
          	tmp = 0.0
          	if (t1 <= -3.1e-145)
          		tmp = t_1;
          	elseif (t1 <= 8.5e-113)
          		tmp = Float64(v * Float64(Float64(-t1) / Float64(u * u)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(u, v, t1)
          	t_1 = -(1.0 * (v / (t1 + u)));
          	tmp = 0.0;
          	if (t1 <= -3.1e-145)
          		tmp = t_1;
          	elseif (t1 <= 8.5e-113)
          		tmp = v * (-t1 / (u * u));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[u_, v_, t1_] := Block[{t$95$1 = (-N[(1.0 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t1, -3.1e-145], t$95$1, If[LessEqual[t1, 8.5e-113], N[(v * N[((-t1) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := -1 \cdot \frac{v}{t1 + u}\\
          \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-145}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t1 \leq 8.5 \cdot 10^{-113}:\\
          \;\;\;\;v \cdot \frac{-t1}{u \cdot u}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t1 < -3.1e-145 or 8.4999999999999995e-113 < t1

            1. Initial program 63.9%

              \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              3. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              4. lift-neg.f64N/A

                \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              5. neg-mul-1N/A

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

                \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              7. lift-*.f64N/A

                \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
              8. times-fracN/A

                \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
              9. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
              10. neg-mul-1N/A

                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
              11. lower-*.f64N/A

                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
              12. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
              13. lower-neg.f64N/A

                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
              14. lower-/.f6499.9

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

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

              \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \color{blue}{1} \]
            6. Step-by-step derivation
              1. Applied rewrites77.5%

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

              if -3.1e-145 < t1 < 8.4999999999999995e-113

              1. Initial program 81.8%

                \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                3. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                4. associate-/l*N/A

                  \[\leadsto \color{blue}{v \cdot \frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                5. *-commutativeN/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
                6. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
                7. lower-/.f6482.4

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

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

                \[\leadsto \frac{\mathsf{neg}\left(t1\right)}{\color{blue}{{u}^{2}}} \cdot v \]
              6. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \frac{\mathsf{neg}\left(t1\right)}{\color{blue}{u \cdot u}} \cdot v \]
                2. lower-*.f6481.2

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

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

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

            Alternative 7: 75.3% accurate, 0.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \frac{v}{t1 + u}\\ \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 8.5 \cdot 10^{-113}:\\ \;\;\;\;-t1 \cdot \frac{v}{u \cdot u}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (u v t1)
             :precision binary64
             (let* ((t_1 (- (* 1.0 (/ v (+ t1 u))))))
               (if (<= t1 -3.1e-145)
                 t_1
                 (if (<= t1 8.5e-113) (- (* t1 (/ v (* u u)))) t_1))))
            double code(double u, double v, double t1) {
            	double t_1 = -(1.0 * (v / (t1 + u)));
            	double tmp;
            	if (t1 <= -3.1e-145) {
            		tmp = t_1;
            	} else if (t1 <= 8.5e-113) {
            		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 = -(1.0d0 * (v / (t1 + u)))
                if (t1 <= (-3.1d-145)) then
                    tmp = t_1
                else if (t1 <= 8.5d-113) 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 = -(1.0 * (v / (t1 + u)));
            	double tmp;
            	if (t1 <= -3.1e-145) {
            		tmp = t_1;
            	} else if (t1 <= 8.5e-113) {
            		tmp = -(t1 * (v / (u * u)));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(u, v, t1):
            	t_1 = -(1.0 * (v / (t1 + u)))
            	tmp = 0
            	if t1 <= -3.1e-145:
            		tmp = t_1
            	elif t1 <= 8.5e-113:
            		tmp = -(t1 * (v / (u * u)))
            	else:
            		tmp = t_1
            	return tmp
            
            function code(u, v, t1)
            	t_1 = Float64(-Float64(1.0 * Float64(v / Float64(t1 + u))))
            	tmp = 0.0
            	if (t1 <= -3.1e-145)
            		tmp = t_1;
            	elseif (t1 <= 8.5e-113)
            		tmp = Float64(-Float64(t1 * Float64(v / Float64(u * u))));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(u, v, t1)
            	t_1 = -(1.0 * (v / (t1 + u)));
            	tmp = 0.0;
            	if (t1 <= -3.1e-145)
            		tmp = t_1;
            	elseif (t1 <= 8.5e-113)
            		tmp = -(t1 * (v / (u * u)));
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[u_, v_, t1_] := Block[{t$95$1 = (-N[(1.0 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[t1, -3.1e-145], t$95$1, If[LessEqual[t1, 8.5e-113], (-N[(t1 * N[(v / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := -1 \cdot \frac{v}{t1 + u}\\
            \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-145}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t1 \leq 8.5 \cdot 10^{-113}:\\
            \;\;\;\;-t1 \cdot \frac{v}{u \cdot u}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if t1 < -3.1e-145 or 8.4999999999999995e-113 < t1

              1. Initial program 63.9%

                \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                3. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                4. lift-neg.f64N/A

                  \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                5. neg-mul-1N/A

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

                  \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                7. lift-*.f64N/A

                  \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                8. times-fracN/A

                  \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
                9. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                10. neg-mul-1N/A

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                11. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
                12. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
                13. lower-neg.f64N/A

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                14. lower-/.f6499.9

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

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

                \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \color{blue}{1} \]
              6. Step-by-step derivation
                1. Applied rewrites77.5%

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

                if -3.1e-145 < t1 < 8.4999999999999995e-113

                1. Initial program 81.8%

                  \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in t1 around 0

                  \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{t1 \cdot v}{{u}^{2}}\right)} \]
                  2. associate-/l*N/A

                    \[\leadsto \mathsf{neg}\left(\color{blue}{t1 \cdot \frac{v}{{u}^{2}}}\right) \]
                  3. distribute-rgt-neg-inN/A

                    \[\leadsto \color{blue}{t1 \cdot \left(\mathsf{neg}\left(\frac{v}{{u}^{2}}\right)\right)} \]
                  4. mul-1-negN/A

                    \[\leadsto t1 \cdot \color{blue}{\left(-1 \cdot \frac{v}{{u}^{2}}\right)} \]
                  5. lower-*.f64N/A

                    \[\leadsto \color{blue}{t1 \cdot \left(-1 \cdot \frac{v}{{u}^{2}}\right)} \]
                  6. mul-1-negN/A

                    \[\leadsto t1 \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{v}{{u}^{2}}\right)\right)} \]
                  7. distribute-neg-frac2N/A

                    \[\leadsto t1 \cdot \color{blue}{\frac{v}{\mathsf{neg}\left({u}^{2}\right)}} \]
                  8. mul-1-negN/A

                    \[\leadsto t1 \cdot \frac{v}{\color{blue}{-1 \cdot {u}^{2}}} \]
                  9. lower-/.f64N/A

                    \[\leadsto t1 \cdot \color{blue}{\frac{v}{-1 \cdot {u}^{2}}} \]
                  10. mul-1-negN/A

                    \[\leadsto t1 \cdot \frac{v}{\color{blue}{\mathsf{neg}\left({u}^{2}\right)}} \]
                  11. unpow2N/A

                    \[\leadsto t1 \cdot \frac{v}{\mathsf{neg}\left(\color{blue}{u \cdot u}\right)} \]
                  12. distribute-rgt-neg-inN/A

                    \[\leadsto t1 \cdot \frac{v}{\color{blue}{u \cdot \left(\mathsf{neg}\left(u\right)\right)}} \]
                  13. lower-*.f64N/A

                    \[\leadsto t1 \cdot \frac{v}{\color{blue}{u \cdot \left(\mathsf{neg}\left(u\right)\right)}} \]
                  14. lower-neg.f6476.6

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

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

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

              Alternative 8: 97.8% accurate, 0.8× speedup?

              \[\begin{array}{l} \\ \frac{t1}{t1 + u} \cdot \left(-\frac{v}{t1 + u}\right) \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(t1 / Float64(t1 + u)) * Float64(-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 \left(-\frac{v}{t1 + u}\right)
              \end{array}
              
              Derivation
              1. Initial program 69.3%

                \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                3. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                4. lift-neg.f64N/A

                  \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                5. neg-mul-1N/A

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

                  \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                7. lift-*.f64N/A

                  \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                8. times-fracN/A

                  \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
                9. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                10. neg-mul-1N/A

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                11. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
                12. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
                13. lower-neg.f64N/A

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                14. lower-/.f6498.7

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

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

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

              Alternative 9: 57.6% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := 1 \cdot \left(-\frac{v}{u}\right)\\ \mathbf{if}\;u \leq -2.6 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 2.4 \cdot 10^{+179}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (u v t1)
               :precision binary64
               (let* ((t_1 (* 1.0 (- (/ v u)))))
                 (if (<= u -2.6e+87) t_1 (if (<= u 2.4e+179) (/ v (- t1)) t_1))))
              double code(double u, double v, double t1) {
              	double t_1 = 1.0 * -(v / u);
              	double tmp;
              	if (u <= -2.6e+87) {
              		tmp = t_1;
              	} else if (u <= 2.4e+179) {
              		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 = 1.0d0 * -(v / u)
                  if (u <= (-2.6d+87)) then
                      tmp = t_1
                  else if (u <= 2.4d+179) 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 = 1.0 * -(v / u);
              	double tmp;
              	if (u <= -2.6e+87) {
              		tmp = t_1;
              	} else if (u <= 2.4e+179) {
              		tmp = v / -t1;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(u, v, t1):
              	t_1 = 1.0 * -(v / u)
              	tmp = 0
              	if u <= -2.6e+87:
              		tmp = t_1
              	elif u <= 2.4e+179:
              		tmp = v / -t1
              	else:
              		tmp = t_1
              	return tmp
              
              function code(u, v, t1)
              	t_1 = Float64(1.0 * Float64(-Float64(v / u)))
              	tmp = 0.0
              	if (u <= -2.6e+87)
              		tmp = t_1;
              	elseif (u <= 2.4e+179)
              		tmp = Float64(v / Float64(-t1));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(u, v, t1)
              	t_1 = 1.0 * -(v / u);
              	tmp = 0.0;
              	if (u <= -2.6e+87)
              		tmp = t_1;
              	elseif (u <= 2.4e+179)
              		tmp = v / -t1;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[u_, v_, t1_] := Block[{t$95$1 = N[(1.0 * (-N[(v / u), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[u, -2.6e+87], t$95$1, If[LessEqual[u, 2.4e+179], N[(v / (-t1)), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := 1 \cdot \left(-\frac{v}{u}\right)\\
              \mathbf{if}\;u \leq -2.6 \cdot 10^{+87}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;u \leq 2.4 \cdot 10^{+179}:\\
              \;\;\;\;\frac{v}{-t1}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if u < -2.59999999999999998e87 or 2.40000000000000013e179 < u

                1. Initial program 78.8%

                  \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  3. *-commutativeN/A

                    \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  4. lift-neg.f64N/A

                    \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  5. neg-mul-1N/A

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

                    \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                  8. times-fracN/A

                    \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
                  9. *-commutativeN/A

                    \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                  10. neg-mul-1N/A

                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                  11. lower-*.f64N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
                  12. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
                  13. lower-neg.f64N/A

                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                  14. lower-/.f6499.8

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

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

                  \[\leadsto \color{blue}{\left(-1 \cdot \frac{v}{u}\right)} \cdot \frac{t1}{t1 + u} \]
                6. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{v}{u}\right)\right)} \cdot \frac{t1}{t1 + u} \]
                  2. distribute-neg-frac2N/A

                    \[\leadsto \color{blue}{\frac{v}{\mathsf{neg}\left(u\right)}} \cdot \frac{t1}{t1 + u} \]
                  3. mul-1-negN/A

                    \[\leadsto \frac{v}{\color{blue}{-1 \cdot u}} \cdot \frac{t1}{t1 + u} \]
                  4. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{v}{-1 \cdot u}} \cdot \frac{t1}{t1 + u} \]
                  5. mul-1-negN/A

                    \[\leadsto \frac{v}{\color{blue}{\mathsf{neg}\left(u\right)}} \cdot \frac{t1}{t1 + u} \]
                  6. lower-neg.f6494.9

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

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

                  \[\leadsto \frac{v}{\mathsf{neg}\left(u\right)} \cdot \color{blue}{1} \]
                9. Step-by-step derivation
                  1. Applied rewrites35.2%

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

                  if -2.59999999999999998e87 < u < 2.40000000000000013e179

                  1. Initial program 65.5%

                    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in t1 around inf

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

                      \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
                    2. lower-/.f64N/A

                      \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
                    3. mul-1-negN/A

                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1} \]
                    4. lower-neg.f6470.3

                      \[\leadsto \frac{\color{blue}{-v}}{t1} \]
                  5. Applied rewrites70.3%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.6 \cdot 10^{+87}:\\ \;\;\;\;1 \cdot \left(-\frac{v}{u}\right)\\ \mathbf{elif}\;u \leq 2.4 \cdot 10^{+179}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(-\frac{v}{u}\right)\\ \end{array} \]
                12. Add Preprocessing

                Alternative 10: 61.0% accurate, 1.4× speedup?

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

                  \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  3. *-commutativeN/A

                    \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  4. lift-neg.f64N/A

                    \[\leadsto \frac{v \cdot \color{blue}{\left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  5. neg-mul-1N/A

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

                    \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \frac{\left(v \cdot -1\right) \cdot t1}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
                  8. times-fracN/A

                    \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
                  9. *-commutativeN/A

                    \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                  10. neg-mul-1N/A

                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                  11. lower-*.f64N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
                  12. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(v\right)}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
                  13. lower-neg.f64N/A

                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
                  14. lower-/.f6498.7

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

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

                  \[\leadsto \frac{\mathsf{neg}\left(v\right)}{t1 + u} \cdot \color{blue}{1} \]
                6. Step-by-step derivation
                  1. Applied rewrites60.7%

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

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

                  Alternative 11: 53.2% accurate, 2.1× 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 / Float64(-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.3%

                    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in t1 around inf

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

                      \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
                    2. lower-/.f64N/A

                      \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
                    3. mul-1-negN/A

                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{t1} \]
                    4. lower-neg.f6454.0

                      \[\leadsto \frac{\color{blue}{-v}}{t1} \]
                  5. Applied rewrites54.0%

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

                    \[\leadsto \frac{v}{-t1} \]
                  7. Add Preprocessing

                  Reproduce

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