Rosa's DopplerBench

Percentage Accurate: 72.3% → 98.3%
Time: 11.9s
Alternatives: 15
Speedup: 1.0×

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 15 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.3% 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.3% accurate, 1.0× speedup?

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

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

    \[\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*81.7%

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

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

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

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

      \[\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*71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.5% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if u < -5.4e188

    1. Initial program 68.7%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified84.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-neg284.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt65.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-unprod69.2%

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

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

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

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

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

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

    if -5.4e188 < u < -1.20000000000000008e-132

    1. Initial program 77.0%

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

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

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

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

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

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

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

    if -1.20000000000000008e-132 < u < 7.20000000000000064e-151

    1. Initial program 50.9%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified63.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.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.20000000000000064e-151 < u < 9.80000000000000006e145

    1. Initial program 86.3%

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

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

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

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

    if 9.80000000000000006e145 < u

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-t1 \cdot \color{blue}{\frac{1}{\frac{u}{v}}}}{-\left(-\left(t1 + u\right)\right)} \]
      4. un-div-inv100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5.4 \cdot 10^{+188}:\\ \;\;\;\;\frac{\left(-v\right) \cdot \frac{t1}{u}}{t1 + u}\\ \mathbf{elif}\;u \leq -1.2 \cdot 10^{-132}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{t1 + u}}{t1 + u}\\ \mathbf{elif}\;u \leq 7.2 \cdot 10^{-151}:\\ \;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\ \mathbf{elif}\;u \leq 9.8 \cdot 10^{+145}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{\left(-u\right) - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.8% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\left(-u\right) - t1}{t1}} \cdot \color{blue}{\frac{-v}{-\left(t1 + u\right)}} \]
      8. frac-times94.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-identity94.8%

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

        \[\leadsto \frac{-v}{\color{blue}{\frac{-\left(\left(-u\right) - t1\right)}{-t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      11. sub-neg94.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-in94.8%

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod18.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-neg18.0%

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

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

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

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

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

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

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

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

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

    if -4.39999999999999977e132 < t1 < 3.9999999999999999e107

    1. Initial program 84.9%

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

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

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

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

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

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

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

    if 3.9999999999999999e107 < t1

    1. Initial program 46.7%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified59.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 86.7%

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

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

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

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

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

Alternative 4: 78.4% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -5.7999999999999998e-40

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999998e-40 < u < 1.55e-13

    1. Initial program 63.2%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified73.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/96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55e-13 < u

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod53.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-neg53.7%

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

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

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

        \[\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-unprod75.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-rr93.3%

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

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

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

      \[\leadsto \color{blue}{\frac{-1}{\frac{t1 + u}{t1}} \cdot \frac{v}{t1 + u}} \]
    9. Step-by-step derivation
      1. *-commutative98.1%

        \[\leadsto \color{blue}{\frac{v}{t1 + u} \cdot \frac{-1}{\frac{t1 + u}{t1}}} \]
      2. associate-/r/98.2%

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

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

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

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

Alternative 5: 75.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.2 \cdot 10^{-39} \lor \neg \left(t1 \leq 1.55 \cdot 10^{-34}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -5.2e-39 or 1.5499999999999999e-34 < t1

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod36.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-neg36.3%

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

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

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

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

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

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

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

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

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

    if -5.2e-39 < t1 < 1.5499999999999999e-34

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.4 \cdot 10^{-39} \lor \neg \left(t1 \leq 22000\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -5.4000000000000001e-39 or 22000 < t1

    1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{t1}} \cdot \left(-\left(t1 + u\right)\right)} \]
      20. add-sqr-sqrt16.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-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-rr92.6%

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

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

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

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

    if -5.4000000000000001e-39 < t1 < 22000

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

Alternative 7: 78.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.2 \cdot 10^{-40} \lor \neg \left(u \leq 2.2 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{\left(-u\right) - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -7.2e-40 or 2.19999999999999997e-13 < 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*77.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-t1 \cdot \color{blue}{\frac{1}{\frac{u}{v}}}}{-\left(-\left(t1 + u\right)\right)} \]
      4. un-div-inv79.6%

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

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{\color{blue}{t1 + u}} \]
    7. Applied egg-rr79.6%

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

    if -7.2e-40 < u < 2.19999999999999997e-13

    1. Initial program 63.2%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified73.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/96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 69.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.5 \cdot 10^{+79} \lor \neg \left(u \leq 7.2 \cdot 10^{+136}\right):\\
\;\;\;\;v \cdot \frac{t1}{u \cdot \left(u - t1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -3.4999999999999998e79 or 7.20000000000000011e136 < u

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t1 \cdot v}{u \cdot \left(t1 + u\right)}} \]
    8. Step-by-step derivation
      1. *-commutative66.0%

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

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

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

        \[\leadsto v \cdot \frac{t1}{\color{blue}{u \cdot u + u \cdot t1}} \]
      5. add-sqr-sqrt22.6%

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

        \[\leadsto v \cdot \frac{t1}{u \cdot u + \color{blue}{\sqrt{u \cdot u}} \cdot t1} \]
      7. sqr-neg41.4%

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

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

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

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

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

        \[\leadsto v \cdot \frac{t1}{\color{blue}{u \cdot u - t1 \cdot u}} \]
      13. distribute-rgt-out--66.6%

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

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

    if -3.4999999999999998e79 < u < 7.20000000000000011e136

    1. Initial program 70.7%

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

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified77.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/97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod35.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-neg35.3%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 65.5% accurate, 0.7× speedup?

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

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

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


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

    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*73.8%

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

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

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

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

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

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

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

      \[\leadsto t1 \cdot \color{blue}{\left(-1 \cdot \frac{v}{t1 \cdot u}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg41.7%

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

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

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

      \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1}}{-u}} \]
    9. Step-by-step derivation
      1. clear-num41.4%

        \[\leadsto t1 \cdot \color{blue}{\frac{1}{\frac{-u}{\frac{v}{t1}}}} \]
      2. un-div-inv41.4%

        \[\leadsto \color{blue}{\frac{t1}{\frac{-u}{\frac{v}{t1}}}} \]
      3. div-inv41.4%

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

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

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

        \[\leadsto \frac{t1}{\sqrt{\color{blue}{u \cdot u}} \cdot \frac{1}{\frac{v}{t1}}} \]
      7. sqrt-unprod19.0%

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

        \[\leadsto \frac{t1}{\color{blue}{u} \cdot \frac{1}{\frac{v}{t1}}} \]
      9. clear-num41.4%

        \[\leadsto \frac{t1}{u \cdot \color{blue}{\frac{t1}{v}}} \]
    10. Applied egg-rr41.4%

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

        \[\leadsto \color{blue}{\frac{\frac{t1}{u}}{\frac{t1}{v}}} \]
      2. associate-/r/60.1%

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

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

    if -3.6000000000000001e114 < u < 1.35e163

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-v}{\frac{t1 + u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot \left(-\left(t1 + u\right)\right)} \]
      16. sqrt-unprod35.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-neg35.7%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 65.2% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.4000000000000001e114 or 7.99999999999999947e146 < u

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

      \[\leadsto t1 \cdot \color{blue}{\left(-1 \cdot \frac{v}{t1 \cdot u}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg42.0%

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

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

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

      \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1}}{-u}} \]
    9. Step-by-step derivation
      1. clear-num41.7%

        \[\leadsto t1 \cdot \color{blue}{\frac{1}{\frac{-u}{\frac{v}{t1}}}} \]
      2. un-div-inv41.7%

        \[\leadsto \color{blue}{\frac{t1}{\frac{-u}{\frac{v}{t1}}}} \]
      3. div-inv41.7%

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

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

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

        \[\leadsto \frac{t1}{\sqrt{\color{blue}{u \cdot u}} \cdot \frac{1}{\frac{v}{t1}}} \]
      7. sqrt-unprod19.9%

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

        \[\leadsto \frac{t1}{\color{blue}{u} \cdot \frac{1}{\frac{v}{t1}}} \]
      9. clear-num41.7%

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

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

        \[\leadsto \color{blue}{\frac{\frac{t1}{u}}{\frac{t1}{v}}} \]
      2. associate-/r/59.9%

        \[\leadsto \color{blue}{\frac{\frac{t1}{u}}{t1} \cdot v} \]
    12. Applied egg-rr59.9%

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

    if -4.4000000000000001e114 < u < 7.99999999999999947e146

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt10.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-unprod51.2%

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

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

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

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

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

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

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

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

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

