Rosa's DopplerBench

Percentage Accurate: 73.1% → 98.2%
Time: 8.1s
Alternatives: 12
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 73.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 83.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(-t1\right) \cdot v}{\left(u + t1\right) \cdot \left(u + t1\right)}\\ \mathbf{if}\;u \leq -4.1 \cdot 10^{+154}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{elif}\;u \leq -5.2 \cdot 10^{-62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 5.2 \cdot 10^{-117}:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{elif}\;u \leq 5 \cdot 10^{+141}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t1}{u} \cdot \left(-v\right)}{u + t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (* (- t1) v) (* (+ u t1) (+ u t1)))))
   (if (<= u -4.1e+154)
     (* (/ (- v) u) (/ t1 u))
     (if (<= u -5.2e-62)
       t_1
       (if (<= u 5.2e-117)
         (/ v (fma -2.0 u (- t1)))
         (if (<= u 5e+141) t_1 (/ (* (/ t1 u) (- v)) (+ u t1))))))))
double code(double u, double v, double t1) {
	double t_1 = (-t1 * v) / ((u + t1) * (u + t1));
	double tmp;
	if (u <= -4.1e+154) {
		tmp = (-v / u) * (t1 / u);
	} else if (u <= -5.2e-62) {
		tmp = t_1;
	} else if (u <= 5.2e-117) {
		tmp = v / fma(-2.0, u, -t1);
	} else if (u <= 5e+141) {
		tmp = t_1;
	} else {
		tmp = ((t1 / u) * -v) / (u + t1);
	}
	return tmp;
}
function code(u, v, t1)
	t_1 = Float64(Float64(Float64(-t1) * v) / Float64(Float64(u + t1) * Float64(u + t1)))
	tmp = 0.0
	if (u <= -4.1e+154)
		tmp = Float64(Float64(Float64(-v) / u) * Float64(t1 / u));
	elseif (u <= -5.2e-62)
		tmp = t_1;
	elseif (u <= 5.2e-117)
		tmp = Float64(v / fma(-2.0, u, Float64(-t1)));
	elseif (u <= 5e+141)
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(t1 / u) * Float64(-v)) / Float64(u + t1));
	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]}, If[LessEqual[u, -4.1e+154], N[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -5.2e-62], t$95$1, If[LessEqual[u, 5.2e-117], N[(v / N[(-2.0 * u + (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 5e+141], t$95$1, N[(N[(N[(t1 / u), $MachinePrecision] * (-v)), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;u \leq -5.2 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq 5.2 \cdot 10^{-117}:\\
\;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\

\mathbf{elif}\;u \leq 5 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if u < -4.1e154

    1. Initial program 58.2%

      \[\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-/.f6493.2

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

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

    if -4.1e154 < u < -5.1999999999999999e-62 or 5.19999999999999966e-117 < u < 5.00000000000000025e141

    1. Initial program 86.2%

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

    if -5.1999999999999999e-62 < u < 5.19999999999999966e-117

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{\mathsf{neg}\left(t1\right)}\right)} \]
      3. lower-neg.f6483.7

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

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

        \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
      2. *-lft-identity83.7

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

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

    if 5.00000000000000025e141 < u

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.8% 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}{u} \cdot \frac{t1}{u}\\ \mathbf{if}\;u \leq -4.1 \cdot 10^{+154}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;u \leq -5.2 \cdot 10^{-62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 5.2 \cdot 10^{-117}:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{elif}\;u \leq 5.5 \cdot 10^{+141}:\\ \;\;\;\;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) u) (/ t1 u))))
   (if (<= u -4.1e+154)
     t_2
     (if (<= u -5.2e-62)
       t_1
       (if (<= u 5.2e-117)
         (/ v (fma -2.0 u (- t1)))
         (if (<= u 5.5e+141) 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 / u) * (t1 / u);
	double tmp;
	if (u <= -4.1e+154) {
		tmp = t_2;
	} else if (u <= -5.2e-62) {
		tmp = t_1;
	} else if (u <= 5.2e-117) {
		tmp = v / fma(-2.0, u, -t1);
	} else if (u <= 5.5e+141) {
		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(Float64(-v) / u) * Float64(t1 / u))
	tmp = 0.0
	if (u <= -4.1e+154)
		tmp = t_2;
	elseif (u <= -5.2e-62)
		tmp = t_1;
	elseif (u <= 5.2e-117)
		tmp = Float64(v / fma(-2.0, u, Float64(-t1)));
	elseif (u <= 5.5e+141)
		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[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4.1e+154], t$95$2, If[LessEqual[u, -5.2e-62], t$95$1, If[LessEqual[u, 5.2e-117], N[(v / N[(-2.0 * u + (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 5.5e+141], 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}{u} \cdot \frac{t1}{u}\\
\mathbf{if}\;u \leq -4.1 \cdot 10^{+154}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;u \leq -5.2 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq 5.2 \cdot 10^{-117}:\\
\;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\

\mathbf{elif}\;u \leq 5.5 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -4.1e154 or 5.49999999999999967e141 < u

    1. Initial program 61.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-/.f6489.0

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

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

    if -4.1e154 < u < -5.1999999999999999e-62 or 5.19999999999999966e-117 < u < 5.49999999999999967e141

    1. Initial program 86.2%

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

    if -5.1999999999999999e-62 < u < 5.19999999999999966e-117

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{\mathsf{neg}\left(t1\right)}\right)} \]
      3. lower-neg.f6483.7

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

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

        \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
      2. *-lft-identity83.7

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

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

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

Alternative 4: 77.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{elif}\;u \leq 1.35 \cdot 10^{+17}:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{elif}\;u \leq 4.8 \cdot 10^{+228}:\\ \;\;\;\;\frac{-t1}{\frac{u}{v} \cdot u}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-t1}{u} \cdot v}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u -3.4e+24)
   (* (/ (- v) u) (/ t1 u))
   (if (<= u 1.35e+17)
     (/ v (fma -2.0 u (- t1)))
     (if (<= u 4.8e+228) (/ (- t1) (* (/ u v) u)) (/ (* (/ (- t1) u) v) u)))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= -3.4e+24) {
		tmp = (-v / u) * (t1 / u);
	} else if (u <= 1.35e+17) {
		tmp = v / fma(-2.0, u, -t1);
	} else if (u <= 4.8e+228) {
		tmp = -t1 / ((u / v) * u);
	} else {
		tmp = ((-t1 / u) * v) / u;
	}
	return tmp;
}
function code(u, v, t1)
	tmp = 0.0
	if (u <= -3.4e+24)
		tmp = Float64(Float64(Float64(-v) / u) * Float64(t1 / u));
	elseif (u <= 1.35e+17)
		tmp = Float64(v / fma(-2.0, u, Float64(-t1)));
	elseif (u <= 4.8e+228)
		tmp = Float64(Float64(-t1) / Float64(Float64(u / v) * u));
	else
		tmp = Float64(Float64(Float64(Float64(-t1) / u) * v) / u);
	end
	return tmp
end
code[u_, v_, t1_] := If[LessEqual[u, -3.4e+24], N[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.35e+17], N[(v / N[(-2.0 * u + (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.8e+228], N[((-t1) / N[(N[(u / v), $MachinePrecision] * u), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-t1) / u), $MachinePrecision] * v), $MachinePrecision] / u), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;u \leq 1.35 \cdot 10^{+17}:\\
\;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if u < -3.4000000000000001e24

    1. Initial program 69.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 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}} \]

    if -3.4000000000000001e24 < u < 1.35e17

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{\mathsf{neg}\left(t1\right)}\right)} \]
      3. lower-neg.f6471.4

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

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

        \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
      2. *-lft-identity71.4

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

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

    if 1.35e17 < u < 4.79999999999999977e228

    1. Initial program 79.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 \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-/.f6472.3

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

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

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

      if 4.79999999999999977e228 < u

      1. Initial program 52.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-/.f6495.8

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{elif}\;u \leq 1.35 \cdot 10^{+17}:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{elif}\;u \leq 4.8 \cdot 10^{+228}:\\ \;\;\;\;\frac{-t1}{\frac{u}{v} \cdot u}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-t1}{u} \cdot v}{u}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 5: 77.1% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{if}\;u \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 1.35 \cdot 10^{+17}:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{elif}\;u \leq 4.8 \cdot 10^{+228}:\\ \;\;\;\;\frac{-t1}{\frac{u}{v} \cdot u}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (u v t1)
       :precision binary64
       (let* ((t_1 (* (/ (- v) u) (/ t1 u))))
         (if (<= u -3.4e+24)
           t_1
           (if (<= u 1.35e+17)
             (/ v (fma -2.0 u (- t1)))
             (if (<= u 4.8e+228) (/ (- t1) (* (/ u v) u)) t_1)))))
      double code(double u, double v, double t1) {
      	double t_1 = (-v / u) * (t1 / u);
      	double tmp;
      	if (u <= -3.4e+24) {
      		tmp = t_1;
      	} else if (u <= 1.35e+17) {
      		tmp = v / fma(-2.0, u, -t1);
      	} else if (u <= 4.8e+228) {
      		tmp = -t1 / ((u / v) * u);
      	} 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 <= -3.4e+24)
      		tmp = t_1;
      	elseif (u <= 1.35e+17)
      		tmp = Float64(v / fma(-2.0, u, Float64(-t1)));
      	elseif (u <= 4.8e+228)
      		tmp = Float64(Float64(-t1) / Float64(Float64(u / v) * u));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -3.4e+24], t$95$1, If[LessEqual[u, 1.35e+17], N[(v / N[(-2.0 * u + (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.8e+228], N[((-t1) / N[(N[(u / v), $MachinePrecision] * u), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{-v}{u} \cdot \frac{t1}{u}\\
      \mathbf{if}\;u \leq -3.4 \cdot 10^{+24}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;u \leq 1.35 \cdot 10^{+17}:\\
      \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\
      
      \mathbf{elif}\;u \leq 4.8 \cdot 10^{+228}:\\
      \;\;\;\;\frac{-t1}{\frac{u}{v} \cdot u}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if u < -3.4000000000000001e24 or 4.79999999999999977e228 < u

        1. Initial program 66.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 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-/.f6485.6

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

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

        if -3.4000000000000001e24 < u < 1.35e17

        1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{\mathsf{neg}\left(t1\right)}\right)} \]
          3. lower-neg.f6471.4

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

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

            \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
          2. *-lft-identity71.4

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

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

        if 1.35e17 < u < 4.79999999999999977e228

        1. Initial program 79.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 \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-/.f6472.3

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{elif}\;u \leq 1.35 \cdot 10^{+17}:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{elif}\;u \leq 4.8 \cdot 10^{+228}:\\ \;\;\;\;\frac{-t1}{\frac{u}{v} \cdot u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 6: 90.3% accurate, 0.6× speedup?

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

          1. Initial program 43.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.f6494.1

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

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

          if -2.3999999999999998e169 < t1 < 1.48e85

          1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.48e85 < t1

          1. Initial program 47.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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{-t1}\right)} \]
          7. Applied rewrites76.6%

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

              \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
            2. *-lft-identity76.6

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

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

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

        Alternative 7: 76.0% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{u} \cdot \frac{t1}{u}\\ \mathbf{if}\;u \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 2.8 \cdot 10^{-55}:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (u v t1)
         :precision binary64
         (let* ((t_1 (* (/ (- v) u) (/ t1 u))))
           (if (<= u -3.4e+24) t_1 (if (<= u 2.8e-55) (/ v (fma -2.0 u (- t1))) t_1))))
        double code(double u, double v, double t1) {
        	double t_1 = (-v / u) * (t1 / u);
        	double tmp;
        	if (u <= -3.4e+24) {
        		tmp = t_1;
        	} else if (u <= 2.8e-55) {
        		tmp = v / fma(-2.0, u, -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 <= -3.4e+24)
        		tmp = t_1;
        	elseif (u <= 2.8e-55)
        		tmp = Float64(v / fma(-2.0, u, Float64(-t1)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -3.4e+24], t$95$1, If[LessEqual[u, 2.8e-55], N[(v / N[(-2.0 * u + (-t1)), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{-v}{u} \cdot \frac{t1}{u}\\
        \mathbf{if}\;u \leq -3.4 \cdot 10^{+24}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;u \leq 2.8 \cdot 10^{-55}:\\
        \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if u < -3.4000000000000001e24 or 2.79999999999999984e-55 < u

          1. Initial program 73.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 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-/.f6477.0

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

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

          if -3.4000000000000001e24 < u < 2.79999999999999984e-55

          1. Initial program 64.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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{\mathsf{neg}\left(t1\right)}\right)} \]
            3. lower-neg.f6475.7

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

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

              \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
            2. *-lft-identity75.7

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

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

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

        Alternative 8: 77.2% 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 -80000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 6.2 \cdot 10^{-36}:\\ \;\;\;\;\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 -80000.0)
             t_1
             (if (<= t1 6.2e-36) (* (/ (- 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 <= -80000.0) {
        		tmp = t_1;
        	} else if (t1 <= 6.2e-36) {
        		tmp = (-t1 / (u * u)) * v;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(u, v, t1)
        	t_1 = Float64(v / fma(-2.0, u, Float64(-t1)))
        	tmp = 0.0
        	if (t1 <= -80000.0)
        		tmp = t_1;
        	elseif (t1 <= 6.2e-36)
        		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, -80000.0], t$95$1, If[LessEqual[t1, 6.2e-36], 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 -80000:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t1 \leq 6.2 \cdot 10^{-36}:\\
        \;\;\;\;\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 < -8e4 or 6.1999999999999997e-36 < t1

          1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{\mathsf{neg}\left(t1\right)}\right)} \]
            3. lower-neg.f6475.9

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

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

              \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
            2. *-lft-identity75.9

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

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

          if -8e4 < t1 < 6.1999999999999997e-36

          1. Initial program 79.6%

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(-t1\right) \cdot v}{\mathsf{fma}\left(\color{blue}{u + t1}, u, \left(t1 + u\right) \cdot t1\right)} \]
            9. lower-*.f6479.5

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

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

              \[\leadsto \frac{\left(-t1\right) \cdot v}{\mathsf{fma}\left(u + t1, u, \color{blue}{\left(u + t1\right)} \cdot t1\right)} \]
            12. lower-+.f6479.5

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -80000:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{elif}\;t1 \leq 6.2 \cdot 10^{-36}:\\ \;\;\;\;\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: 78.0% 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 -6.3 \cdot 10^{-74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 6.2 \cdot 10^{-36}:\\ \;\;\;\;\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 -6.3e-74)
             t_1
             (if (<= t1 6.2e-36) (* (/ 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 <= -6.3e-74) {
        		tmp = t_1;
        	} else if (t1 <= 6.2e-36) {
        		tmp = (v / (-u * u)) * t1;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(u, v, t1)
        	t_1 = Float64(v / fma(-2.0, u, Float64(-t1)))
        	tmp = 0.0
        	if (t1 <= -6.3e-74)
        		tmp = t_1;
        	elseif (t1 <= 6.2e-36)
        		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, -6.3e-74], t$95$1, If[LessEqual[t1, 6.2e-36], 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 -6.3 \cdot 10^{-74}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t1 \leq 6.2 \cdot 10^{-36}:\\
        \;\;\;\;\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 < -6.30000000000000003e-74 or 6.1999999999999997e-36 < t1

          1. Initial program 65.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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{\mathsf{neg}\left(t1\right)}\right)} \]
            3. lower-neg.f6473.3

              \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{-t1}\right)} \]
          7. Applied rewrites73.3%

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

              \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
            2. *-lft-identity73.3

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

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

          if -6.30000000000000003e-74 < t1 < 6.1999999999999997e-36

          1. Initial program 75.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 \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-/.f6478.8

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -6.3 \cdot 10^{-74}:\\ \;\;\;\;\frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}\\ \mathbf{elif}\;t1 \leq 6.2 \cdot 10^{-36}:\\ \;\;\;\;\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: 62.4% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \frac{v}{\mathsf{fma}\left(-2, u, -t1\right)} \end{array} \]
          (FPCore (u v t1) :precision binary64 (/ v (fma -2.0 u (- t1))))
          double code(double u, double v, double t1) {
          	return v / fma(-2.0, u, -t1);
          }
          
          function code(u, v, t1)
          	return Float64(v / fma(-2.0, u, Float64(-t1)))
          end
          
          code[u_, v_, t1_] := N[(v / N[(-2.0 * u + (-t1)), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{v}{\mathsf{fma}\left(-2, u, -t1\right)}
          \end{array}
          
          Derivation
          1. Initial program 69.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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1 \cdot v}{\mathsf{fma}\left(-2, u, \color{blue}{\mathsf{neg}\left(t1\right)}\right)} \]
            3. lower-neg.f6455.4

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

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

              \[\leadsto \frac{\color{blue}{1 \cdot v}}{\mathsf{fma}\left(-2, u, -t1\right)} \]
            2. *-lft-identity55.4

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

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

          Alternative 11: 61.9% accurate, 1.8× speedup?

          \[\begin{array}{l} \\ \frac{-v}{u + t1} \end{array} \]
          (FPCore (u v t1) :precision binary64 (/ (- v) (+ u t1)))
          double code(double u, double v, double t1) {
          	return -v / (u + t1);
          }
          
          real(8) function code(u, v, t1)
              real(8), intent (in) :: u
              real(8), intent (in) :: v
              real(8), intent (in) :: t1
              code = -v / (u + t1)
          end function
          
          public static double code(double u, double v, double t1) {
          	return -v / (u + t1);
          }
          
          def code(u, v, t1):
          	return -v / (u + t1)
          
          function code(u, v, t1)
          	return Float64(Float64(-v) / Float64(u + t1))
          end
          
          function tmp = code(u, v, t1)
          	tmp = -v / (u + t1);
          end
          
          code[u_, v_, t1_] := N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{-v}{u + t1}
          \end{array}
          
          Derivation
          1. Initial program 69.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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 54.3% 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.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.f6447.2

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

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

          Reproduce

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