Rosa's DopplerBench

Percentage Accurate: 72.7% → 98.1%
Time: 13.7s
Alternatives: 14
Speedup: 1.1×

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 14 alternatives:

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

Initial Program: 72.7% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*72.5%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out72.5%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in72.5%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*83.4%

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

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

    \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. distribute-frac-neg283.4%

      \[\leadsto t1 \cdot \color{blue}{\left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)} \]
    2. distribute-rgt-neg-out83.4%

      \[\leadsto \color{blue}{-t1 \cdot \frac{\frac{v}{t1 + u}}{t1 + u}} \]
    3. associate-/r*72.5%

      \[\leadsto -t1 \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    4. distribute-lft-neg-out72.5%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    5. associate-/l*69.1%

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

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

      \[\leadsto \frac{-t1}{t1 + u} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
    8. associate-*r/99.1%

      \[\leadsto \color{blue}{\frac{\frac{-t1}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)}} \]
    9. add-sqr-sqrt52.5%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    10. sqrt-unprod44.3%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    11. sqr-neg44.3%

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

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    13. add-sqr-sqrt32.7%

      \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    14. add-sqr-sqrt16.4%

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

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    16. sqr-neg53.4%

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

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}} \]
    18. add-sqr-sqrt99.1%

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

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

Alternative 2: 78.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 1.25 \cdot 10^{+68}\right):\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-v\right) \cdot \frac{t1}{u}}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= t1 -3.1e-88) (not (<= t1 1.25e+68)))
   (/ v (- (* u -2.0) t1))
   (/ (* (- v) (/ t1 u)) u)))
double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -3.1e-88) || !(t1 <= 1.25e+68)) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = (-v * (t1 / u)) / 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) :: tmp
    if ((t1 <= (-3.1d-88)) .or. (.not. (t1 <= 1.25d+68))) then
        tmp = v / ((u * (-2.0d0)) - t1)
    else
        tmp = (-v * (t1 / u)) / u
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -3.1e-88) || !(t1 <= 1.25e+68)) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = (-v * (t1 / u)) / u;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (t1 <= -3.1e-88) or not (t1 <= 1.25e+68):
		tmp = v / ((u * -2.0) - t1)
	else:
		tmp = (-v * (t1 / u)) / u
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((t1 <= -3.1e-88) || !(t1 <= 1.25e+68))
		tmp = Float64(v / Float64(Float64(u * -2.0) - t1));
	else
		tmp = Float64(Float64(Float64(-v) * Float64(t1 / u)) / u);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((t1 <= -3.1e-88) || ~((t1 <= 1.25e+68)))
		tmp = v / ((u * -2.0) - t1);
	else
		tmp = (-v * (t1 / u)) / u;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.1e-88], N[Not[LessEqual[t1, 1.25e+68]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[((-v) * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 1.25 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3.0999999999999998e-88 or 1.2500000000000001e68 < t1

    1. Initial program 58.0%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*62.3%

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

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

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*76.0%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac276.0%

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

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.9%

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

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

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

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.8%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.8%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity98.5%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg98.5%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in98.5%

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

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg98.5%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt61.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod43.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg43.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod9.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt27.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt17.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod41.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(t1 + u\right)}} \]
    9. Step-by-step derivation
      1. distribute-lft-in97.8%

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

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

        \[\leadsto \frac{-1 \cdot v}{\color{blue}{\left(1 + \frac{u}{t1}\right) \cdot u + \left(1 + \frac{u}{t1}\right) \cdot t1}} \]
      4. distribute-lft-in98.5%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
      6. neg-mul-198.5%

        \[\leadsto \color{blue}{-\frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
      7. distribute-neg-frac298.5%

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

        \[\leadsto \frac{v}{-\color{blue}{\left(u + t1\right) \cdot \left(1 + \frac{u}{t1}\right)}} \]
      9. distribute-rgt-neg-in98.5%

        \[\leadsto \frac{v}{\color{blue}{\left(u + t1\right) \cdot \left(-\left(1 + \frac{u}{t1}\right)\right)}} \]
      10. distribute-neg-in98.5%

        \[\leadsto \frac{v}{\left(u + t1\right) \cdot \color{blue}{\left(\left(-1\right) + \left(-\frac{u}{t1}\right)\right)}} \]
      11. metadata-eval98.5%

        \[\leadsto \frac{v}{\left(u + t1\right) \cdot \left(\color{blue}{-1} + \left(-\frac{u}{t1}\right)\right)} \]
      12. unsub-neg98.5%

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

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

      \[\leadsto \frac{v}{\color{blue}{-2 \cdot u + -1 \cdot t1}} \]
    12. Step-by-step derivation
      1. neg-mul-181.2%

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

        \[\leadsto \frac{v}{\color{blue}{-2 \cdot u - t1}} \]
      3. *-commutative81.2%

        \[\leadsto \frac{v}{\color{blue}{u \cdot -2} - t1} \]
    13. Simplified81.2%

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

    if -3.0999999999999998e-88 < t1 < 1.2500000000000001e68

    1. Initial program 81.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/84.7%

        \[\leadsto \color{blue}{\frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
      2. *-commutative84.7%

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

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

      \[\leadsto v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \color{blue}{u}} \]
    6. Step-by-step derivation
      1. associate-*r/68.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-\left(-t1\right) \cdot v}{-\left(t1 + u\right)}}}{u} \]
      5. distribute-lft-neg-out75.0%

        \[\leadsto \frac{\frac{-\color{blue}{\left(-t1 \cdot v\right)}}{-\left(t1 + u\right)}}{u} \]
      6. remove-double-neg75.0%

        \[\leadsto \frac{\frac{\color{blue}{t1 \cdot v}}{-\left(t1 + u\right)}}{u} \]
      7. distribute-neg-in75.0%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\left(-t1\right) + \left(-u\right)}}}{u} \]
      8. add-sqr-sqrt35.3%

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

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}} + \left(-u\right)}}{u} \]
      10. sqr-neg76.4%

        \[\leadsto \frac{\frac{t1 \cdot v}{\sqrt{\color{blue}{t1 \cdot t1}} + \left(-u\right)}}{u} \]
      11. sqrt-unprod40.2%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}} + \left(-u\right)}}{u} \]
      12. add-sqr-sqrt74.5%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{t1} + \left(-u\right)}}{u} \]
      13. sub-neg74.5%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{t1 - u}}}{u} \]
    7. Applied egg-rr74.5%

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

      \[\leadsto \frac{\color{blue}{-1 \cdot \frac{t1 \cdot v}{u}}}{u} \]
    9. Step-by-step derivation
      1. mul-1-neg76.6%

        \[\leadsto \frac{\color{blue}{-\frac{t1 \cdot v}{u}}}{u} \]
      2. *-commutative76.6%

        \[\leadsto \frac{-\frac{\color{blue}{v \cdot t1}}{u}}{u} \]
      3. associate-*r/81.8%

        \[\leadsto \frac{-\color{blue}{v \cdot \frac{t1}{u}}}{u} \]
      4. distribute-lft-neg-in81.8%

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

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

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

