Rosa's DopplerBench

Percentage Accurate: 73.2% → 98.2%
Time: 12.3s
Alternatives: 11
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 73.2% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
    10. --lowering--.f64N/A

      \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
    11. +-lowering-+.f64N/A

      \[\leadsto \frac{0 - v}{\color{blue}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
    12. /-lowering-/.f64N/A

      \[\leadsto \frac{0 - v}{t1 + u} \cdot \color{blue}{\frac{t1}{t1 + u}} \]
    13. +-lowering-+.f6498.0

      \[\leadsto \frac{0 - v}{t1 + u} \cdot \frac{t1}{\color{blue}{t1 + u}} \]
  4. Applied egg-rr98.0%

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
  6. Applied egg-rr98.0%

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

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

Alternative 2: 86.6% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3.10000000000000011e51 or 9.0000000000000001e114 < t1

    1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{v}{u \cdot 2 + t1}}\right) \]
      10. accelerator-lowering-fma.f6490.5

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

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

    if -3.10000000000000011e51 < t1 < 9.0000000000000001e114

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3.1 \cdot 10^{+51}:\\ \;\;\;\;0 - \frac{v}{\mathsf{fma}\left(u, 2, t1\right)}\\ \mathbf{elif}\;t1 \leq 9 \cdot 10^{+114}:\\ \;\;\;\;t1 \cdot \frac{0 - v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{v}{\mathsf{fma}\left(u, 2, t1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 94.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;v \leq 4 \cdot 10^{+179}:\\
\;\;\;\;\frac{0 - v}{\mathsf{fma}\left(u, 2 + \frac{u}{t1}, t1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if v < 3.99999999999999992e179

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      10. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      11. +-lowering-+.f64N/A

        \[\leadsto \frac{0 - v}{\color{blue}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
      12. /-lowering-/.f64N/A

        \[\leadsto \frac{0 - v}{t1 + u} \cdot \color{blue}{\frac{t1}{t1 + u}} \]
      13. +-lowering-+.f6498.2

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

      \[\leadsto \color{blue}{\frac{0 - v}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{t1}{t1 + u} \cdot \frac{0 - v}{t1 + u}} \]
      2. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{v}{\mathsf{neg}\left(\color{blue}{t1 \cdot \left(1 + \left(2 \cdot \frac{u}{t1} + \frac{{u}^{2}}{{t1}^{2}}\right)\right)}\right)} \]
    8. Simplified96.1%

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

    if 3.99999999999999992e179 < v

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      10. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      11. +-lowering-+.f64N/A

        \[\leadsto \frac{0 - v}{\color{blue}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
      12. /-lowering-/.f64N/A

        \[\leadsto \frac{0 - v}{t1 + u} \cdot \color{blue}{\frac{t1}{t1 + u}} \]
      13. +-lowering-+.f6496.3

        \[\leadsto \frac{0 - v}{t1 + u} \cdot \frac{t1}{\color{blue}{t1 + u}} \]
    4. Applied egg-rr96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 95.0% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0 - t1}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \cdot v \]
      10. +-lowering-+.f6476.3

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

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

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

        \[\leadsto \frac{0 - t1}{\color{blue}{u \cdot u}} \cdot v \]
      2. *-lowering-*.f6476.3

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

      \[\leadsto \frac{0 - t1}{\color{blue}{u \cdot u}} \cdot v \]
    8. Step-by-step derivation
      1. neg-sub0N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{\mathsf{fma}\left(v, \mathsf{neg}\left(t1\right), 0\right)}}{u}}{u} \]
      12. neg-sub0N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(v, \color{blue}{0 - t1}, 0\right)}{u}}{u} \]
      13. --lowering--.f6495.1

        \[\leadsto \frac{\frac{\mathsf{fma}\left(v, \color{blue}{0 - t1}, 0\right)}{u}}{u} \]
    9. Applied egg-rr95.1%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(v, 0 - t1, 0\right)}{u}}{u}} \]
    10. Step-by-step derivation
      1. +-rgt-identityN/A

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - t1\right)} \cdot \frac{v}{u}}{u} \]
      8. /-lowering-/.f6499.9

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

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

    if -3.80000000000000016e118 < u

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      10. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
      11. +-lowering-+.f64N/A

        \[\leadsto \frac{0 - v}{\color{blue}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
      12. /-lowering-/.f64N/A

        \[\leadsto \frac{0 - v}{t1 + u} \cdot \color{blue}{\frac{t1}{t1 + u}} \]
      13. +-lowering-+.f6498.4

        \[\leadsto \frac{0 - v}{t1 + u} \cdot \frac{t1}{\color{blue}{t1 + u}} \]
    4. Applied egg-rr98.4%

      \[\leadsto \color{blue}{\frac{0 - v}{t1 + u} \cdot \frac{t1}{t1 + u}} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{t1}{t1 + u} \cdot \frac{0 - v}{t1 + u}} \]
      2. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{v}{\mathsf{neg}\left(\frac{\color{blue}{t1 + u}}{t1} \cdot \left(t1 + u\right)\right)} \]
      15. +-lowering-+.f6496.3

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

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

      \[\leadsto \frac{v}{\mathsf{neg}\left(\color{blue}{t1 \cdot \left(1 + \left(2 \cdot \frac{u}{t1} + \frac{{u}^{2}}{{t1}^{2}}\right)\right)}\right)} \]
    8. Simplified96.4%

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

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

