Rosa's DopplerBench

Percentage Accurate: 71.6% → 97.9%
Time: 8.6s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 71.6% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.8× speedup?

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

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

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Add Preprocessing
  3. 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-/.f6498.6

      \[\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-+.f6498.6

      \[\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-+.f6498.6

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

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

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

Alternative 2: 87.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(-t1\right) \cdot v}{\left(u + t1\right) \cdot \left(u + t1\right)}\\ t_2 := \frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \mathbf{if}\;t1 \leq -1.45 \cdot 10^{+102}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t1 \leq -4.5 \cdot 10^{-140}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 1.66 \cdot 10^{-164}:\\ \;\;\;\;\frac{v}{\frac{-u}{t1} \cdot u}\\ \mathbf{elif}\;t1 \leq 3.8 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (* (- t1) v) (* (+ u t1) (+ u t1))))
        (t_2 (/ (- v) (fma 2.0 u t1))))
   (if (<= t1 -1.45e+102)
     t_2
     (if (<= t1 -4.5e-140)
       t_1
       (if (<= t1 1.66e-164)
         (/ v (* (/ (- u) t1) u))
         (if (<= t1 3.8e+46) t_1 t_2))))))
double code(double u, double v, double t1) {
	double t_1 = (-t1 * v) / ((u + t1) * (u + t1));
	double t_2 = -v / fma(2.0, u, t1);
	double tmp;
	if (t1 <= -1.45e+102) {
		tmp = t_2;
	} else if (t1 <= -4.5e-140) {
		tmp = t_1;
	} else if (t1 <= 1.66e-164) {
		tmp = v / ((-u / t1) * u);
	} else if (t1 <= 3.8e+46) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(u, v, t1)
	t_1 = Float64(Float64(Float64(-t1) * v) / Float64(Float64(u + t1) * Float64(u + t1)))
	t_2 = Float64(Float64(-v) / fma(2.0, u, t1))
	tmp = 0.0
	if (t1 <= -1.45e+102)
		tmp = t_2;
	elseif (t1 <= -4.5e-140)
		tmp = t_1;
	elseif (t1 <= 1.66e-164)
		tmp = Float64(v / Float64(Float64(Float64(-u) / t1) * u));
	elseif (t1 <= 3.8e+46)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-t1) * v), $MachinePrecision] / N[(N[(u + t1), $MachinePrecision] * N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-v) / N[(2.0 * u + t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.45e+102], t$95$2, If[LessEqual[t1, -4.5e-140], t$95$1, If[LessEqual[t1, 1.66e-164], N[(v / N[(N[((-u) / t1), $MachinePrecision] * u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.8e+46], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\left(-t1\right) \cdot v}{\left(u + t1\right) \cdot \left(u + t1\right)}\\
t_2 := \frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\
\mathbf{if}\;t1 \leq -1.45 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t1 \leq -4.5 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t1 \leq 3.8 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -1.4500000000000001e102 or 3.7999999999999999e46 < t1

    1. Initial program 46.7%

      \[\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. frac-2negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\color{blue}{2 \cdot u + t1}} \]
      2. lower-fma.f6488.4

        \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2, u, t1\right)}} \]
    9. Applied rewrites88.4%

      \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2, u, t1\right)}} \]

    if -1.4500000000000001e102 < t1 < -4.50000000000000004e-140 or 1.6599999999999999e-164 < t1 < 3.7999999999999999e46

    1. Initial program 89.1%

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

    if -4.50000000000000004e-140 < t1 < 1.6599999999999999e-164

    1. Initial program 72.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 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-/.f6487.2

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.45 \cdot 10^{+102}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \mathbf{elif}\;t1 \leq -4.5 \cdot 10^{-140}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(u + t1\right) \cdot \left(u + t1\right)}\\ \mathbf{elif}\;t1 \leq 1.66 \cdot 10^{-164}:\\ \;\;\;\;\frac{v}{\frac{-u}{t1} \cdot u}\\ \mathbf{elif}\;t1 \leq 3.8 \cdot 10^{+46}:\\ \;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(u + t1\right) \cdot \left(u + t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 76.9% accurate, 0.7× speedup?

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

      1. Initial program 67.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 \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-/.f6481.1

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

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

      if -8.99999999999999986e-8 < u < 3.3999999999999999e39

      1. Initial program 67.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 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.f6481.2

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

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

      if 3.3999999999999999e39 < u

      1. Initial program 76.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.f6499.9

          \[\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-+.f6499.9

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

        \[\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.f6485.1

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

        \[\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-/.f6485.0

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

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

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

    Alternative 4: 75.6% accurate, 0.7× speedup?

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

      1. Initial program 67.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 \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-/.f6481.1

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

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

      if -8.99999999999999986e-8 < u < 3.3999999999999999e39

      1. Initial program 67.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 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.f6481.2

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

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

      if 3.3999999999999999e39 < u

      1. Initial program 76.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.f6499.9

          \[\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-+.f6499.9

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

        \[\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.f6485.1

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

        \[\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. lower-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{t1 \cdot v}{u}}}{-u} \]
        2. lower-*.f6483.7

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

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

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

    Alternative 5: 76.0% accurate, 0.7× speedup?

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

      1. Initial program 67.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 \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-/.f6481.1

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

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

      if -8.99999999999999986e-8 < u < 3.3999999999999999e39

      1. Initial program 67.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 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.f6481.2

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

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

      if 3.3999999999999999e39 < u

      1. Initial program 76.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-/.f6483.4

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

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

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

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

      Alternative 6: 76.3% accurate, 0.7× speedup?

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

        1. Initial program 71.5%

          \[\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.1

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

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

        if -8.99999999999999986e-8 < u < 3.3999999999999999e39

        1. Initial program 67.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 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.f6481.2

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

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

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

      Alternative 7: 95.2% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -2 \cdot 10^{+191}:\\ \;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2 + \frac{u}{t1}, u, t1\right)}\\ \end{array} \end{array} \]
      (FPCore (u v t1)
       :precision binary64
       (if (<= u -2e+191)
         (* (/ t1 u) (/ (- v) (+ u t1)))
         (/ (- v) (fma (+ 2.0 (/ u t1)) u t1))))
      double code(double u, double v, double t1) {
      	double tmp;
      	if (u <= -2e+191) {
      		tmp = (t1 / u) * (-v / (u + t1));
      	} else {
      		tmp = -v / fma((2.0 + (u / t1)), u, t1);
      	}
      	return tmp;
      }
      
      function code(u, v, t1)
      	tmp = 0.0
      	if (u <= -2e+191)
      		tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / Float64(u + t1)));
      	else
      		tmp = Float64(Float64(-v) / fma(Float64(2.0 + Float64(u / t1)), u, t1));
      	end
      	return tmp
      end
      
      code[u_, v_, t1_] := If[LessEqual[u, -2e+191], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(N[(2.0 + N[(u / t1), $MachinePrecision]), $MachinePrecision] * u + t1), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;u \leq -2 \cdot 10^{+191}:\\
      \;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u + t1}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{-v}{\mathsf{fma}\left(2 + \frac{u}{t1}, u, t1\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if u < -2.00000000000000015e191

        1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-v}{u + t1} \cdot \color{blue}{\frac{t1}{u}} \]
        6. Step-by-step derivation
          1. lower-/.f6494.0

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

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

        if -2.00000000000000015e191 < u

        1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-v}{\color{blue}{u + t1}} \cdot \frac{t1}{t1 + u} \]
          17. lower-/.f6498.3

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

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

            \[\leadsto \frac{-v}{u + t1} \cdot \frac{t1}{\color{blue}{u + t1}} \]
          20. lower-+.f6498.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(t1 + u\right)}} \]
          18. lower-+.f6497.6

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

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

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

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

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

            \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2 + \frac{u}{t1}, u, t1\right)}} \]
          4. +-commutativeN/A

            \[\leadsto \frac{-v}{\mathsf{fma}\left(\color{blue}{\frac{u}{t1} + 2}, u, t1\right)} \]
          5. lower-+.f64N/A

            \[\leadsto \frac{-v}{\mathsf{fma}\left(\color{blue}{\frac{u}{t1} + 2}, u, t1\right)} \]
          6. lower-/.f6497.6

            \[\leadsto \frac{-v}{\mathsf{fma}\left(\color{blue}{\frac{u}{t1}} + 2, u, t1\right)} \]
        9. Applied rewrites97.6%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2 \cdot 10^{+191}:\\ \;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2 + \frac{u}{t1}, u, t1\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 72.4% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \mathbf{if}\;t1 \leq -1.08 \cdot 10^{+86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-142}:\\ \;\;\;\;\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) (fma 2.0 u t1))))
         (if (<= t1 -1.08e+86)
           t_1
           (if (<= t1 1.1e-142) (* (/ (- t1) (* u u)) v) t_1))))
      double code(double u, double v, double t1) {
      	double t_1 = -v / fma(2.0, u, t1);
      	double tmp;
      	if (t1 <= -1.08e+86) {
      		tmp = t_1;
      	} else if (t1 <= 1.1e-142) {
      		tmp = (-t1 / (u * u)) * v;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(u, v, t1)
      	t_1 = Float64(Float64(-v) / fma(2.0, u, t1))
      	tmp = 0.0
      	if (t1 <= -1.08e+86)
      		tmp = t_1;
      	elseif (t1 <= 1.1e-142)
      		tmp = Float64(Float64(Float64(-t1) / Float64(u * u)) * v);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(2.0 * u + t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.08e+86], t$95$1, If[LessEqual[t1, 1.1e-142], N[(N[((-t1) / N[(u * u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\
      \mathbf{if}\;t1 \leq -1.08 \cdot 10^{+86}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-142}:\\
      \;\;\;\;\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 < -1.07999999999999993e86 or 1.10000000000000008e-142 < t1

        1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-v}{\color{blue}{2 \cdot u + t1}} \]
          2. lower-fma.f6480.8

            \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2, u, t1\right)}} \]
        9. Applied rewrites80.8%

          \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2, u, t1\right)}} \]

        if -1.07999999999999993e86 < t1 < 1.10000000000000008e-142

        1. Initial program 77.8%

          \[\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-*.f6467.0

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

          \[\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. frac-2negN/A

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{v}{-1} \cdot \frac{t1}{u \cdot u}} \]
          10. div-invN/A

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.08 \cdot 10^{+86}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-142}:\\ \;\;\;\;\frac{-t1}{u \cdot u} \cdot v\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 74.4% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \mathbf{if}\;t1 \leq -27000000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-142}:\\ \;\;\;\;\frac{v}{\left(-u\right) \cdot u} \cdot t1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (u v t1)
       :precision binary64
       (let* ((t_1 (/ (- v) (fma 2.0 u t1))))
         (if (<= t1 -27000000000000.0)
           t_1
           (if (<= t1 1.1e-142) (* (/ v (* (- u) u)) t1) t_1))))
      double code(double u, double v, double t1) {
      	double t_1 = -v / fma(2.0, u, t1);
      	double tmp;
      	if (t1 <= -27000000000000.0) {
      		tmp = t_1;
      	} else if (t1 <= 1.1e-142) {
      		tmp = (v / (-u * u)) * t1;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(u, v, t1)
      	t_1 = Float64(Float64(-v) / fma(2.0, u, t1))
      	tmp = 0.0
      	if (t1 <= -27000000000000.0)
      		tmp = t_1;
      	elseif (t1 <= 1.1e-142)
      		tmp = Float64(Float64(v / Float64(Float64(-u) * u)) * t1);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(2.0 * u + t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -27000000000000.0], t$95$1, If[LessEqual[t1, 1.1e-142], N[(N[(v / N[((-u) * u), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\
      \mathbf{if}\;t1 \leq -27000000000000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-142}:\\
      \;\;\;\;\frac{v}{\left(-u\right) \cdot u} \cdot t1\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t1 < -2.7e13 or 1.10000000000000008e-142 < t1

        1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-v}{\color{blue}{2 \cdot u + t1}} \]
          2. lower-fma.f6478.4

            \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2, u, t1\right)}} \]
        9. Applied rewrites78.4%

          \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2, u, t1\right)}} \]

        if -2.7e13 < t1 < 1.10000000000000008e-142

        1. Initial program 77.7%

          \[\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.5

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

          \[\leadsto \color{blue}{\frac{t1}{-u} \cdot \frac{v}{u}} \]
        6. Step-by-step derivation
          1. Applied rewrites71.9%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -27000000000000:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-142}:\\ \;\;\;\;\frac{v}{\left(-u\right) \cdot u} \cdot t1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 10: 97.9% accurate, 0.8× speedup?

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

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. Add Preprocessing
        3. 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. frac-2negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-v}{\color{blue}{u + t1}} \cdot \frac{t1}{t1 + u} \]
          17. lower-/.f6498.5

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

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

            \[\leadsto \frac{-v}{u + t1} \cdot \frac{t1}{\color{blue}{u + t1}} \]
          20. lower-+.f6498.5

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

          \[\leadsto \color{blue}{\frac{-v}{u + t1} \cdot \frac{t1}{u + t1}} \]
        5. Add Preprocessing

        Alternative 11: 61.1% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;v \leq 4.9 \cdot 10^{+234}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1}\\ \end{array} \end{array} \]
        (FPCore (u v t1)
         :precision binary64
         (if (<= v 4.9e+234) (/ (- v) (fma 2.0 u t1)) (/ (- v) t1)))
        double code(double u, double v, double t1) {
        	double tmp;
        	if (v <= 4.9e+234) {
        		tmp = -v / fma(2.0, u, t1);
        	} else {
        		tmp = -v / t1;
        	}
        	return tmp;
        }
        
        function code(u, v, t1)
        	tmp = 0.0
        	if (v <= 4.9e+234)
        		tmp = Float64(Float64(-v) / fma(2.0, u, t1));
        	else
        		tmp = Float64(Float64(-v) / t1);
        	end
        	return tmp
        end
        
        code[u_, v_, t1_] := If[LessEqual[v, 4.9e+234], N[((-v) / N[(2.0 * u + t1), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;v \leq 4.9 \cdot 10^{+234}:\\
        \;\;\;\;\frac{-v}{\mathsf{fma}\left(2, u, t1\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{-v}{t1}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if v < 4.89999999999999989e234

          1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-v}{\color{blue}{u + t1}} \cdot \frac{t1}{t1 + u} \]
            17. lower-/.f6498.8

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

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

              \[\leadsto \frac{-v}{u + t1} \cdot \frac{t1}{\color{blue}{u + t1}} \]
            20. lower-+.f6498.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-v}{\color{blue}{2 \cdot u + t1}} \]
            2. lower-fma.f6461.9

              \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2, u, t1\right)}} \]
          9. Applied rewrites61.9%

            \[\leadsto \frac{-v}{\color{blue}{\mathsf{fma}\left(2, u, t1\right)}} \]

          if 4.89999999999999989e234 < v

          1. Initial program 50.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 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.f6445.6

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

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

        Alternative 12: 60.6% accurate, 1.3× speedup?

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

          1. Initial program 70.7%

            \[\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-/.f6498.6

              \[\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-+.f6498.6

              \[\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-+.f6498.6

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

            \[\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.f6461.4

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

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

          if 5.8000000000000003e225 < v

          1. Initial program 52.9%

            \[\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.f6443.7

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

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

        Alternative 13: 53.8% 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 69.3%

          \[\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.f6455.0

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

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

        Reproduce

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