Alternative 3: 78.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 3.1 \cdot 10^{+68}\right):\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{u} \cdot \frac{v}{-u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= t1 -3.1e-88) (not (<= t1 3.1e+68)))
   (/ v (- (* u -2.0) t1))
   (* (/ t1 u) (/ v (- u)))))
double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -3.1e-88) || !(t1 <= 3.1e+68)) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = (t1 / u) * (v / -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) :: tmp
    if ((t1 <= (-3.1d-88)) .or. (.not. (t1 <= 3.1d+68))) then
        tmp = v / ((u * (-2.0d0)) - t1)
    else
        tmp = (t1 / u) * (v / -u)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -3.1e-88) || !(t1 <= 3.1e+68)) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = (t1 / u) * (v / -u);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (t1 <= -3.1e-88) or not (t1 <= 3.1e+68):
		tmp = v / ((u * -2.0) - t1)
	else:
		tmp = (t1 / u) * (v / -u)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((t1 <= -3.1e-88) || !(t1 <= 3.1e+68))
		tmp = Float64(v / Float64(Float64(u * -2.0) - t1));
	else
		tmp = Float64(Float64(t1 / u) * Float64(v / Float64(-u)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((t1 <= -3.1e-88) || ~((t1 <= 3.1e+68)))
		tmp = v / ((u * -2.0) - t1);
	else
		tmp = (t1 / u) * (v / -u);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.1e-88], N[Not[LessEqual[t1, 3.1e+68]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 3.1 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3.0999999999999998e-88 or 3.0999999999999998e68 < t1

    1. Initial program 58.0%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*62.3%

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

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

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*76.0%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac276.0%

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

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.9%

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

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

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

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.8%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.8%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity98.5%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg98.5%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in98.5%

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

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg98.5%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt61.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod43.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg43.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod9.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt27.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt17.1%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod41.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(t1 + u\right)}} \]
    9. Step-by-step derivation
      1. distribute-lft-in97.8%

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

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

        \[\leadsto \frac{-1 \cdot v}{\color{blue}{\left(1 + \frac{u}{t1}\right) \cdot u + \left(1 + \frac{u}{t1}\right) \cdot t1}} \]
      4. distribute-lft-in98.5%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
      6. neg-mul-198.5%

        \[\leadsto \color{blue}{-\frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
      7. distribute-neg-frac298.5%

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

        \[\leadsto \frac{v}{-\color{blue}{\left(u + t1\right) \cdot \left(1 + \frac{u}{t1}\right)}} \]
      9. distribute-rgt-neg-in98.5%

        \[\leadsto \frac{v}{\color{blue}{\left(u + t1\right) \cdot \left(-\left(1 + \frac{u}{t1}\right)\right)}} \]
      10. distribute-neg-in98.5%

        \[\leadsto \frac{v}{\left(u + t1\right) \cdot \color{blue}{\left(\left(-1\right) + \left(-\frac{u}{t1}\right)\right)}} \]
      11. metadata-eval98.5%

        \[\leadsto \frac{v}{\left(u + t1\right) \cdot \left(\color{blue}{-1} + \left(-\frac{u}{t1}\right)\right)} \]
      12. unsub-neg98.5%

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

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

      \[\leadsto \frac{v}{\color{blue}{-2 \cdot u + -1 \cdot t1}} \]
    12. Step-by-step derivation
      1. neg-mul-181.2%

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

        \[\leadsto \frac{v}{\color{blue}{-2 \cdot u - t1}} \]
      3. *-commutative81.2%

        \[\leadsto \frac{v}{\color{blue}{u \cdot -2} - t1} \]
    13. Simplified81.2%

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

    if -3.0999999999999998e-88 < t1 < 3.0999999999999998e68

    1. Initial program 81.7%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. times-frac96.7%

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
      2. distribute-frac-neg96.7%

        \[\leadsto \color{blue}{\left(-\frac{t1}{t1 + u}\right)} \cdot \frac{v}{t1 + u} \]
      3. distribute-neg-frac296.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{t1}{u}\right)} \cdot \frac{v}{u} \]
    7. Step-by-step derivation
      1. associate-*r/80.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot t1}{u}} \cdot \frac{v}{u} \]
      2. mul-1-neg80.3%

        \[\leadsto \frac{\color{blue}{-t1}}{u} \cdot \frac{v}{u} \]
    8. Simplified80.3%

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

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

