Rosa's DopplerBench

Percentage Accurate: 72.6% → 97.8%
Time: 10.2s
Alternatives: 13
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 72.6% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \frac{t1 \cdot \frac{v}{t1 + u}}{\left(-t1\right) - u} \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(t1 * Float64(v / Float64(t1 + u))) / Float64(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 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -4.69999999999999983e154 or 4.50000000000000031e156 < t1

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.69999999999999983e154 < t1 < 4.50000000000000031e156

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 87.7% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -4.69999999999999983e154

    1. Initial program 47.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.69999999999999983e154 < t1 < 4.50000000000000031e156

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

    if 4.50000000000000031e156 < t1

    1. Initial program 43.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.8% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -4.69999999999999983e154 or 4.50000000000000031e156 < t1

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.69999999999999983e154 < t1 < 4.50000000000000031e156

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 87.9% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -6.9999999999999998e153 or 4.50000000000000031e156 < t1

    1. Initial program 45.6%

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

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

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

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

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

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

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

    if -6.9999999999999998e153 < t1 < 4.50000000000000031e156

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

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

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

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

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

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

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

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

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

Alternative 6: 75.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -4.00000000000000025e-9 or 1.12e-116 < t1

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.00000000000000025e-9 < t1 < 1.12e-116

      1. Initial program 85.8%

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

        \[\leadsto \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-*.f6479.2

          \[\leadsto \frac{\left(-t1\right) \cdot v}{\color{blue}{u \cdot u}} \]
      5. Applied rewrites79.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. frac-2negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 75.9% accurate, 0.8× speedup?

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

      1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.00000000000000025e-9 < t1 < 1.12e-116

        1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 98.0% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 9: 97.9% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 10: 58.0% accurate, 1.0× speedup?

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

        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(\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. lift-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1 \cdot v}{\color{blue}{-u}} \]
          4. Applied rewrites45.0%

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

          if -5.59999999999999986e106 < u < 2.25000000000000005e201

          1. Initial program 75.7%

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5.6 \cdot 10^{+106}:\\ \;\;\;\;\frac{v \cdot 1}{-u}\\ \mathbf{elif}\;u \leq 2.25 \cdot 10^{+201}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v \cdot 1}{-u}\\ \end{array} \]
        11. Add Preprocessing

        Alternative 11: 61.5% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \frac{v}{t1 + u} \cdot \left(-1\right) \end{array} \]
        (FPCore (u v t1) :precision binary64 (* (/ v (+ t1 u)) (- 1.0)))
        double code(double u, double v, double t1) {
        	return (v / (t1 + u)) * -1.0;
        }
        
        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)) * -1.0d0
        end function
        
        public static double code(double u, double v, double t1) {
        	return (v / (t1 + u)) * -1.0;
        }
        
        def code(u, v, t1):
        	return (v / (t1 + u)) * -1.0
        
        function code(u, v, t1)
        	return Float64(Float64(v / Float64(t1 + u)) * Float64(-1.0))
        end
        
        function tmp = code(u, v, t1)
        	tmp = (v / (t1 + u)) * -1.0;
        end
        
        code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-1.0)), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{v}{t1 + u} \cdot \left(-1\right)
        \end{array}
        
        Derivation
        1. Initial program 76.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 61.3% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 13: 53.9% 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 76.6%

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

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

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

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

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

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

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

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

            Reproduce

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