Rosa's DopplerBench

Percentage Accurate: 71.7% → 97.7%
Time: 8.6s
Alternatives: 12
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 12 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: 71.7% accurate, 1.0× speedup?

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

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

Alternative 1: 97.7% accurate, 0.8× speedup?

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

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

    \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. lift-*.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{v}{t1 + u} \cdot \frac{-t1}{t1 + u}} \]
    6. lift-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{v}{u + t1} \cdot t1}{-\color{blue}{\left(u + t1\right)}} \]
    19. lower-+.f6498.1

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

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

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

Alternative 2: 89.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -1.76 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.76e47 or 5.80000000000000038e179 < t1

    1. Initial program 54.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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.76e47 < t1 < 5.80000000000000038e179

    1. Initial program 84.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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{v}{t1 + u} \cdot \frac{-t1}{t1 + u}} \]
      6. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t1}{\frac{\color{blue}{u + t1}}{v} \cdot \left(\mathsf{neg}\left(\left(t1 + u\right)\right)\right)} \]
      21. lower-neg.f6492.1

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

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

        \[\leadsto \frac{t1}{\frac{u + t1}{v} \cdot \left(-\color{blue}{\left(u + t1\right)}\right)} \]
      24. lower-+.f6492.1

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.76 \cdot 10^{+47}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+179}:\\ \;\;\;\;\frac{-t1}{\frac{t1 + u}{v} \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ \mathbf{if}\;t1 \leq -3.9 \cdot 10^{+156}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+76}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\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 (/ (- v) (+ t1 u))))
   (if (<= t1 -3.9e+156)
     t_1
     (if (<= t1 1.6e+76) (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))) t_1))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double tmp;
	if (t1 <= -3.9e+156) {
		tmp = t_1;
	} else if (t1 <= 1.6e+76) {
		tmp = (-t1 * v) / ((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 = -v / (t1 + u)
    if (t1 <= (-3.9d+156)) then
        tmp = t_1
    else if (t1 <= 1.6d+76) then
        tmp = (-t1 * v) / ((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 = -v / (t1 + u);
	double tmp;
	if (t1 <= -3.9e+156) {
		tmp = t_1;
	} else if (t1 <= 1.6e+76) {
		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + u)
	tmp = 0
	if t1 <= -3.9e+156:
		tmp = t_1
	elif t1 <= 1.6e+76:
		tmp = (-t1 * v) / ((t1 + u) * (t1 + u))
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + u))
	tmp = 0.0
	if (t1 <= -3.9e+156)
		tmp = t_1;
	elseif (t1 <= 1.6e+76)
		tmp = Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + u);
	tmp = 0.0;
	if (t1 <= -3.9e+156)
		tmp = t_1;
	elseif (t1 <= 1.6e+76)
		tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.9e+156], t$95$1, If[LessEqual[t1, 1.6e+76], N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -3.9 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+76}:\\
\;\;\;\;\frac{\left(-t1\right) \cdot v}{\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 < -3.8999999999999997e156 or 1.59999999999999988e76 < t1

    1. Initial program 53.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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999997e156 < t1 < 1.59999999999999988e76

    1. Initial program 86.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification87.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.9 \cdot 10^{+156}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+76}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 80.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -7.4 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -7.4e-44 or 8.1999999999999998e-7 < t1

    1. Initial program 65.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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{u + t1} \]
      2. lower-neg.f6483.0

        \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]
    7. Applied rewrites83.0%

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

    if -7.4e-44 < t1 < 8.1999999999999998e-7

    1. Initial program 86.4%

      \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{v}{t1 + u} \cdot \frac{-t1}{t1 + u}} \]
      6. lift-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{v}{u + t1} \cdot t1}{-\color{blue}{\left(u + t1\right)}} \]
      19. lower-+.f6496.1

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{v}{u}} \cdot t1}{-u} \]
    9. Step-by-step derivation
      1. lower-/.f6484.4

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

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

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