Alternative 4: 76.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 8 \cdot 10^{+65}\right):\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{t1}{u \cdot \left(-u\right)}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= t1 -3.1e-88) (not (<= t1 8e+65)))
   (/ v (- (* u -2.0) t1))
   (* v (/ t1 (* u (- u))))))
double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -3.1e-88) || !(t1 <= 8e+65)) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = v * (t1 / (u * -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) :: tmp
    if ((t1 <= (-3.1d-88)) .or. (.not. (t1 <= 8d+65))) then
        tmp = v / ((u * (-2.0d0)) - t1)
    else
        tmp = v * (t1 / (u * -u))
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -3.1e-88) || !(t1 <= 8e+65)) {
		tmp = v / ((u * -2.0) - t1);
	} else {
		tmp = v * (t1 / (u * -u));
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (t1 <= -3.1e-88) or not (t1 <= 8e+65):
		tmp = v / ((u * -2.0) - t1)
	else:
		tmp = v * (t1 / (u * -u))
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((t1 <= -3.1e-88) || !(t1 <= 8e+65))
		tmp = Float64(v / Float64(Float64(u * -2.0) - t1));
	else
		tmp = Float64(v * Float64(t1 / Float64(u * Float64(-u))));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((t1 <= -3.1e-88) || ~((t1 <= 8e+65)))
		tmp = v / ((u * -2.0) - t1);
	else
		tmp = v * (t1 / (u * -u));
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.1e-88], N[Not[LessEqual[t1, 8e+65]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 8 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3.0999999999999998e-88 or 7.9999999999999999e65 < t1

    1. Initial program 57.6%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*61.8%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out61.8%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in61.8%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*76.1%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac276.1%

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

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/99.9%

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

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in99.9%

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

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/99.8%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg99.8%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity98.5%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg98.5%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in98.5%

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

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg98.5%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt60.9%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod42.7%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg42.7%

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt27.5%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt17.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod41.5%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(t1 + u\right)}} \]
    9. Step-by-step derivation
      1. distribute-lft-in97.8%

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

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

        \[\leadsto \frac{-1 \cdot v}{\color{blue}{\left(1 + \frac{u}{t1}\right) \cdot u + \left(1 + \frac{u}{t1}\right) \cdot t1}} \]
      4. distribute-lft-in98.5%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
      6. neg-mul-198.5%

        \[\leadsto \color{blue}{-\frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
      7. distribute-neg-frac298.5%

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

        \[\leadsto \frac{v}{-\color{blue}{\left(u + t1\right) \cdot \left(1 + \frac{u}{t1}\right)}} \]
      9. distribute-rgt-neg-in98.5%

        \[\leadsto \frac{v}{\color{blue}{\left(u + t1\right) \cdot \left(-\left(1 + \frac{u}{t1}\right)\right)}} \]
      10. distribute-neg-in98.5%

        \[\leadsto \frac{v}{\left(u + t1\right) \cdot \color{blue}{\left(\left(-1\right) + \left(-\frac{u}{t1}\right)\right)}} \]
      11. metadata-eval98.5%

        \[\leadsto \frac{v}{\left(u + t1\right) \cdot \left(\color{blue}{-1} + \left(-\frac{u}{t1}\right)\right)} \]
      12. unsub-neg98.5%

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

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

      \[\leadsto \frac{v}{\color{blue}{-2 \cdot u + -1 \cdot t1}} \]
    12. Step-by-step derivation
      1. neg-mul-180.7%

        \[\leadsto \frac{v}{-2 \cdot u + \color{blue}{\left(-t1\right)}} \]
      2. unsub-neg80.7%

        \[\leadsto \frac{v}{\color{blue}{-2 \cdot u - t1}} \]
      3. *-commutative80.7%

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

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

    if -3.0999999999999998e-88 < t1 < 7.9999999999999999e65

    1. Initial program 82.4%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/85.4%

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

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

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

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

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

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

Alternative 5: 64.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -3.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 1.3 \cdot 10^{-216}\right):\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= t1 -3.1e-88) (not (<= t1 1.3e-216)))
   (/ (- v) (+ t1 u))
   (* v (/ (/ t1 u) u))))