Alternative 11: 58.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{+159} \lor \neg \left(u \leq 9 \cdot 10^{+111}\right):\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.1999999999999999e159 or 9.00000000000000001e111 < u

    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*73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1999999999999999e159 < u < 9.00000000000000001e111

    1. Initial program 71.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.2%

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified79.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 64.3%

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

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

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

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

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

Alternative 12: 58.9% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8000000000000003e160 < u < 1.27999999999999994e113

    1. Initial program 71.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.2%

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

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

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

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

        \[\leadsto t1 \cdot \color{blue}{\frac{\frac{v}{t1 + u}}{-\left(t1 + u\right)}} \]
    3. Simplified79.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 64.3%

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

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

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

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

    if 1.27999999999999994e113 < u

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.8 \cdot 10^{+160}:\\ \;\;\;\;\frac{v}{u}\\ \mathbf{elif}\;u \leq 1.28 \cdot 10^{+113}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 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 71.8%

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

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

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

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

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

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

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

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

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

Alternative 14: 62.0% 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 71.8%

    \[\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*81.7%

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

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

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

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

      \[\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*71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  10. Final simplification60.2%

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

Alternative 15: 17.5% accurate, 4.0× speedup?

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

\\
\frac{v}{u}
\end{array}
Derivation
  1. Initial program 71.8%

    \[\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*81.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{v}{u}} \]
  9. Final simplification16.6%

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

Reproduce

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