Rosa's DopplerBench

Percentage Accurate: 72.3% → 97.7%
Time: 9.6s
Alternatives: 12
Speedup: 0.9×

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: 72.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.7% accurate, 0.7× speedup?

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

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

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

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

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

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

      \[\leadsto \frac{v \cdot \left(\mathsf{neg}\left(t1\right)\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{\mathsf{neg}\left(t1\right)}{t1 + u}} \]
    6. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t1 \cdot v}{\left(-\left(t1 + u\right)\right) \cdot \left(t1 + u\right)}\\ \mathbf{if}\;t1 \leq -3.5 \cdot 10^{+136}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{elif}\;t1 \leq -2.35 \cdot 10^{-136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 3.6 \cdot 10^{-186}:\\ \;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u}\\ \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{+109}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(u, 2, t1\right)}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (* t1 v) (* (- (+ t1 u)) (+ t1 u)))))
   (if (<= t1 -3.5e+136)
     (/ (- v) t1)
     (if (<= t1 -2.35e-136)
       t_1
       (if (<= t1 3.6e-186)
         (* (/ t1 u) (/ (- v) u))
         (if (<= t1 2.5e+109) t_1 (/ (- v) (fma u 2.0 t1))))))))
double code(double u, double v, double t1) {
	double t_1 = (t1 * v) / (-(t1 + u) * (t1 + u));
	double tmp;
	if (t1 <= -3.5e+136) {
		tmp = -v / t1;
	} else if (t1 <= -2.35e-136) {
		tmp = t_1;
	} else if (t1 <= 3.6e-186) {
		tmp = (t1 / u) * (-v / u);
	} else if (t1 <= 2.5e+109) {
		tmp = t_1;
	} else {
		tmp = -v / fma(u, 2.0, t1);
	}
	return tmp;
}
function code(u, v, t1)
	t_1 = Float64(Float64(t1 * v) / Float64(Float64(-Float64(t1 + u)) * Float64(t1 + u)))
	tmp = 0.0
	if (t1 <= -3.5e+136)
		tmp = Float64(Float64(-v) / t1);
	elseif (t1 <= -2.35e-136)
		tmp = t_1;
	elseif (t1 <= 3.6e-186)
		tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / u));
	elseif (t1 <= 2.5e+109)
		tmp = t_1;
	else
		tmp = Float64(Float64(-v) / fma(u, 2.0, t1));
	end
	return tmp
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 * v), $MachinePrecision] / N[((-N[(t1 + u), $MachinePrecision]) * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.5e+136], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, -2.35e-136], t$95$1, If[LessEqual[t1, 3.6e-186], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.5e+109], t$95$1, N[((-v) / N[(u * 2.0 + t1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -2.35 \cdot 10^{-136}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t1 \leq 2.5 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{-v}{\mathsf{fma}\left(u, 2, t1\right)}\\


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

    1. Initial program 47.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in u around 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.f6493.3

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

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

    if -3.50000000000000001e136 < t1 < -2.35000000000000011e-136 or 3.5999999999999998e-186 < t1 < 2.5000000000000001e109

    1. Initial program 94.3%

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

    if -2.35000000000000011e-136 < t1 < 3.5999999999999998e-186

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000001e109 < t1

    1. Initial program 36.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 \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{{u}^{2}}} \]
    4. Step-by-step derivation
      1. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 87.1% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -6.0000000000000002e38 or 1.59999999999999987e135 < t1

    1. Initial program 51.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 \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{{u}^{2}}} \]
    4. Step-by-step derivation
      1. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000002e38 < t1 < -4.5000000000000001e-146 or 2.6e-162 < t1 < 1.59999999999999987e135

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5000000000000001e-146 < t1 < 2.6e-162

    1. Initial program 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -6 \cdot 10^{+38}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(u, 2, t1\right)}\\ \mathbf{elif}\;t1 \leq -4.5 \cdot 10^{-146}:\\ \;\;\;\;\frac{-v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot t1\\ \mathbf{elif}\;t1 \leq 2.6 \cdot 10^{-162}:\\ \;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u}\\ \mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+135}:\\ \;\;\;\;\frac{-v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot t1\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{\mathsf{fma}\left(u, 2, t1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 78.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-v}{\mathsf{fma}\left(u, 2, t1\right)}\\
\mathbf{if}\;t1 \leq -2.3 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.30000000000000007e-122 or 8.50000000000000006e-52 < t1

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000007e-122 < t1 < 8.50000000000000006e-52

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 76.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-v}{\mathsf{fma}\left(u, 2, t1\right)}\\
\mathbf{if}\;t1 \leq -2.3 \cdot 10^{-122}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.30000000000000007e-122 or 3.99999999999999998e-55 < t1

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000007e-122 < t1 < 3.99999999999999998e-55

    1. Initial program 78.8%

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

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

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

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

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

Alternative 6: 75.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.30000000000000007e-122 or 3.99999999999999998e-55 < t1

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000007e-122 < t1 < 3.99999999999999998e-55

    1. Initial program 78.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 97.9% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 94.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \frac{-v}{\mathsf{fma}\left(2 + \frac{u}{t1}, u, t1\right)} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (- v) (fma (+ 2.0 (/ u t1)) u t1)))
double code(double u, double v, double t1) {
	return -v / fma((2.0 + (u / t1)), u, t1);
}
function code(u, v, t1)
	return Float64(Float64(-v) / fma(Float64(2.0 + Float64(u / t1)), u, t1))
end
code[u_, v_, t1_] := N[((-v) / N[(N[(2.0 + N[(u / t1), $MachinePrecision]), $MachinePrecision] * u + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{-v}{\mathsf{fma}\left(2 + \frac{u}{t1}, u, t1\right)}
\end{array}
Derivation
  1. Initial program 73.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 \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{{u}^{2}}} \]
  4. Step-by-step derivation
    1. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 58.4% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.60000000000000015e166 or 2.4999999999999999e146 < u

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.60000000000000015e166 < u < 2.4999999999999999e146

      1. Initial program 72.1%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in u around 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.f6469.2

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.6 \cdot 10^{+166}:\\ \;\;\;\;1 \cdot \frac{-v}{u}\\ \mathbf{elif}\;u \leq 2.5 \cdot 10^{+146}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \frac{-v}{u}\\ \end{array} \]
    12. Add Preprocessing

    Alternative 10: 61.9% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \frac{-v}{\mathsf{fma}\left(u, 2, t1\right)} \end{array} \]
    (FPCore (u v t1) :precision binary64 (/ (- v) (fma u 2.0 t1)))
    double code(double u, double v, double t1) {
    	return -v / fma(u, 2.0, t1);
    }
    
    function code(u, v, t1)
    	return Float64(Float64(-v) / fma(u, 2.0, t1))
    end
    
    code[u_, v_, t1_] := N[((-v) / N[(u * 2.0 + t1), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \frac{-v}{\mathsf{fma}\left(u, 2, t1\right)}
    \end{array}
    
    Derivation
    1. Initial program 73.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 \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{{u}^{2}}} \]
    4. Step-by-step derivation
      1. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 61.5% accurate, 1.5× speedup?

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

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

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

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

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

        \[\leadsto \frac{v \cdot \left(\mathsf{neg}\left(t1\right)\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{\mathsf{neg}\left(t1\right)}{t1 + u}} \]
      6. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{v}{-1 \cdot \left(u + t1\right)}} \]
        5. lower-*.f6464.4

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

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

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

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

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

      Alternative 12: 53.5% accurate, 2.1× speedup?

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

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

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

      Reproduce

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