double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -3.1e-88) || !(t1 <= 1.3e-216)) {
		tmp = -v / (t1 + u);
	} else {
		tmp = v * ((t1 / u) / 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) :: tmp
    if ((t1 <= (-3.1d-88)) .or. (.not. (t1 <= 1.3d-216))) then
        tmp = -v / (t1 + u)
    else
        tmp = v * ((t1 / u) / u)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -3.1e-88) || !(t1 <= 1.3e-216)) {
		tmp = -v / (t1 + u);
	} else {
		tmp = v * ((t1 / u) / u);
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (t1 <= -3.1e-88) or not (t1 <= 1.3e-216):
		tmp = -v / (t1 + u)
	else:
		tmp = v * ((t1 / u) / u)
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((t1 <= -3.1e-88) || !(t1 <= 1.3e-216))
		tmp = Float64(Float64(-v) / Float64(t1 + u));
	else
		tmp = Float64(v * Float64(Float64(t1 / u) / u));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((t1 <= -3.1e-88) || ~((t1 <= 1.3e-216)))
		tmp = -v / (t1 + u);
	else
		tmp = v * ((t1 / u) / u);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.1e-88], N[Not[LessEqual[t1, 1.3e-216]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 1.3 \cdot 10^{-216}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3.0999999999999998e-88 or 1.2999999999999999e-216 < t1

    1. Initial program 64.2%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*67.6%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out67.6%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in67.6%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*80.8%

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. distribute-frac-neg280.8%

        \[\leadsto t1 \cdot \color{blue}{\left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)} \]
      2. distribute-rgt-neg-out80.8%

        \[\leadsto \color{blue}{-t1 \cdot \frac{\frac{v}{t1 + u}}{t1 + u}} \]
      3. associate-/r*67.6%

        \[\leadsto -t1 \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      4. distribute-lft-neg-out67.6%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      5. associate-/l*64.2%

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

        \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
      7. frac-2neg99.3%

        \[\leadsto \frac{-t1}{t1 + u} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. associate-*r/99.8%

        \[\leadsto \color{blue}{\frac{\frac{-t1}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)}} \]
      9. add-sqr-sqrt45.6%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      10. sqrt-unprod39.7%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      11. sqr-neg39.7%

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

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      13. add-sqr-sqrt27.8%

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt15.9%

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

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
      16. sqr-neg50.4%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\sqrt{\color{blue}{\left(t1 + u\right) \cdot \left(t1 + u\right)}}} \]
      17. sqrt-prod50.5%

        \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}} \]
      18. add-sqr-sqrt99.8%

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    9. Simplified71.2%

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

    if -3.0999999999999998e-88 < t1 < 1.2999999999999999e-216

    1. Initial program 82.1%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/84.9%

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

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

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

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

      \[\leadsto v \cdot \frac{-t1}{\color{blue}{u} \cdot u} \]
    7. Step-by-step derivation
      1. associate-/r*86.1%

        \[\leadsto v \cdot \color{blue}{\frac{\frac{-t1}{u}}{u}} \]
      2. div-inv86.2%

        \[\leadsto v \cdot \color{blue}{\left(\frac{-t1}{u} \cdot \frac{1}{u}\right)} \]
      3. add-sqr-sqrt59.6%

        \[\leadsto v \cdot \left(\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{u} \cdot \frac{1}{u}\right) \]
      4. sqrt-unprod50.5%

        \[\leadsto v \cdot \left(\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{u} \cdot \frac{1}{u}\right) \]
      5. sqr-neg50.5%

        \[\leadsto v \cdot \left(\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{u} \cdot \frac{1}{u}\right) \]
      6. sqrt-unprod12.8%

        \[\leadsto v \cdot \left(\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{u} \cdot \frac{1}{u}\right) \]
      7. add-sqr-sqrt45.4%

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

      \[\leadsto v \cdot \color{blue}{\left(\frac{t1}{u} \cdot \frac{1}{u}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/45.4%

        \[\leadsto v \cdot \color{blue}{\frac{\frac{t1}{u} \cdot 1}{u}} \]
      2. *-rgt-identity45.4%

        \[\leadsto v \cdot \frac{\color{blue}{\frac{t1}{u}}}{u} \]
    10. Simplified45.4%

      \[\leadsto v \cdot \color{blue}{\frac{\frac{t1}{u}}{u}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.0%

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

Alternative 6: 57.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -3 \cdot 10^{+108}:\\
\;\;\;\;\frac{v}{-u}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\


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

    1. Initial program 73.4%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/76.4%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{u}} \]
    7. Step-by-step derivation
      1. associate-*r/41.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{u}} \]
      2. mul-1-neg41.2%

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    8. Simplified41.2%

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

    if -2.99999999999999984e108 < u < 5.20000000000000028e246

    1. Initial program 66.6%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*70.7%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out70.7%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in70.7%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*81.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/61.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-161.2%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified61.2%

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

    if 5.20000000000000028e246 < u

    1. Initial program 92.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/93.2%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{u}} \]
    7. Step-by-step derivation
      1. associate-*r/50.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{u}} \]
      2. mul-1-neg50.8%

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    8. Simplified50.8%

      \[\leadsto \color{blue}{\frac{-v}{u}} \]
    9. Step-by-step derivation
      1. clear-num59.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{-v}}} \]
      2. inv-pow59.3%

        \[\leadsto \color{blue}{{\left(\frac{u}{-v}\right)}^{-1}} \]
      3. add-sqr-sqrt29.0%

        \[\leadsto {\left(\frac{u}{\color{blue}{\sqrt{-v} \cdot \sqrt{-v}}}\right)}^{-1} \]
      4. sqrt-unprod59.1%

        \[\leadsto {\left(\frac{u}{\color{blue}{\sqrt{\left(-v\right) \cdot \left(-v\right)}}}\right)}^{-1} \]
      5. sqr-neg59.1%

        \[\leadsto {\left(\frac{u}{\sqrt{\color{blue}{v \cdot v}}}\right)}^{-1} \]
      6. sqrt-unprod30.8%

        \[\leadsto {\left(\frac{u}{\color{blue}{\sqrt{v} \cdot \sqrt{v}}}\right)}^{-1} \]
      7. add-sqr-sqrt59.8%

        \[\leadsto {\left(\frac{u}{\color{blue}{v}}\right)}^{-1} \]
    10. Applied egg-rr59.8%

      \[\leadsto \color{blue}{{\left(\frac{u}{v}\right)}^{-1}} \]
    11. Step-by-step derivation
      1. unpow-159.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \]
    12. Simplified59.8%

      \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3 \cdot 10^{+108}:\\ \;\;\;\;\frac{v}{-u}\\ \mathbf{elif}\;u \leq 5.2 \cdot 10^{+246}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{u}{v}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 57.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -1.35 \cdot 10^{+114} \lor \neg \left(u \leq 1.35 \cdot 10^{+246}\right):\\ \;\;\;\;\frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= u -1.35e+114) (not (<= u 1.35e+246))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -1.35e+114) || !(u <= 1.35e+246)) {
		tmp = v / u;
	} else {
		tmp = v / -t1;
	}
	return tmp;
}
real(8) function code(u, v, t1)
    real(8), intent (in) :: u
    real(8), intent (in) :: v
    real(8), intent (in) :: t1
    real(8) :: tmp
    if ((u <= (-1.35d+114)) .or. (.not. (u <= 1.35d+246))) then
        tmp = v / u
    else
        tmp = v / -t1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -1.35e+114) || !(u <= 1.35e+246)) {
		tmp = v / u;
	} else {
		tmp = v / -t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -1.35e+114) or not (u <= 1.35e+246):
		tmp = v / u
	else:
		tmp = v / -t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -1.35e+114) || !(u <= 1.35e+246))
		tmp = Float64(v / u);
	else
		tmp = Float64(v / Float64(-t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -1.35e+114) || ~((u <= 1.35e+246)))
		tmp = v / u;
	else
		tmp = v / -t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.35e+114], N[Not[LessEqual[u, 1.35e+246]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.35 \cdot 10^{+114} \lor \neg \left(u \leq 1.35 \cdot 10^{+246}\right):\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.35e114 or 1.35e246 < u

    1. Initial program 78.1%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/80.4%

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

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

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

      \[\leadsto v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \color{blue}{u}} \]
    6. Step-by-step derivation
      1. associate-*r/78.1%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-\left(-t1\right) \cdot v}{-\left(t1 + u\right)}}}{u} \]
      5. distribute-lft-neg-out86.1%

        \[\leadsto \frac{\frac{-\color{blue}{\left(-t1 \cdot v\right)}}{-\left(t1 + u\right)}}{u} \]
      6. remove-double-neg86.1%

        \[\leadsto \frac{\frac{\color{blue}{t1 \cdot v}}{-\left(t1 + u\right)}}{u} \]
      7. distribute-neg-in86.1%

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

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

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}} + \left(-u\right)}}{u} \]
      10. sqr-neg84.9%

        \[\leadsto \frac{\frac{t1 \cdot v}{\sqrt{\color{blue}{t1 \cdot t1}} + \left(-u\right)}}{u} \]
      11. sqrt-unprod37.8%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}} + \left(-u\right)}}{u} \]
      12. add-sqr-sqrt86.1%

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

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

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

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

    if -1.35e114 < u < 1.35e246

    1. Initial program 66.8%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*70.8%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out70.8%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in70.8%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*81.9%

        \[\leadsto t1 \cdot \left(-\color{blue}{\frac{\frac{v}{t1 + u}}{t1 + u}}\right) \]
      5. distribute-neg-frac281.9%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/60.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-160.9%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified60.9%

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

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

