Rosa's DopplerBench

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 72.6% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.8× speedup?

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

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

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

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

      \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    5. 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)} \]
    6. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;u \leq 1.6 \cdot 10^{+80}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 70.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-*.f6470.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e130 < u < -5.6000000000000003e-156 or 7.60000000000000015e-156 < u < 1.59999999999999995e80

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{\left(t1 + u\right)}} \]
      4. 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)}} \]
      5. *-commutativeN/A

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

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

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

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

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

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

    if -5.6000000000000003e-156 < u < 7.60000000000000015e-156

    1. Initial program 61.1%

      \[\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}{\frac{-1 \cdot v + 2 \cdot \frac{u \cdot v}{t1}}{t1}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999995e80 < u

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

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

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

        \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      5. 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)} \]
      6. neg-mul-1N/A

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

        \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\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.5

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.75 \cdot 10^{+130}:\\ \;\;\;\;\frac{t1 \cdot \frac{-v}{u}}{u}\\ \mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{elif}\;u \leq 7.6 \cdot 10^{-156}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{v}{t1}, u \cdot -2, v\right)}{-t1}\\ \mathbf{elif}\;u \leq 1.6 \cdot 10^{+80}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{\left(-u\right) - t1} \cdot \frac{t1}{u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;u \leq 1.6 \cdot 10^{+80}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 70.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-*.f6470.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e130 < u < -5.6000000000000003e-156 or 7.60000000000000015e-156 < u < 1.59999999999999995e80

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{\left(t1 + u\right)}} \]
      4. 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)}} \]
      5. *-commutativeN/A

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

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

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

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

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

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

    if -5.6000000000000003e-156 < u < 7.60000000000000015e-156

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{\left(t1 + u\right)}} \]
      4. 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)}} \]
      5. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999995e80 < u

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

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

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

        \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      5. 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)} \]
      6. neg-mul-1N/A

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

        \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\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.5

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

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

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

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

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

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

Alternative 4: 86.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;u \leq 1.6 \cdot 10^{+80}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 70.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-*.f6470.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e130 < u < -5.6000000000000003e-156 or 7.60000000000000015e-156 < u < 1.59999999999999995e80

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{\left(t1 + u\right)}} \]
      4. 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)}} \]
      5. *-commutativeN/A

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

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

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

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

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

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

    if -5.6000000000000003e-156 < u < 7.60000000000000015e-156

    1. Initial program 61.1%

      \[\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.f6489.1

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

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

    if 1.59999999999999995e80 < u

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

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

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

        \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      5. 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)} \]
      6. neg-mul-1N/A

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

        \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\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.5

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.75 \cdot 10^{+130}:\\ \;\;\;\;\frac{t1 \cdot \frac{-v}{u}}{u}\\ \mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{elif}\;u \leq 7.6 \cdot 10^{-156}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{elif}\;u \leq 1.6 \cdot 10^{+80}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{\left(-u\right) - t1} \cdot \frac{t1}{u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 86.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\
t_2 := \frac{t1 \cdot \frac{-v}{u}}{u}\\
\mathbf{if}\;u \leq -1.75 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;u \leq 6 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -1.75e130 or 6.00000000000000006e72 < u

    1. Initial program 74.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-*.f6472.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e130 < u < -5.6000000000000003e-156 or 7.60000000000000015e-156 < u < 6.00000000000000006e72

    1. Initial program 78.8%

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{\left(t1 + u\right)}} \]
      4. 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)}} \]
      5. *-commutativeN/A

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

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

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

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

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

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

    if -5.6000000000000003e-156 < u < 7.60000000000000015e-156

    1. Initial program 61.1%

      \[\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.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 simplification89.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.75 \cdot 10^{+130}:\\ \;\;\;\;\frac{t1 \cdot \frac{-v}{u}}{u}\\ \mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{elif}\;u \leq 7.6 \cdot 10^{-156}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{elif}\;u \leq 6 \cdot 10^{+72}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1 \cdot \frac{-v}{u}}{u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 85.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\
t_2 := \frac{v \cdot \frac{t1}{u}}{-u}\\
\mathbf{if}\;u \leq -9.5 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;u \leq 5.6 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -9.5000000000000009e130 or 5.60000000000000003e74 < u

    1. Initial program 74.2%

      \[\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-*.f6474.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000009e130 < u < -5.6000000000000003e-156 or 7.60000000000000015e-156 < u < 5.60000000000000003e74

    1. Initial program 79.2%

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{\left(t1 + u\right)}} \]
      4. 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)}} \]
      5. *-commutativeN/A

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

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

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

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

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

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

    if -5.6000000000000003e-156 < u < 7.60000000000000015e-156

    1. Initial program 61.1%

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

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

