Rosa's DopplerBench

Percentage Accurate: 72.7% → 98.2%
Time: 10.1s
Alternatives: 11
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 11 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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 0.8× speedup?

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

\\
\frac{\frac{t1}{u + t1} \cdot v}{\left(-t1\right) - u}
\end{array}
Derivation
  1. Initial program 68.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{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.5% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 32.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. 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-/.f6443.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{v}{t1}} \cdot \frac{t1}{u - t1} \]
    9. Step-by-step derivation
      1. lower-/.f6490.3

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

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

    if -3.3000000000000002e139 < t1 < 6.8999999999999998e168

    1. Initial program 81.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. 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.0

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

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

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

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

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

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

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

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

    if 6.8999999999999998e168 < t1

    1. Initial program 36.3%

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

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

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

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

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

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

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

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

Alternative 3: 88.3% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.3499999999999999e139 or 6.8999999999999998e168 < t1

    1. Initial program 34.3%

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

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

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

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

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

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

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

    if -1.3499999999999999e139 < t1 < 6.8999999999999998e168

    1. Initial program 81.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. 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.0

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

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

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

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

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

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

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

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

Alternative 4: 85.6% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -4.90000000000000021e113 or 6.8999999999999998e168 < t1

    1. Initial program 37.6%

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

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

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

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

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

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

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

    if -4.90000000000000021e113 < t1 < 6.8999999999999998e168

    1. Initial program 83.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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 76.0% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.8000000000000001e-87 or 3.8e21 < t1

    1. Initial program 54.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{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e-87 < t1 < 3.8e21

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.0% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -2.1 \cdot 10^{+220}:\\ \;\;\;\;\frac{t1}{u \cdot u} \cdot v\\ \mathbf{elif}\;u \leq 2.45 \cdot 10^{+42}:\\ \;\;\;\;\frac{-v}{u + t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot u} \cdot t1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (<= u -2.1e+220)
   (* (/ t1 (* u u)) v)
   (if (<= u 2.45e+42) (/ (- v) (+ u t1)) (* (/ v (* u u)) t1))))
double code(double u, double v, double t1) {
	double tmp;
	if (u <= -2.1e+220) {
		tmp = (t1 / (u * u)) * v;
	} else if (u <= 2.45e+42) {
		tmp = -v / (u + t1);
	} else {
		tmp = (v / (u * 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 <= (-2.1d+220)) then
        tmp = (t1 / (u * u)) * v
    else if (u <= 2.45d+42) then
        tmp = -v / (u + t1)
    else
        tmp = (v / (u * u)) * t1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if (u <= -2.1e+220) {
		tmp = (t1 / (u * u)) * v;
	} else if (u <= 2.45e+42) {
		tmp = -v / (u + t1);
	} else {
		tmp = (v / (u * u)) * t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if u <= -2.1e+220:
		tmp = (t1 / (u * u)) * v
	elif u <= 2.45e+42:
		tmp = -v / (u + t1)
	else:
		tmp = (v / (u * u)) * t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if (u <= -2.1e+220)
		tmp = Float64(Float64(t1 / Float64(u * u)) * v);
	elseif (u <= 2.45e+42)
		tmp = Float64(Float64(-v) / Float64(u + t1));
	else
		tmp = Float64(Float64(v / Float64(u * u)) * t1);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if (u <= -2.1e+220)
		tmp = (t1 / (u * u)) * v;
	elseif (u <= 2.45e+42)
		tmp = -v / (u + t1);
	else
		tmp = (v / (u * u)) * t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[LessEqual[u, -2.1e+220], N[(N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision], If[LessEqual[u, 2.45e+42], N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(u * u), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -2.10000000000000007e220

    1. Initial program 91.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-/.f6492.2

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.10000000000000007e220 < u < 2.4500000000000001e42

      1. Initial program 67.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{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
        3. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.4500000000000001e42 < u

      1. Initial program 67.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. 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-/.f6464.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{v}{u \cdot u} \cdot \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(t1\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(t1\right)\right) \cdot \left(\mathsf{neg}\left(t1\right)\right) - 0 \cdot \left(\mathsf{neg}\left(t1\right)\right)\right)}} \]
        10. sqr-powN/A

          \[\leadsto \frac{v}{u \cdot u} \cdot \frac{{0}^{3} + \color{blue}{{\left(\mathsf{neg}\left(t1\right)\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(\mathsf{neg}\left(t1\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(t1\right)\right) \cdot \left(\mathsf{neg}\left(t1\right)\right) - 0 \cdot \left(\mathsf{neg}\left(t1\right)\right)\right)} \]
        11. pow-prod-downN/A

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

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

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

          \[\leadsto \frac{v}{u \cdot u} \cdot \frac{{0}^{3} + {\color{blue}{\left(t1 \cdot t1\right)}}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(t1\right)\right) \cdot \left(\mathsf{neg}\left(t1\right)\right) - 0 \cdot \left(\mathsf{neg}\left(t1\right)\right)\right)} \]
        15. pow-prod-downN/A

          \[\leadsto \frac{v}{u \cdot u} \cdot \frac{{0}^{3} + \color{blue}{{t1}^{\left(\frac{3}{2}\right)} \cdot {t1}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(t1\right)\right) \cdot \left(\mathsf{neg}\left(t1\right)\right) - 0 \cdot \left(\mathsf{neg}\left(t1\right)\right)\right)} \]
        16. sqr-powN/A

          \[\leadsto \frac{v}{u \cdot u} \cdot \frac{{0}^{3} + \color{blue}{{t1}^{3}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(t1\right)\right) \cdot \left(\mathsf{neg}\left(t1\right)\right) - 0 \cdot \left(\mathsf{neg}\left(t1\right)\right)\right)} \]
      9. Applied rewrites54.9%

        \[\leadsto \color{blue}{\frac{v}{u \cdot u} \cdot t1} \]
    9. Recombined 3 regimes into one program.
    10. Add Preprocessing

    Alternative 8: 67.5% accurate, 0.9× speedup?

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

      1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.10000000000000007e220 < u < 2.3000000000000001e148

        1. Initial program 68.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{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
          3. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-v}}{u + t1} \]
      9. Recombined 2 regimes into one program.
      10. Add Preprocessing

      Alternative 9: 62.0% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 10: 54.8% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

      Alternative 11: 14.7% 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 68.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-/.f6474.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{v}{t1}} \]
      11. Step-by-step derivation
        1. lower-/.f6413.4

          \[\leadsto \color{blue}{\frac{v}{t1}} \]
      12. Applied rewrites13.4%

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

      Reproduce

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