Alternative 8: 57.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -6 \cdot 10^{+108}:\\
\;\;\;\;\frac{v}{-u}\\

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

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


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

    1. Initial program 73.4%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/76.4%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{u}} \]
    7. Step-by-step derivation
      1. associate-*r/41.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{u}} \]
      2. mul-1-neg41.2%

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    8. Simplified41.2%

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

    if -5.99999999999999968e108 < u < 1.35e246

    1. Initial program 66.6%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*70.7%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out70.7%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in70.7%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*81.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/61.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-161.2%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified61.2%

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

    if 1.35e246 < u

    1. Initial program 92.9%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/93.2%

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

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

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

      \[\leadsto v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \color{blue}{u}} \]
    6. Step-by-step derivation
      1. associate-*r/92.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-\left(-t1\right) \cdot v}{-\left(t1 + u\right)}}}{u} \]
      5. distribute-lft-neg-out93.0%

        \[\leadsto \frac{\frac{-\color{blue}{\left(-t1 \cdot v\right)}}{-\left(t1 + u\right)}}{u} \]
      6. remove-double-neg93.0%

        \[\leadsto \frac{\frac{\color{blue}{t1 \cdot v}}{-\left(t1 + u\right)}}{u} \]
      7. distribute-neg-in93.0%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\left(-t1\right) + \left(-u\right)}}}{u} \]
      8. add-sqr-sqrt57.3%

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

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}} + \left(-u\right)}}{u} \]
      10. sqr-neg92.9%

        \[\leadsto \frac{\frac{t1 \cdot v}{\sqrt{\color{blue}{t1 \cdot t1}} + \left(-u\right)}}{u} \]
      11. sqrt-unprod35.7%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}} + \left(-u\right)}}{u} \]
      12. add-sqr-sqrt93.0%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{t1} + \left(-u\right)}}{u} \]
      13. sub-neg93.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -6 \cdot 10^{+108}:\\ \;\;\;\;\frac{v}{-u}\\ \mathbf{elif}\;u \leq 1.35 \cdot 10^{+246}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 23.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t1 \leq -1.45 \cdot 10^{+64} \lor \neg \left(t1 \leq 5 \cdot 10^{+126}\right):\\ \;\;\;\;\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (if (or (<= t1 -1.45e+64) (not (<= t1 5e+126))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -1.45e+64) || !(t1 <= 5e+126)) {
		tmp = v / t1;
	} else {
		tmp = v / 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) :: tmp
    if ((t1 <= (-1.45d+64)) .or. (.not. (t1 <= 5d+126))) then
        tmp = v / t1
    else
        tmp = v / u
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double tmp;
	if ((t1 <= -1.45e+64) || !(t1 <= 5e+126)) {
		tmp = v / t1;
	} else {
		tmp = v / u;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (t1 <= -1.45e+64) or not (t1 <= 5e+126):
		tmp = v / t1
	else:
		tmp = v / u
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((t1 <= -1.45e+64) || !(t1 <= 5e+126))
		tmp = Float64(v / t1);
	else
		tmp = Float64(v / u);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((t1 <= -1.45e+64) || ~((t1 <= 5e+126)))
		tmp = v / t1;
	else
		tmp = v / u;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.45e+64], N[Not[LessEqual[t1, 5e+126]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.45 \cdot 10^{+64} \lor \neg \left(t1 \leq 5 \cdot 10^{+126}\right):\\
\;\;\;\;\frac{v}{t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.44999999999999997e64 or 4.99999999999999977e126 < t1

    1. Initial program 43.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*48.8%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out48.8%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in48.8%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*67.4%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
    6. Step-by-step derivation
      1. associate-*r/86.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
      2. neg-mul-186.2%

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    7. Simplified86.2%

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]
    8. Step-by-step derivation
      1. neg-sub086.2%

        \[\leadsto \frac{\color{blue}{0 - v}}{t1} \]
      2. sub-neg86.2%

        \[\leadsto \frac{\color{blue}{0 + \left(-v\right)}}{t1} \]
      3. add-sqr-sqrt39.1%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{-v} \cdot \sqrt{-v}}}{t1} \]
      4. sqrt-unprod41.3%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{\left(-v\right) \cdot \left(-v\right)}}}{t1} \]
      5. sqr-neg41.3%

        \[\leadsto \frac{0 + \sqrt{\color{blue}{v \cdot v}}}{t1} \]
      6. sqrt-unprod12.7%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{v} \cdot \sqrt{v}}}{t1} \]
      7. add-sqr-sqrt26.7%

        \[\leadsto \frac{0 + \color{blue}{v}}{t1} \]
    9. Applied egg-rr26.7%

      \[\leadsto \frac{\color{blue}{0 + v}}{t1} \]
    10. Step-by-step derivation
      1. +-lft-identity26.7%

        \[\leadsto \frac{\color{blue}{v}}{t1} \]
    11. Simplified26.7%

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

    if -1.44999999999999997e64 < t1 < 4.99999999999999977e126

    1. Initial program 83.0%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/87.1%

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

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

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

      \[\leadsto v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \color{blue}{u}} \]
    6. Step-by-step derivation
      1. associate-*r/61.0%

        \[\leadsto \color{blue}{\frac{v \cdot \left(-t1\right)}{\left(t1 + u\right) \cdot u}} \]
      2. *-commutative61.0%

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

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

        \[\leadsto \frac{\color{blue}{\frac{-\left(-t1\right) \cdot v}{-\left(t1 + u\right)}}}{u} \]
      5. distribute-lft-neg-out67.1%

        \[\leadsto \frac{\frac{-\color{blue}{\left(-t1 \cdot v\right)}}{-\left(t1 + u\right)}}{u} \]
      6. remove-double-neg67.1%

        \[\leadsto \frac{\frac{\color{blue}{t1 \cdot v}}{-\left(t1 + u\right)}}{u} \]
      7. distribute-neg-in67.1%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\left(-t1\right) + \left(-u\right)}}}{u} \]
      8. add-sqr-sqrt35.9%

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

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}} + \left(-u\right)}}{u} \]
      10. sqr-neg68.1%

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

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}} + \left(-u\right)}}{u} \]
      12. add-sqr-sqrt67.2%

        \[\leadsto \frac{\frac{t1 \cdot v}{\color{blue}{t1} + \left(-u\right)}}{u} \]
      13. sub-neg67.2%

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

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

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

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