Alternative 5: 73.7% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.3000000000000002e-36 or 1.6999999999999999e-112 < u

    1. Initial program 80.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}{\left(t1 + u\right) \cdot \color{blue}{u}} \]
    4. Step-by-step derivation
      1. Simplified73.8%

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

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

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

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

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

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

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

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

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

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

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

      if -4.3000000000000002e-36 < u < 1.6999999999999999e-112

      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{v}{u \cdot 2 + t1}}\right) \]
        10. accelerator-lowering-fma.f6482.9

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.3 \cdot 10^{-36}:\\ \;\;\;\;0 - t1 \cdot \frac{v}{u \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;u \leq 1.7 \cdot 10^{-112}:\\ \;\;\;\;0 - \frac{v}{\mathsf{fma}\left(u, 2, t1\right)}\\ \mathbf{else}:\\ \;\;\;\;0 - t1 \cdot \frac{v}{u \cdot \left(t1 + u\right)}\\ \end{array} \]
    7. Add Preprocessing

    Alternative 6: 73.6% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(0 - t1\right) \cdot \frac{v}{u \cdot u}\\ \mathbf{if}\;u \leq -4.3 \cdot 10^{-36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 3 \cdot 10^{-16}:\\ \;\;\;\;0 - \frac{v}{\mathsf{fma}\left(u, 2, t1\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (let* ((t_1 (* (- 0.0 t1) (/ v (* u u)))))
       (if (<= u -4.3e-36)
         t_1
         (if (<= u 3e-16) (- 0.0 (/ v (fma u 2.0 t1))) t_1))))
    double code(double u, double v, double t1) {
    	double t_1 = (0.0 - t1) * (v / (u * u));
    	double tmp;
    	if (u <= -4.3e-36) {
    		tmp = t_1;
    	} else if (u <= 3e-16) {
    		tmp = 0.0 - (v / fma(u, 2.0, t1));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(u, v, t1)
    	t_1 = Float64(Float64(0.0 - t1) * Float64(v / Float64(u * u)))
    	tmp = 0.0
    	if (u <= -4.3e-36)
    		tmp = t_1;
    	elseif (u <= 3e-16)
    		tmp = Float64(0.0 - Float64(v / fma(u, 2.0, t1)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(0.0 - t1), $MachinePrecision] * N[(v / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4.3e-36], t$95$1, If[LessEqual[u, 3e-16], N[(0.0 - N[(v / N[(u * 2.0 + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(0 - t1\right) \cdot \frac{v}{u \cdot u}\\
    \mathbf{if}\;u \leq -4.3 \cdot 10^{-36}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;u \leq 3 \cdot 10^{-16}:\\
    \;\;\;\;0 - \frac{v}{\mathsf{fma}\left(u, 2, t1\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if u < -4.3000000000000002e-36 or 2.99999999999999994e-16 < u

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
        10. --lowering--.f64N/A

          \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \cdot \frac{t1}{t1 + u} \]
        11. +-lowering-+.f64N/A

          \[\leadsto \frac{0 - v}{\color{blue}{t1 + u}} \cdot \frac{t1}{t1 + u} \]
        12. /-lowering-/.f64N/A

          \[\leadsto \frac{0 - v}{t1 + u} \cdot \color{blue}{\frac{t1}{t1 + u}} \]
        13. +-lowering-+.f6497.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto t1 \cdot \left(\mathsf{neg}\left(\frac{v}{\color{blue}{u \cdot u}}\right)\right) \]
        3. *-lowering-*.f6479.9

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

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

      if -4.3000000000000002e-36 < u < 2.99999999999999994e-16

      1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{t1 \cdot \left(\color{blue}{u \cdot 2} + t1\right)} \]
        9. accelerator-lowering-fma.f6447.7

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{v}{u \cdot 2 + t1}}\right) \]
        10. accelerator-lowering-fma.f6477.0

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

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

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

    Alternative 7: 55.9% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -3.8 \cdot 10^{+118}:\\ \;\;\;\;\frac{v}{u} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{0 - t1}\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (if (<= u -3.8e+118) (* (/ v u) -0.5) (/ v (- 0.0 t1))))
    double code(double u, double v, double t1) {
    	double tmp;
    	if (u <= -3.8e+118) {
    		tmp = (v / u) * -0.5;
    	} else {
    		tmp = v / (0.0 - t1);
    	}
    	return tmp;
    }
    
    real(8) function code(u, v, t1)
        real(8), intent (in) :: u
        real(8), intent (in) :: v
        real(8), intent (in) :: t1
        real(8) :: tmp
        if (u <= (-3.8d+118)) then
            tmp = (v / u) * (-0.5d0)
        else
            tmp = v / (0.0d0 - t1)
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double tmp;
    	if (u <= -3.8e+118) {
    		tmp = (v / u) * -0.5;
    	} else {
    		tmp = v / (0.0 - t1);
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if u <= -3.8e+118:
    		tmp = (v / u) * -0.5
    	else:
    		tmp = v / (0.0 - t1)
    	return tmp
    
    function code(u, v, t1)
    	tmp = 0.0
    	if (u <= -3.8e+118)
    		tmp = Float64(Float64(v / u) * -0.5);
    	else
    		tmp = Float64(v / Float64(0.0 - t1));
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	tmp = 0.0;
    	if (u <= -3.8e+118)
    		tmp = (v / u) * -0.5;
    	else
    		tmp = v / (0.0 - t1);
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := If[LessEqual[u, -3.8e+118], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], N[(v / N[(0.0 - t1), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;u \leq -3.8 \cdot 10^{+118}:\\
    \;\;\;\;\frac{v}{u} \cdot -0.5\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{v}{0 - t1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if u < -3.80000000000000016e118

      1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{t1 \cdot \left(\color{blue}{u \cdot 2} + t1\right)} \]
        9. accelerator-lowering-fma.f6445.5

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

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

        \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{v}{u}} \]
      7. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-1}{2}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-1}{2}} \]
        3. /-lowering-/.f6436.7

          \[\leadsto \color{blue}{\frac{v}{u}} \cdot -0.5 \]
      8. Simplified36.7%

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

      if -3.80000000000000016e118 < u

      1. Initial program 69.7%

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

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

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

          \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
        3. --lowering--.f64N/A

          \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
        4. /-lowering-/.f6454.3

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

        \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
      6. Step-by-step derivation
        1. sub0-negN/A

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

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{v}{t1}\right)} \]
        3. /-lowering-/.f6454.3

          \[\leadsto -\color{blue}{\frac{v}{t1}} \]
      7. Applied egg-rr54.3%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.8 \cdot 10^{+118}:\\ \;\;\;\;\frac{v}{u} \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{0 - t1}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 55.9% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -3.8 \cdot 10^{+118}:\\ \;\;\;\;0 - \frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{0 - t1}\\ \end{array} \end{array} \]
    (FPCore (u v t1)
     :precision binary64
     (if (<= u -3.8e+118) (- 0.0 (/ v u)) (/ v (- 0.0 t1))))
    double code(double u, double v, double t1) {
    	double tmp;
    	if (u <= -3.8e+118) {
    		tmp = 0.0 - (v / u);
    	} else {
    		tmp = v / (0.0 - t1);
    	}
    	return tmp;
    }
    
    real(8) function code(u, v, t1)
        real(8), intent (in) :: u
        real(8), intent (in) :: v
        real(8), intent (in) :: t1
        real(8) :: tmp
        if (u <= (-3.8d+118)) then
            tmp = 0.0d0 - (v / u)
        else
            tmp = v / (0.0d0 - t1)
        end if
        code = tmp
    end function
    
    public static double code(double u, double v, double t1) {
    	double tmp;
    	if (u <= -3.8e+118) {
    		tmp = 0.0 - (v / u);
    	} else {
    		tmp = v / (0.0 - t1);
    	}
    	return tmp;
    }
    
    def code(u, v, t1):
    	tmp = 0
    	if u <= -3.8e+118:
    		tmp = 0.0 - (v / u)
    	else:
    		tmp = v / (0.0 - t1)
    	return tmp
    
    function code(u, v, t1)
    	tmp = 0.0
    	if (u <= -3.8e+118)
    		tmp = Float64(0.0 - Float64(v / u));
    	else
    		tmp = Float64(v / Float64(0.0 - t1));
    	end
    	return tmp
    end
    
    function tmp_2 = code(u, v, t1)
    	tmp = 0.0;
    	if (u <= -3.8e+118)
    		tmp = 0.0 - (v / u);
    	else
    		tmp = v / (0.0 - t1);
    	end
    	tmp_2 = tmp;
    end
    
    code[u_, v_, t1_] := If[LessEqual[u, -3.8e+118], N[(0.0 - N[(v / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(0.0 - t1), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;u \leq -3.8 \cdot 10^{+118}:\\
    \;\;\;\;0 - \frac{v}{u}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{v}{0 - t1}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if u < -3.80000000000000016e118

      1. Initial program 80.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 \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot v}{\left(t1 + u\right) \cdot \color{blue}{u}} \]
      4. Step-by-step derivation
        1. Simplified80.5%

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

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

            \[\leadsto \color{blue}{0 - \frac{v}{u}} \]
          3. --lowering--.f64N/A

            \[\leadsto \color{blue}{0 - \frac{v}{u}} \]
          4. /-lowering-/.f6436.6

            \[\leadsto 0 - \color{blue}{\frac{v}{u}} \]
        4. Simplified36.6%

          \[\leadsto \color{blue}{0 - \frac{v}{u}} \]
        5. Step-by-step derivation
          1. sub0-negN/A

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

            \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{v}{u}\right)} \]
          3. /-lowering-/.f6436.6

            \[\leadsto -\color{blue}{\frac{v}{u}} \]
        6. Applied egg-rr36.6%

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

        if -3.80000000000000016e118 < u

        1. Initial program 69.7%

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

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

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

            \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
          3. --lowering--.f64N/A

            \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
          4. /-lowering-/.f6454.3

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

          \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
        6. Step-by-step derivation
          1. sub0-negN/A

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

            \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{v}{t1}\right)} \]
          3. /-lowering-/.f6454.3

            \[\leadsto -\color{blue}{\frac{v}{t1}} \]
        7. Applied egg-rr54.3%

          \[\leadsto \color{blue}{-\frac{v}{t1}} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification51.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.8 \cdot 10^{+118}:\\ \;\;\;\;0 - \frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{0 - t1}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 9: 61.7% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{v}{u \cdot 2 + t1}}\right) \]
        10. accelerator-lowering-fma.f6454.4

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

        \[\leadsto \color{blue}{-\frac{v}{\mathsf{fma}\left(u, 2, t1\right)}} \]
      8. Final simplification54.4%

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

      Alternative 10: 61.3% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{0 - \color{blue}{t1 \cdot \frac{v}{t1 + u}}}{t1 + u} \]
        10. *-lowering-*.f64N/A

          \[\leadsto \frac{0 - \color{blue}{t1 \cdot \frac{v}{t1 + u}}}{t1 + u} \]
        11. /-lowering-/.f64N/A

          \[\leadsto \frac{0 - t1 \cdot \color{blue}{\frac{v}{t1 + u}}}{t1 + u} \]
        12. +-lowering-+.f64N/A

          \[\leadsto \frac{0 - t1 \cdot \frac{v}{\color{blue}{t1 + u}}}{t1 + u} \]
        13. +-lowering-+.f6497.7

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

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

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

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

          \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \]
        3. --lowering--.f6453.7

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

        \[\leadsto \frac{\color{blue}{0 - v}}{t1 + u} \]
      8. Final simplification53.7%

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

      Alternative 11: 53.8% accurate, 2.0× speedup?

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

        \[\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. mul-1-negN/A

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

          \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
        3. --lowering--.f64N/A

          \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
        4. /-lowering-/.f6447.1

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

        \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
      6. Step-by-step derivation
        1. sub0-negN/A

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

          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{v}{t1}\right)} \]
        3. /-lowering-/.f6447.1

          \[\leadsto -\color{blue}{\frac{v}{t1}} \]
      7. Applied egg-rr47.1%

        \[\leadsto \color{blue}{-\frac{v}{t1}} \]
      8. Final simplification47.1%

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

      Reproduce

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