Rosa's DopplerBench

Percentage Accurate: 72.5% → 97.9%
Time: 10.4s
Alternatives: 10
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 10 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.7× speedup?

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

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

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

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

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

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

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

Alternative 2: 84.6% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (neg.f64 t1) v) (*.f64 (+.f64 t1 u) (+.f64 t1 u))) < 2e229

    1. Initial program 85.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. 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-/.f6488.4

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

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

    if 2e229 < (/.f64 (*.f64 (neg.f64 t1) v) (*.f64 (+.f64 t1 u) (+.f64 t1 u)))

    1. Initial program 20.0%

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

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

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

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

Alternative 3: 95.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -5.6999999999999999e174

    1. Initial program 73.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.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{t1}{\frac{t1 + u}{v}}}{\mathsf{neg}\left(\left(t1 + u\right)\right)}} \]
    6. Applied rewrites99.9%

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

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

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

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

    if -5.6999999999999999e174 < u

    1. Initial program 75.1%

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

        \[\leadsto \color{blue}{\frac{\left(\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-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 76.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -8.4999999999999994e-84 or 2.2e-51 < t1

    1. Initial program 73.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. 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-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -8.4999999999999994e-84 < t1 < 2.2e-51

      1. Initial program 77.8%

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

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

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

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

    Alternative 5: 98.0% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \frac{v}{t1 + u} \cdot \frac{t1}{\left(-t1\right) - u} \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(t1 / Float64(Float64(-t1) - u)))
    end
    
    function tmp = code(u, v, t1)
    	tmp = (v / (t1 + u)) * (t1 / (-t1 - u));
    end
    
    code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \frac{v}{t1 + u} \cdot \frac{t1}{\left(-t1\right) - u}
    \end{array}
    
    Derivation
    1. Initial program 74.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-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-/.f6498.1

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

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

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

    Alternative 6: 68.6% accurate, 0.9× speedup?

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

      1. Initial program 79.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 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-*.f6475.3

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

        \[\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. div-invN/A

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

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

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

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

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

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

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

          \[\leadsto \left(\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{u \cdot u}} \cdot \left(\mathsf{neg}\left(t1\right)\right)\right) \cdot v \]
        10. metadata-eval73.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{v}{u \cdot u} \cdot \color{blue}{\frac{0 \cdot 0 - \left(\mathsf{neg}\left(t1\right)\right) \cdot \left(\mathsf{neg}\left(t1\right)\right)}{0 - \left(\mathsf{neg}\left(t1\right)\right)}} \]
      11. Applied rewrites74.1%

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

      if -1.01999999999999994e109 < u < 1.59999999999999996e103

      1. Initial program 72.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 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.f6471.6

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

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

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

    Alternative 7: 67.8% accurate, 0.9× speedup?

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

      1. Initial program 81.9%

        \[\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-*.f6481.9

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

        \[\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. div-invN/A

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

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

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

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

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

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

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

          \[\leadsto \left(\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{u \cdot u}} \cdot \left(\mathsf{neg}\left(t1\right)\right)\right) \cdot v \]
        10. metadata-eval82.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1 \cdot t1}{u \cdot u}} \cdot v \]
      11. Applied rewrites80.8%

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

      if -6.19999999999999977e145 < u < 1.2000000000000001e195

      1. Initial program 73.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. 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-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 61.8% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \frac{v}{\left(t1 + u\right) \cdot -1} \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(v / Float64(Float64(t1 + u) * -1.0))
      end
      
      function tmp = code(u, v, t1)
      	tmp = v / ((t1 + u) * -1.0);
      end
      
      code[u_, v_, t1_] := N[(v / N[(N[(t1 + u), $MachinePrecision] * -1.0), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{v}{\left(t1 + u\right) \cdot -1}
      \end{array}
      
      Derivation
      1. Initial program 74.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-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 54.1% 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(v / Float64(-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 74.9%

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

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

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

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

        Alternative 10: 14.5% accurate, 2.5× 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(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 74.9%

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

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

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

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

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

            Reproduce

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