Alternative 5: 79.7% accurate, 0.7× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.00000000000000008e-43 or 8.1999999999999998e-7 < t1

    1. Initial program 65.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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{u + t1} \]
      2. lower-neg.f6483.0

        \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]
    7. Applied rewrites83.0%

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

    if -1.00000000000000008e-43 < t1 < 8.1999999999999998e-7

    1. Initial program 86.4%

      \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

        \[\leadsto \color{blue}{\frac{v}{t1 + u} \cdot \frac{-t1}{t1 + u}} \]
      6. lift-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{v}{u + t1} \cdot t1}{-\color{blue}{\left(u + t1\right)}} \]
      19. lower-+.f6496.1

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{v \cdot \frac{t1}{u}}}{-u} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{v \cdot \frac{t1}{u}}}{-u} \]
      4. lower-/.f6481.6

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

      \[\leadsto \frac{\color{blue}{v \cdot \frac{t1}{u}}}{-u} \]
    11. Step-by-step derivation
      1. Applied rewrites83.2%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1 \cdot 10^{-43}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 8.2 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{t1 \cdot v}{u}}{-u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]
    14. Add Preprocessing

    Alternative 6: 79.6% accurate, 0.7× speedup?

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

      1. Initial program 64.6%

        \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{u + t1} \]
        2. lower-neg.f6483.5

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

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

      if -1.00000000000000008e-43 < t1 < 0.0085000000000000006

      1. Initial program 86.6%

        \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

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

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

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

          \[\leadsto \color{blue}{\frac{v}{t1 + u} \cdot \frac{-t1}{t1 + u}} \]
        6. lift-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{v}{u + t1} \cdot t1}{-\color{blue}{\left(u + t1\right)}} \]
        19. lower-+.f6496.1

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

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

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

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

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

        \[\leadsto \frac{\frac{v}{u + t1} \cdot t1}{\color{blue}{-u}} \]
      8. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{v}{u + t1} \cdot t1}{-u}} \]
        2. lift-*.f64N/A

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

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

          \[\leadsto \color{blue}{\frac{v}{u + t1}} \cdot \frac{t1}{-u} \]
        5. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{u + t1}{v}}} \cdot \frac{t1}{-u} \]
        6. metadata-evalN/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{t1}{\frac{\color{blue}{t1 + u}}{v} \cdot \left(-u\right)} \]
        15. lower-/.f6480.3

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

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

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

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

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

        \[\leadsto \frac{t1}{\color{blue}{\frac{u}{v}} \cdot \left(-u\right)} \]
      11. Step-by-step derivation
        1. lower-/.f6482.1

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

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

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

    Alternative 7: 80.4% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ \mathbf{if}\;t1 \leq -1 \cdot 10^{-43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 8.2 \cdot 10^{-7}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (let* ((t_1 (/ (- v) (+ t1 u))))
       (if (<= t1 -1e-43) t_1 (if (<= t1 8.2e-7) (* (/ (- v) u) (/ t1 u)) t_1))))
    double code(double u, double v, double t1) {
    	double t_1 = -v / (t1 + u);
    	double tmp;
    	if (t1 <= -1e-43) {
    		tmp = t_1;
    	} else if (t1 <= 8.2e-7) {
    		tmp = (-v / u) * (t1 / u);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(u, v, t1)
        real(8), intent (in) :: u
        real(8), intent (in) :: v
        real(8), intent (in) :: t1
        real(8) :: t_1
        real(8) :: tmp
        t_1 = -v / (t1 + u)
        if (t1 <= (-1d-43)) then
            tmp = t_1
        else if (t1 <= 8.2d-7) then
            tmp = (-v / u) * (t1 / u)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double t_1 = -v / (t1 + u);
    	double tmp;
    	if (t1 <= -1e-43) {
    		tmp = t_1;
    	} else if (t1 <= 8.2e-7) {
    		tmp = (-v / u) * (t1 / u);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	t_1 = -v / (t1 + u)
    	tmp = 0
    	if t1 <= -1e-43:
    		tmp = t_1
    	elif t1 <= 8.2e-7:
    		tmp = (-v / u) * (t1 / u)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(u, v, t1)
    	t_1 = Float64(Float64(-v) / Float64(t1 + u))
    	tmp = 0.0
    	if (t1 <= -1e-43)
    		tmp = t_1;
    	elseif (t1 <= 8.2e-7)
    		tmp = Float64(Float64(Float64(-v) / u) * Float64(t1 / u));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	t_1 = -v / (t1 + u);
    	tmp = 0.0;
    	if (t1 <= -1e-43)
    		tmp = t_1;
    	elseif (t1 <= 8.2e-7)
    		tmp = (-v / u) * (t1 / u);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1e-43], t$95$1, If[LessEqual[t1, 8.2e-7], N[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{-v}{t1 + u}\\
    \mathbf{if}\;t1 \leq -1 \cdot 10^{-43}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t1 \leq 8.2 \cdot 10^{-7}:\\
    \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t1 < -1.00000000000000008e-43 or 8.1999999999999998e-7 < t1

      1. Initial program 65.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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{u + t1} \]
        2. lower-neg.f6483.0

          \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]
      7. Applied rewrites83.0%

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

      if -1.00000000000000008e-43 < t1 < 8.1999999999999998e-7

      1. Initial program 86.4%

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

        \[\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. distribute-neg-frac2N/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{t1}{\color{blue}{-u}} \cdot \frac{v}{u} \]
        11. lower-/.f6482.2

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

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

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

    Alternative 8: 77.6% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ \mathbf{if}\;t1 \leq -7.4 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 0.0042:\\ \;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (let* ((t_1 (/ (- v) (+ t1 u))))
       (if (<= t1 -7.4e-44) t_1 (if (<= t1 0.0042) (* (/ (- v) (* u u)) t1) t_1))))
    double code(double u, double v, double t1) {
    	double t_1 = -v / (t1 + u);
    	double tmp;
    	if (t1 <= -7.4e-44) {
    		tmp = t_1;
    	} else if (t1 <= 0.0042) {
    		tmp = (-v / (u * u)) * t1;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(u, v, t1)
        real(8), intent (in) :: u
        real(8), intent (in) :: v
        real(8), intent (in) :: t1
        real(8) :: t_1
        real(8) :: tmp
        t_1 = -v / (t1 + u)
        if (t1 <= (-7.4d-44)) then
            tmp = t_1
        else if (t1 <= 0.0042d0) then
            tmp = (-v / (u * u)) * t1
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double t_1 = -v / (t1 + u);
    	double tmp;
    	if (t1 <= -7.4e-44) {
    		tmp = t_1;
    	} else if (t1 <= 0.0042) {
    		tmp = (-v / (u * u)) * t1;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	t_1 = -v / (t1 + u)
    	tmp = 0
    	if t1 <= -7.4e-44:
    		tmp = t_1
    	elif t1 <= 0.0042:
    		tmp = (-v / (u * u)) * t1
    	else:
    		tmp = t_1
    	return tmp
    
    function code(u, v, t1)
    	t_1 = Float64(Float64(-v) / Float64(t1 + u))
    	tmp = 0.0
    	if (t1 <= -7.4e-44)
    		tmp = t_1;
    	elseif (t1 <= 0.0042)
    		tmp = Float64(Float64(Float64(-v) / Float64(u * u)) * t1);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	t_1 = -v / (t1 + u);
    	tmp = 0.0;
    	if (t1 <= -7.4e-44)
    		tmp = t_1;
    	elseif (t1 <= 0.0042)
    		tmp = (-v / (u * u)) * t1;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -7.4e-44], t$95$1, If[LessEqual[t1, 0.0042], N[(N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{-v}{t1 + u}\\
    \mathbf{if}\;t1 \leq -7.4 \cdot 10^{-44}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t1 \leq 0.0042:\\
    \;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t1 < -7.4e-44 or 0.00419999999999999974 < t1

      1. Initial program 64.6%

        \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{u + t1} \]
        2. lower-neg.f6483.5

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

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

      if -7.4e-44 < t1 < 0.00419999999999999974

      1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{v}{u \cdot u} \cdot \left(-t1\right)} \]
        6. lower-/.f6477.5

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

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

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

    Alternative 9: 77.6% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ \mathbf{if}\;t1 \leq -3.4 \cdot 10^{-45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 0.0042:\\ \;\;\;\;\frac{-t1}{u \cdot u} \cdot v\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (let* ((t_1 (/ (- v) (+ t1 u))))
       (if (<= t1 -3.4e-45) t_1 (if (<= t1 0.0042) (* (/ (- t1) (* u u)) v) t_1))))
    double code(double u, double v, double t1) {
    	double t_1 = -v / (t1 + u);
    	double tmp;
    	if (t1 <= -3.4e-45) {
    		tmp = t_1;
    	} else if (t1 <= 0.0042) {
    		tmp = (-t1 / (u * u)) * v;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(u, v, t1)
        real(8), intent (in) :: u
        real(8), intent (in) :: v
        real(8), intent (in) :: t1
        real(8) :: t_1
        real(8) :: tmp
        t_1 = -v / (t1 + u)
        if (t1 <= (-3.4d-45)) then
            tmp = t_1
        else if (t1 <= 0.0042d0) then
            tmp = (-t1 / (u * u)) * v
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double t_1 = -v / (t1 + u);
    	double tmp;
    	if (t1 <= -3.4e-45) {
    		tmp = t_1;
    	} else if (t1 <= 0.0042) {
    		tmp = (-t1 / (u * u)) * v;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	t_1 = -v / (t1 + u)
    	tmp = 0
    	if t1 <= -3.4e-45:
    		tmp = t_1
    	elif t1 <= 0.0042:
    		tmp = (-t1 / (u * u)) * v
    	else:
    		tmp = t_1
    	return tmp
    
    function code(u, v, t1)
    	t_1 = Float64(Float64(-v) / Float64(t1 + u))
    	tmp = 0.0
    	if (t1 <= -3.4e-45)
    		tmp = t_1;
    	elseif (t1 <= 0.0042)
    		tmp = Float64(Float64(Float64(-t1) / Float64(u * u)) * v);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	t_1 = -v / (t1 + u);
    	tmp = 0.0;
    	if (t1 <= -3.4e-45)
    		tmp = t_1;
    	elseif (t1 <= 0.0042)
    		tmp = (-t1 / (u * u)) * v;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.4e-45], t$95$1, If[LessEqual[t1, 0.0042], N[(N[((-t1) / N[(u * u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{-v}{t1 + u}\\
    \mathbf{if}\;t1 \leq -3.4 \cdot 10^{-45}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t1 \leq 0.0042:\\
    \;\;\;\;\frac{-t1}{u \cdot u} \cdot v\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t1 < -3.40000000000000004e-45 or 0.00419999999999999974 < t1

      1. Initial program 64.6%

        \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(v\right)}}{u + t1} \]
        2. lower-neg.f6483.5

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

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

      if -3.40000000000000004e-45 < t1 < 0.00419999999999999974

      1. Initial program 86.6%

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{v \cdot \frac{-t1}{u \cdot u}} \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{v \cdot \frac{-t1}{u \cdot u}} \]
        6. lower-/.f6471.7

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

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

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

    Alternative 10: 98.0% accurate, 0.8× speedup?

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

      \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-v\right) \cdot \frac{t1}{\color{blue}{u + t1}}}{t1 + u} \]
      17. lower-+.f6496.8

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

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

        \[\leadsto \frac{\left(-v\right) \cdot \frac{t1}{u + t1}}{\color{blue}{u + t1}} \]
      20. lower-+.f6496.8

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

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

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

    Alternative 11: 62.0% accurate, 1.8× speedup?

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

      \[\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(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(-v\right) \cdot \frac{t1}{\color{blue}{u + t1}}}{t1 + u} \]
      17. lower-+.f6496.8

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

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

        \[\leadsto \frac{\left(-v\right) \cdot \frac{t1}{u + t1}}{\color{blue}{u + t1}} \]
      20. lower-+.f6496.8

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

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

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

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

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

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

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

    Alternative 12: 54.5% 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(Float64(-v) / t1)
    end
    
    function tmp = code(u, v, t1)
    	tmp = -v / t1;
    end
    
    code[u_, v_, t1_] := N[((-v) / t1), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \frac{-v}{t1}
    \end{array}
    
    Derivation
    1. Initial program 75.1%

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

      \[\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.f6450.8

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

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

    Reproduce

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