Rosa's DopplerBench

Percentage Accurate: 73.0% → 98.1%
Time: 18.1s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 73.0% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.5% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.6500000000000001e142 or 7.59999999999999958e102 < t1

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6500000000000001e142 < t1 < 7.59999999999999958e102

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

Alternative 3: 79.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -4.9e6 or 3.19999999999999975e-64 < t1

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9e6 < t1 < 3.19999999999999975e-64

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 79.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -370000 \lor \neg \left(t1 \leq 4 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\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.7e5 or 3.99999999999999986e-64 < t1

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7e5 < t1 < 3.99999999999999986e-64

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 78.8% accurate, 0.7× speedup?

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

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8e6 < t1 < 6.5e-65

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -7.99999999999999962e-44 or 1.32e-65 < t1

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999962e-44 < t1 < 1.32e-65

    1. Initial program 79.0%

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

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

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

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

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

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

Alternative 7: 66.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1 \cdot 10^{+35} \lor \neg \left(u \leq 1.25 \cdot 10^{+78}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -9.9999999999999997e34 or 1.24999999999999996e78 < u

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999997e34 < u < 1.24999999999999996e78

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 66.4% accurate, 0.7× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999989e34 < u < 3.3999999999999998e84

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3999999999999998e84 < u

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-t1}{\frac{u}{v}}}}{u} \]
      5. add-sqr-sqrt48.4%

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{t1}}{\frac{u}{v}}}{u} \]
    10. Applied egg-rr75.9%

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

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

Alternative 9: 57.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+184} \lor \neg \left(u \leq 3.5 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -3.19999999999999983e184 or 3.5e103 < u

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999983e184 < u < 3.5e103

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 57.8% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{v}{u}} \]
    11. Step-by-step derivation
      1. *-commutative56.8%

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

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

    if -7.49999999999999955e185 < u < 5.70000000000000033e103

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

    if 5.70000000000000033e103 < u

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{v}}{u} \]
    12. Simplified42.7%

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

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

Alternative 11: 57.8% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

    if -8.50000000000000043e184 < u < 5.99999999999999971e100

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

    if 5.99999999999999971e100 < u

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{v}}{u} \]
    12. Simplified42.7%

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

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

Alternative 12: 23.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.8 \cdot 10^{+158} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{v}{t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.80000000000000001e158 or 4.2000000000000003e103 < t1

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{v}}{t1} \]
    11. Simplified47.2%

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

    if -2.80000000000000001e158 < t1 < 4.2000000000000003e103

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{v}}{u} \]
    12. Simplified18.2%

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

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

Alternative 13: 98.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 61.5% 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 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 14.5% 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 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{v}}{t1} \]
  11. Simplified16.0%

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

Reproduce

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