Rosa's DopplerBench

Percentage Accurate: 72.1% → 98.0%
Time: 18.0s
Alternatives: 20
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 20 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.1% 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.0% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.0% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e86 < t1 < 6.0000000000000004e182

    1. Initial program 78.8%

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

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

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

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

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

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

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

    if 6.0000000000000004e182 < t1

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 80.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.7e5 or 5.49999999999999979e-13 < u

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7e5 < u < 5.49999999999999979e-13

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{u}}}{t1 + u} \]
      3. distribute-rgt-neg-in93.8%

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

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

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

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

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

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

    if -3.3999999999999998e71 < u < 4.60000000000000039e-50

    1. Initial program 67.3%

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

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

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

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

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

    if 4.60000000000000039e-50 < u

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.06e24 or 1.07999999999999995e-29 < t1

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.06e24 < t1 < 1.07999999999999995e-29

    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-frac95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{t1 \cdot \frac{v}{u}}}{t1 + u} \]
      3. distribute-rgt-neg-in74.0%

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

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

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

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

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

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

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

Alternative 6: 79.2% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.2999999999999999e24 or 2.2499999999999999e-28 < t1

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2999999999999999e24 < t1 < 2.2499999999999999e-28

    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-frac95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 77.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3.8000000000000002e83 or 2.29999999999999986e-28 < t1

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8000000000000002e83 < t1 < 2.29999999999999986e-28

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 77.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3.3000000000000001e25 or 7.0000000000000006e-30 < t1

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3000000000000001e25 < t1 < 7.0000000000000006e-30

    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-frac95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t1}}{\frac{u}{v} \cdot u} \]
      5. add-sqr-sqrt43.3%

        \[\leadsto \frac{\color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}}{\frac{u}{v} \cdot u} \]
      6. sqrt-unprod46.9%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{\frac{u}{v} \cdot u} \]
      9. add-sqr-sqrt33.6%

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

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot u}} \]
    11. Step-by-step derivation
      1. frac-2neg33.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-t1\right) \cdot \color{blue}{\frac{\frac{1}{\frac{u}{v}}}{u}} \]
      12. clear-num73.0%

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

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

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

Alternative 9: 76.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.0000000000000001e-61 or 1.06e-41 < t1

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)}}} \]
    6. Applied egg-rr99.8%

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

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

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

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

    if -2.0000000000000001e-61 < t1 < 1.06e-41

    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/81.6%

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

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

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

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

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

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

Alternative 10: 67.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -1.2 \cdot 10^{+82} \lor \neg \left(u \leq 3.2 \cdot 10^{+139}\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 -1.2e+82) (not (<= u 3.2e+139)))
   (/ t1 (* u (/ u v)))
   (/ (- v) t1)))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -1.2e+82) || !(u <= 3.2e+139)) {
		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 <= (-1.2d+82)) .or. (.not. (u <= 3.2d+139))) 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 <= -1.2e+82) || !(u <= 3.2e+139)) {
		tmp = t1 / (u * (u / v));
	} else {
		tmp = -v / t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -1.2e+82) or not (u <= 3.2e+139):
		tmp = t1 / (u * (u / v))
	else:
		tmp = -v / t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -1.2e+82) || !(u <= 3.2e+139))
		tmp = Float64(t1 / Float64(u * Float64(u / v)));
	else
		tmp = Float64(Float64(-v) / t1);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -1.2e+82) || ~((u <= 3.2e+139)))
		tmp = t1 / (u * (u / v));
	else
		tmp = -v / t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.2e+82], N[Not[LessEqual[u, 3.2e+139]], $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 -1.2 \cdot 10^{+82} \lor \neg \left(u \leq 3.2 \cdot 10^{+139}\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 < -1.19999999999999999e82 or 3.2000000000000001e139 < u

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.19999999999999999e82 < u < 3.2000000000000001e139

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 67.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;u \leq -2.15 \cdot 10^{+86} \lor \neg \left(u \leq 3.5 \cdot 10^{+161}\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 -2.15e+86) (not (<= u 3.5e+161)))
   (* (/ v u) (/ t1 u))
   (/ (- v) t1)))