Alternative 7: 85.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\
t_2 := \frac{v}{u} \cdot \left(-\frac{t1}{u}\right)\\
\mathbf{if}\;u \leq -2.45 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;u \leq 6 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -2.4499999999999999e147 or 6.00000000000000006e72 < u

    1. Initial program 75.3%

      \[\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-*.f6473.3

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

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

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

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

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

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

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

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

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

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

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

    if -2.4499999999999999e147 < u < -5.6000000000000003e-156 or 7.60000000000000015e-156 < u < 6.00000000000000006e72

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{\left(t1 + u\right)}} \]
      4. 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)}} \]
      5. *-commutativeN/A

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

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

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

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

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

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

    if -5.6000000000000003e-156 < u < 7.60000000000000015e-156

    1. Initial program 61.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.45 \cdot 10^{+147}:\\ \;\;\;\;\frac{v}{u} \cdot \left(-\frac{t1}{u}\right)\\ \mathbf{elif}\;u \leq -5.6 \cdot 10^{-156}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{elif}\;u \leq 7.6 \cdot 10^{-156}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{elif}\;u \leq 6 \cdot 10^{+72}:\\ \;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u} \cdot \left(-\frac{t1}{u}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 88.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t1 \leq 1.1 \cdot 10^{+128}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\

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


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

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

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

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

        \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      5. 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)} \]
      6. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.00000000000000001e155 < t1 < 1.10000000000000008e128

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

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

          \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{\left(t1 + u\right)}} \]
        4. 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)}} \]
        5. *-commutativeN/A

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

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

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

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

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

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

      if 1.10000000000000008e128 < t1

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

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

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

          \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        5. 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)} \]
        6. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{-1}{t1 + u}} \cdot v \]
          9. lower-*.f6484.7

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

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

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

      Alternative 9: 74.4% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-t1\right) \cdot \frac{v}{u \cdot u}\\ \mathbf{if}\;u \leq -6 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 1.65 \cdot 10^{+18}:\\ \;\;\;\;\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 -6e+36) t_1 (if (<= u 1.65e+18) (/ (- v) t1) t_1))))
      double code(double u, double v, double t1) {
      	double t_1 = -t1 * (v / (u * u));
      	double tmp;
      	if (u <= -6e+36) {
      		tmp = t_1;
      	} else if (u <= 1.65e+18) {
      		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 <= (-6d+36)) then
              tmp = t_1
          else if (u <= 1.65d+18) 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 <= -6e+36) {
      		tmp = t_1;
      	} else if (u <= 1.65e+18) {
      		tmp = -v / t1;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(u, v, t1):
      	t_1 = -t1 * (v / (u * u))
      	tmp = 0
      	if u <= -6e+36:
      		tmp = t_1
      	elif u <= 1.65e+18:
      		tmp = -v / t1
      	else:
      		tmp = t_1
      	return tmp
      
      function code(u, v, t1)
      	t_1 = Float64(Float64(-t1) * Float64(v / Float64(u * u)))
      	tmp = 0.0
      	if (u <= -6e+36)
      		tmp = t_1;
      	elseif (u <= 1.65e+18)
      		tmp = Float64(Float64(-v) / 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 <= -6e+36)
      		tmp = t_1;
      	elseif (u <= 1.65e+18)
      		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, -6e+36], t$95$1, If[LessEqual[u, 1.65e+18], N[((-v) / t1), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(-t1\right) \cdot \frac{v}{u \cdot u}\\
      \mathbf{if}\;u \leq -6 \cdot 10^{+36}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;u \leq 1.65 \cdot 10^{+18}:\\
      \;\;\;\;\frac{-v}{t1}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if u < -6e36 or 1.65e18 < u

        1. Initial program 79.5%

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

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

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

        if -6e36 < u < 1.65e18

        1. Initial program 66.3%

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

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

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

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

      Alternative 10: 57.7% accurate, 1.2× speedup?

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

        1. Initial program 75.3%

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

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

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

            \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          5. 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)} \]
          6. neg-mul-1N/A

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

            \[\leadsto \frac{\color{blue}{\left(v \cdot -1\right) \cdot t1}}{\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.2

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

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

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

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

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

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

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

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

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

          if -4.2000000000000003e152 < u < 3.7999999999999996e94

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

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

            \[\leadsto \color{blue}{\frac{-v}{t1}} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification54.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.2 \cdot 10^{+152}:\\ \;\;\;\;\frac{-v}{u}\\ \mathbf{elif}\;u \leq 3.8 \cdot 10^{+94}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 11: 61.4% accurate, 1.8× speedup?

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

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

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

            \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
          5. 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)} \]
          6. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{-v}{t1 + u}} \]
          4. Final simplification54.4%

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

          Alternative 12: 17.0% accurate, 2.1× speedup?

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

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

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

              \[\leadsto \frac{\color{blue}{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            5. 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)} \]
            6. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{v}{u}\right)} \]
              3. lower-/.f6414.9

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

              \[\leadsto \color{blue}{-\frac{v}{u}} \]
            5. Final simplification14.9%

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

            Reproduce

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