Alternative 10: 65.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < 4.2000000000000002e117

    1. Initial program 69.3%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*73.1%

        \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-out73.1%

        \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      3. distribute-rgt-neg-in73.1%

        \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
      4. associate-/r*82.6%

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/98.1%

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

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
      3. distribute-neg-in98.1%

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

        \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
      5. associate-*l/98.1%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(-u\right) - t1}{t1}}} \cdot \frac{v}{t1 + u} \]
      7. frac-2neg98.0%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
      9. *-un-lft-identity96.8%

        \[\leadsto \frac{\color{blue}{-v}}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      10. frac-2neg96.8%

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg96.8%

        \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      12. distribute-neg-in96.8%

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

        \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      14. remove-double-neg96.8%

        \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
      15. add-sqr-sqrt51.6%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod39.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      17. sqr-neg39.3%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      18. sqrt-unprod12.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      19. add-sqr-sqrt27.4%

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt19.0%

        \[\leadsto \frac{-v}{\frac{t1 + u}{t1} \cdot \color{blue}{\left(\sqrt{-\left(t1 + u\right)} \cdot \sqrt{-\left(t1 + u\right)}\right)}} \]
      21. sqrt-unprod50.5%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(t1 + u\right)}} \]
    9. Step-by-step derivation
      1. distribute-lft-in95.4%

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

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

        \[\leadsto \frac{-1 \cdot v}{\color{blue}{\left(1 + \frac{u}{t1}\right) \cdot u + \left(1 + \frac{u}{t1}\right) \cdot t1}} \]
      4. distribute-lft-in96.8%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
      6. neg-mul-196.8%

        \[\leadsto \color{blue}{-\frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
      7. distribute-neg-frac296.8%

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

        \[\leadsto \frac{v}{-\color{blue}{\left(u + t1\right) \cdot \left(1 + \frac{u}{t1}\right)}} \]
      9. distribute-rgt-neg-in96.8%

        \[\leadsto \frac{v}{\color{blue}{\left(u + t1\right) \cdot \left(-\left(1 + \frac{u}{t1}\right)\right)}} \]
      10. distribute-neg-in96.8%

        \[\leadsto \frac{v}{\left(u + t1\right) \cdot \color{blue}{\left(\left(-1\right) + \left(-\frac{u}{t1}\right)\right)}} \]
      11. metadata-eval96.8%

        \[\leadsto \frac{v}{\left(u + t1\right) \cdot \left(\color{blue}{-1} + \left(-\frac{u}{t1}\right)\right)} \]
      12. unsub-neg96.8%

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

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

      \[\leadsto \frac{v}{\color{blue}{-2 \cdot u + -1 \cdot t1}} \]
    12. Step-by-step derivation
      1. neg-mul-163.9%

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

        \[\leadsto \frac{v}{\color{blue}{-2 \cdot u - t1}} \]
      3. *-commutative63.9%

        \[\leadsto \frac{v}{\color{blue}{u \cdot -2} - t1} \]
    13. Simplified63.9%

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

    if 4.2000000000000002e117 < u

    1. Initial program 68.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-*l/69.0%

        \[\leadsto \color{blue}{\frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
      2. *-commutative69.0%

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

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

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

      \[\leadsto v \cdot \frac{-t1}{\color{blue}{u} \cdot u} \]
    7. Step-by-step derivation
      1. associate-/r*82.9%

        \[\leadsto v \cdot \color{blue}{\frac{\frac{-t1}{u}}{u}} \]
      2. div-inv82.8%

        \[\leadsto v \cdot \color{blue}{\left(\frac{-t1}{u} \cdot \frac{1}{u}\right)} \]
      3. add-sqr-sqrt49.9%

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

        \[\leadsto v \cdot \left(\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{u} \cdot \frac{1}{u}\right) \]
      5. sqr-neg68.2%

        \[\leadsto v \cdot \left(\frac{\sqrt{\color{blue}{t1 \cdot t1}}}{u} \cdot \frac{1}{u}\right) \]
      6. sqrt-unprod25.8%

        \[\leadsto v \cdot \left(\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{u} \cdot \frac{1}{u}\right) \]
      7. add-sqr-sqrt61.4%

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

      \[\leadsto v \cdot \color{blue}{\left(\frac{t1}{u} \cdot \frac{1}{u}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/61.4%

        \[\leadsto v \cdot \color{blue}{\frac{\frac{t1}{u} \cdot 1}{u}} \]
      2. *-rgt-identity61.4%

        \[\leadsto v \cdot \frac{\color{blue}{\frac{t1}{u}}}{u} \]
    10. Simplified61.4%

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

Alternative 11: 98.1% accurate, 1.0× speedup?

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

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

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. times-frac98.4%

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

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

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

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

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

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

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

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

Alternative 12: 95.2% accurate, 1.1× speedup?

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

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

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*72.5%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out72.5%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in72.5%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*83.4%

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

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

    \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. associate-*r/98.3%

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

      \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{-\color{blue}{\left(u + t1\right)}} \]
    3. distribute-neg-in98.3%

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

      \[\leadsto \frac{t1 \cdot \frac{v}{t1 + u}}{\color{blue}{\left(-u\right) - t1}} \]
    5. associate-*l/98.4%

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

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

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

      \[\leadsto \color{blue}{\frac{1 \cdot \left(-v\right)}{\frac{\left(-u\right) - t1}{t1} \cdot \left(-\left(t1 + u\right)\right)}} \]
    9. *-un-lft-identity96.5%

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

      \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
    11. sub-neg96.5%

      \[\leadsto \frac{-v}{\frac{-\color{blue}{\left(\left(-u\right) + \left(-t1\right)\right)}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
    12. distribute-neg-in96.5%

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

      \[\leadsto \frac{-v}{\frac{-\left(-\color{blue}{\left(t1 + u\right)}\right)}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
    14. remove-double-neg96.5%

      \[\leadsto \frac{-v}{\frac{\color{blue}{t1 + u}}{-t1} \cdot \left(-\left(t1 + u\right)\right)} \]
    15. add-sqr-sqrt51.7%

      \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
    16. sqrt-unprod43.8%

      \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}} \cdot \left(-\left(t1 + u\right)\right)} \]
    17. sqr-neg43.8%

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

      \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
    19. add-sqr-sqrt32.7%

      \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
    20. add-sqr-sqrt16.4%

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(t1 + u\right)}} \]
  9. Step-by-step derivation
    1. distribute-lft-in91.1%

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

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

      \[\leadsto \frac{-1 \cdot v}{\color{blue}{\left(1 + \frac{u}{t1}\right) \cdot u + \left(1 + \frac{u}{t1}\right) \cdot t1}} \]
    4. distribute-lft-in96.5%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
    6. neg-mul-196.5%

      \[\leadsto \color{blue}{-\frac{v}{\left(1 + \frac{u}{t1}\right) \cdot \left(u + t1\right)}} \]
    7. distribute-neg-frac296.5%

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

      \[\leadsto \frac{v}{-\color{blue}{\left(u + t1\right) \cdot \left(1 + \frac{u}{t1}\right)}} \]
    9. distribute-rgt-neg-in96.5%

      \[\leadsto \frac{v}{\color{blue}{\left(u + t1\right) \cdot \left(-\left(1 + \frac{u}{t1}\right)\right)}} \]
    10. distribute-neg-in96.5%

      \[\leadsto \frac{v}{\left(u + t1\right) \cdot \color{blue}{\left(\left(-1\right) + \left(-\frac{u}{t1}\right)\right)}} \]
    11. metadata-eval96.5%

      \[\leadsto \frac{v}{\left(u + t1\right) \cdot \left(\color{blue}{-1} + \left(-\frac{u}{t1}\right)\right)} \]
    12. unsub-neg96.5%

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

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

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

Alternative 13: 61.5% accurate, 2.0× speedup?

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

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

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*72.5%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out72.5%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in72.5%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*83.4%

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

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

    \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. distribute-frac-neg283.4%

      \[\leadsto t1 \cdot \color{blue}{\left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)} \]
    2. distribute-rgt-neg-out83.4%

      \[\leadsto \color{blue}{-t1 \cdot \frac{\frac{v}{t1 + u}}{t1 + u}} \]
    3. associate-/r*72.5%

      \[\leadsto -t1 \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    4. distribute-lft-neg-out72.5%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    5. associate-/l*69.1%

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

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

      \[\leadsto \frac{-t1}{t1 + u} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
    8. associate-*r/99.1%

      \[\leadsto \color{blue}{\frac{\frac{-t1}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)}} \]
    9. add-sqr-sqrt52.5%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    10. sqrt-unprod44.3%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-t1\right) \cdot \left(-t1\right)}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    11. sqr-neg44.3%

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

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    13. add-sqr-sqrt32.7%

      \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
    14. add-sqr-sqrt16.4%

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

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{\left(-\left(t1 + u\right)\right) \cdot \left(-\left(t1 + u\right)\right)}}} \]
    16. sqr-neg53.4%

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

      \[\leadsto \frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{\color{blue}{\sqrt{t1 + u} \cdot \sqrt{t1 + u}}} \]
    18. add-sqr-sqrt99.1%

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

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

    \[\leadsto \frac{\color{blue}{-1 \cdot v}}{t1 + u} \]
  8. Step-by-step derivation
    1. mul-1-neg59.3%

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  9. Simplified59.3%

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