double code(double u, double v, double t1) {
	double tmp;
	if ((u <= -2.15e+86) || !(u <= 3.5e+161)) {
		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 <= (-2.15d+86)) .or. (.not. (u <= 3.5d+161))) 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 <= -2.15e+86) || !(u <= 3.5e+161)) {
		tmp = (v / u) * (t1 / u);
	} else {
		tmp = -v / t1;
	}
	return tmp;
}
def code(u, v, t1):
	tmp = 0
	if (u <= -2.15e+86) or not (u <= 3.5e+161):
		tmp = (v / u) * (t1 / u)
	else:
		tmp = -v / t1
	return tmp
function code(u, v, t1)
	tmp = 0.0
	if ((u <= -2.15e+86) || !(u <= 3.5e+161))
		tmp = Float64(Float64(v / u) * Float64(t1 / u));
	else
		tmp = Float64(Float64(-v) / t1);
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	tmp = 0.0;
	if ((u <= -2.15e+86) || ~((u <= 3.5e+161)))
		tmp = (v / u) * (t1 / u);
	else
		tmp = -v / t1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.15e+86], N[Not[LessEqual[u, 3.5e+161]], $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 -2.15 \cdot 10^{+86} \lor \neg \left(u \leq 3.5 \cdot 10^{+161}\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 < -2.1500000000000001e86 or 3.49999999999999988e161 < u

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t1}}{\frac{u}{v} \cdot u} \]
      5. add-sqr-sqrt47.3%

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{t1} \cdot \sqrt{t1}}}{\frac{u}{v} \cdot u} \]
      9. add-sqr-sqrt64.6%

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

      \[\leadsto \color{blue}{\frac{t1}{\frac{u}{v} \cdot u}} \]
    11. Step-by-step derivation
      1. *-un-lft-identity64.6%

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

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

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

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

    if -2.1500000000000001e86 < u < 3.49999999999999988e161

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 23.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9 \cdot 10^{+83} \lor \neg \left(t1 \leq 1.2 \cdot 10^{+74}\right):\\
\;\;\;\;\frac{v}{t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -8.9999999999999999e83 or 1.20000000000000004e74 < t1

    1. Initial program 47.7%

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

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

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

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

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

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

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

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

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

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

    if -8.9999999999999999e83 < t1 < 1.20000000000000004e74

    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. associate-*l/83.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-v}{u}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt7.5%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-v\right) \cdot \left(-v\right)}}}{u} \]
      3. sqr-neg16.8%

        \[\leadsto \frac{\sqrt{\color{blue}{v \cdot v}}}{u} \]
      4. sqrt-unprod6.9%

        \[\leadsto \frac{\color{blue}{\sqrt{v} \cdot \sqrt{v}}}{u} \]
      5. add-sqr-sqrt14.6%

        \[\leadsto \frac{\color{blue}{v}}{u} \]
      6. div-inv14.6%

        \[\leadsto \color{blue}{v \cdot \frac{1}{u}} \]
    10. Applied egg-rr14.6%

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

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

        \[\leadsto \frac{\color{blue}{v}}{u} \]
    12. Simplified14.6%

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

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

Alternative 13: 98.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{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 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 56.3% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.0000000000000004e168 < u

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \]
    12. Simplified37.4%

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

Alternative 16: 56.2% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2999999999999997e169 < u

    1. Initial program 66.9%

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

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

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

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

      \[\leadsto v \cdot \frac{-t1}{\color{blue}{2 \cdot \left(t1 \cdot u\right) + {u}^{2}}} \]
    6. Step-by-step derivation
      1. +-commutative51.9%

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

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

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

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

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

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

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

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

Alternative 17: 56.2% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.49999999999999998e170 < u

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

Alternative 18: 56.2% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.55000000000000004e169 < u

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-v}{u}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt16.9%

        \[\leadsto \frac{\color{blue}{\sqrt{-v} \cdot \sqrt{-v}}}{u} \]
      2. sqrt-unprod36.3%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{v} \cdot \sqrt{v}}}{u} \]
      5. add-sqr-sqrt36.9%

        \[\leadsto \frac{\color{blue}{v}}{u} \]
      6. div-inv36.9%

        \[\leadsto \color{blue}{v \cdot \frac{1}{u}} \]
    10. Applied egg-rr36.9%

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

        \[\leadsto \color{blue}{\frac{v \cdot 1}{u}} \]
      2. *-rgt-identity36.9%

        \[\leadsto \frac{\color{blue}{v}}{u} \]
    12. Simplified36.9%

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

Alternative 19: 61.7% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 14.0% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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