Rosa's DopplerBench

Percentage Accurate: 72.9% → 98.1%
Time: 10.0s
Alternatives: 17
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 17 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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 46.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    10. Step-by-step derivation
      1. div-inv92.2%

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

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

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

        \[\leadsto \sqrt{\color{blue}{v \cdot v}} \cdot \frac{1}{t1 + u} \]
      5. sqrt-unprod22.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{-1}{\color{blue}{t1 - u}} \]
    11. Applied egg-rr92.2%

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1 - u} \]
    13. Simplified92.3%

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

    if -3.8e151 < t1 < 1.82000000000000001e117

    1. Initial program 86.2%

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

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

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

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

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

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

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

    if 1.82000000000000001e117 < t1

    1. Initial program 69.3%

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

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

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

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

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

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

      \[\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/100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.5 \cdot 10^{-24} \lor \neg \left(u \leq 7 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -9.50000000000000029e-24 or 6.9999999999999999e28 < u

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000029e-24 < u < 6.9999999999999999e28

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -3 \cdot 10^{-24} \lor \neg \left(u \leq 1.55 \cdot 10^{+24}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.99999999999999995e-24 or 1.55000000000000005e24 < u

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-t1}{u}} \]
      2. clear-num84.0%

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

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

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

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

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

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

    if -2.99999999999999995e-24 < u < 1.55000000000000005e24

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.4 \cdot 10^{-26}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\

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

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


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

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.39999999999999963e-26 < u < 7.99999999999999931e29

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

    if 7.99999999999999931e29 < u

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-t1}{u}} \cdot \frac{v}{u} \]
    9. Step-by-step derivation
      1. distribute-frac-neg83.0%

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

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

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

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

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

Alternative 6: 66.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.6599999999999999e31 or 2.00000000000000011e32 < u

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot v}{\frac{u}{-t1} \cdot u}} \]
      3. *-un-lft-identity70.9%

        \[\leadsto \frac{\color{blue}{v}}{\frac{u}{-t1} \cdot u} \]
      4. add-sqr-sqrt36.7%

        \[\leadsto \frac{v}{\frac{u}{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \cdot u} \]
      5. sqrt-unprod54.1%

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

        \[\leadsto \frac{v}{\frac{u}{\sqrt{\color{blue}{t1 \cdot t1}}} \cdot u} \]
      7. sqrt-unprod27.5%

        \[\leadsto \frac{v}{\frac{u}{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}} \cdot u} \]
      8. add-sqr-sqrt59.5%

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

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

    if -1.6599999999999999e31 < u < 2.00000000000000011e32

    1. Initial program 76.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*82.8%

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

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

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

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

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

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

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

Alternative 7: 67.2% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.75000000000000001e31 or 2.00000000000000011e32 < u

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{\color{blue}{t1 \cdot t1}} \cdot \frac{v}{u}}{u} \]
      5. sqrt-unprod27.4%

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

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

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

    if -2.75000000000000001e31 < u < 2.00000000000000011e32

    1. Initial program 76.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*82.8%

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

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

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

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

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

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

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

Alternative 8: 59.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.05e167 or 1.2000000000000001e146 < u

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.05e167 < u < 1.2000000000000001e146

    1. Initial program 77.4%

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

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

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

        \[\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. Taylor expanded in t1 around inf 68.1%

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

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

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

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

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

Alternative 9: 59.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.65 \cdot 10^{+167}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\

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

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


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

    1. Initial program 79.9%

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

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

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

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

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

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

      \[\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/100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65000000000000009e167 < u < 7.19999999999999948e145

    1. Initial program 77.4%

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

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

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

        \[\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. Taylor expanded in t1 around inf 68.1%

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

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

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

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

    if 7.19999999999999948e145 < u

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{v}{u}} \]
    11. Step-by-step derivation
      1. clear-num41.3%

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

        \[\leadsto \color{blue}{\frac{-0.5}{\frac{u}{v}}} \]
    12. Applied egg-rr41.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.65 \cdot 10^{+167}:\\ \;\;\;\;\frac{v}{u} \cdot -0.5\\ \mathbf{elif}\;u \leq 7.2 \cdot 10^{+145}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.5}{\frac{u}{v}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 23.1% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -5.0000000000000002e75 or 1.7e19 < t1

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{t1 \cdot v}}{t1 + u}}{t1} \]
      6. *-commutative43.3%

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

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

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

        \[\leadsto \frac{v}{t1 + u} \cdot \color{blue}{1} \]
      10. *-rgt-identity43.6%

        \[\leadsto \color{blue}{\frac{v}{t1 + u}} \]
    9. Simplified43.6%

      \[\leadsto \color{blue}{\frac{v}{t1 + u}} \]
    10. Taylor expanded in t1 around inf 42.1%

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

    if -5.0000000000000002e75 < t1 < 1.7e19

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{t1}}{t1 + u} \cdot \left(-v\right)}{-\left(t1 + u\right)} \]
      14. add-sqr-sqrt15.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-unprod57.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-neg57.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-prod46.4%

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    10. Step-by-step derivation
      1. div-inv42.8%

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

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

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

        \[\leadsto \sqrt{\color{blue}{v \cdot v}} \cdot \frac{1}{t1 + u} \]
      5. sqrt-unprod9.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{-1}{\color{blue}{t1 - u}} \]
    11. Applied egg-rr43.9%

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

        \[\leadsto \color{blue}{\frac{v \cdot -1}{t1 - u}} \]
      2. *-commutative44.0%

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

        \[\leadsto \frac{\color{blue}{-v}}{t1 - u} \]
    13. Simplified44.0%

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

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

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

Alternative 11: 97.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{t1}{t1 + u} \cdot \frac{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(t1 / Float64(t1 + u)) * Float64(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[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.4% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 78.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.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*86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7000000000000001e262 < v

    1. Initial program 61.3%

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

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

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

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

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

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

Alternative 13: 56.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.66 \cdot 10^{+171}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\

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


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

    1. Initial program 79.9%

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

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

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

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

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

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

      \[\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/100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6599999999999999e171 < u

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 56.8% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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 inf 47.9%

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    10. Step-by-step derivation
      1. div-inv47.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto v \cdot \frac{-1}{\color{blue}{t1 - u}} \]
    11. Applied egg-rr47.6%

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1 - u} \]
    13. Simplified47.6%

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

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

    if -9.9999999999999993e167 < u

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 56.7% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

    if -2.35e166 < u

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 62.2% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  10. Step-by-step derivation
    1. div-inv62.8%

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

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

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

      \[\leadsto \sqrt{\color{blue}{v \cdot v}} \cdot \frac{1}{t1 + u} \]
    5. sqrt-unprod13.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto v \cdot \frac{-1}{\color{blue}{t1 - u}} \]
  11. Applied egg-rr63.3%

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

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

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

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

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

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

Alternative 17: 14.1% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{v}{t1 + u} \cdot \color{blue}{1} \]
    10. *-rgt-identity27.1%

      \[\leadsto \color{blue}{\frac{v}{t1 + u}} \]
  9. Simplified27.1%

    \[\leadsto \color{blue}{\frac{v}{t1 + u}} \]
  10. Taylor expanded in t1 around inf 19.1%

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

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

Reproduce

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