Alternative 14: 14.0% accurate, 4.0× speedup?

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

\\
\frac{v}{t1}
\end{array}
Derivation
  1. Initial program 69.1%

    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
  2. Step-by-step derivation
    1. associate-/l*72.5%

      \[\leadsto \color{blue}{\left(-t1\right) \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    2. distribute-lft-neg-out72.5%

      \[\leadsto \color{blue}{-t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
    3. distribute-rgt-neg-in72.5%

      \[\leadsto \color{blue}{t1 \cdot \left(-\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)} \]
    4. associate-/r*83.4%

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

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

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

    \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
  6. Step-by-step derivation
    1. associate-*r/51.8%

      \[\leadsto \color{blue}{\frac{-1 \cdot v}{t1}} \]
    2. neg-mul-151.8%

      \[\leadsto \frac{\color{blue}{-v}}{t1} \]
  7. Simplified51.8%

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

      \[\leadsto \frac{\color{blue}{0 - v}}{t1} \]
    2. sub-neg51.8%

      \[\leadsto \frac{\color{blue}{0 + \left(-v\right)}}{t1} \]
    3. add-sqr-sqrt23.7%

      \[\leadsto \frac{0 + \color{blue}{\sqrt{-v} \cdot \sqrt{-v}}}{t1} \]
    4. sqrt-unprod30.7%

      \[\leadsto \frac{0 + \color{blue}{\sqrt{\left(-v\right) \cdot \left(-v\right)}}}{t1} \]
    5. sqr-neg30.7%

      \[\leadsto \frac{0 + \sqrt{\color{blue}{v \cdot v}}}{t1} \]
    6. sqrt-unprod5.4%

      \[\leadsto \frac{0 + \color{blue}{\sqrt{v} \cdot \sqrt{v}}}{t1} \]
    7. add-sqr-sqrt11.1%

      \[\leadsto \frac{0 + \color{blue}{v}}{t1} \]
  9. Applied egg-rr11.1%

    \[\leadsto \frac{\color{blue}{0 + v}}{t1} \]
  10. Step-by-step derivation
    1. +-lft-identity11.1%

      \[\leadsto \frac{\color{blue}{v}}{t1} \]
  11. Simplified11.1%

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

Reproduce

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