Rosa's DopplerBench

Percentage Accurate: 72.3% → 98.0%
Time: 12.8s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 72.3% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-t1\right) \cdot \frac{\frac{v}{t1 + u}}{t1 + u}\\ \mathbf{if}\;t1 \leq -7.6 \cdot 10^{+59}:\\ \;\;\;\;\frac{v}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq -6.6 \cdot 10^{-246}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 7 \cdot 10^{-240}:\\ \;\;\;\;\frac{t1 \cdot v}{u} \cdot \frac{-1}{u - t1}\\ \mathbf{elif}\;t1 \leq 1.65 \cdot 10^{+74}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u - t1}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* (- t1) (/ (/ v (+ t1 u)) (+ t1 u)))))
   (if (<= t1 -7.6e+59)
     (/ v (- (- u) t1))
     (if (<= t1 -6.6e-246)
       t_1
       (if (<= t1 7e-240)
         (* (/ (* t1 v) u) (/ -1.0 (- u t1)))
         (if (<= t1 1.65e+74) t_1 (/ v (- u t1))))))))
double code(double u, double v, double t1) {
	double t_1 = -t1 * ((v / (t1 + u)) / (t1 + u));
	double tmp;
	if (t1 <= -7.6e+59) {
		tmp = v / (-u - t1);
	} else if (t1 <= -6.6e-246) {
		tmp = t_1;
	} else if (t1 <= 7e-240) {
		tmp = ((t1 * v) / u) * (-1.0 / (u - t1));
	} else if (t1 <= 1.65e+74) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = -t1 * ((v / (t1 + u)) / (t1 + u))
    if (t1 <= (-7.6d+59)) then
        tmp = v / (-u - t1)
    else if (t1 <= (-6.6d-246)) then
        tmp = t_1
    else if (t1 <= 7d-240) then
        tmp = ((t1 * v) / u) * ((-1.0d0) / (u - t1))
    else if (t1 <= 1.65d+74) then
        tmp = t_1
    else
        tmp = v / (u - t1)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -t1 * ((v / (t1 + u)) / (t1 + u));
	double tmp;
	if (t1 <= -7.6e+59) {
		tmp = v / (-u - t1);
	} else if (t1 <= -6.6e-246) {
		tmp = t_1;
	} else if (t1 <= 7e-240) {
		tmp = ((t1 * v) / u) * (-1.0 / (u - t1));
	} else if (t1 <= 1.65e+74) {
		tmp = t_1;
	} else {
		tmp = v / (u - t1);
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -t1 * ((v / (t1 + u)) / (t1 + u))
	tmp = 0
	if t1 <= -7.6e+59:
		tmp = v / (-u - t1)
	elif t1 <= -6.6e-246:
		tmp = t_1
	elif t1 <= 7e-240:
		tmp = ((t1 * v) / u) * (-1.0 / (u - t1))
	elif t1 <= 1.65e+74:
		tmp = t_1
	else:
		tmp = v / (u - t1)
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-t1) * Float64(Float64(v / Float64(t1 + u)) / Float64(t1 + u)))
	tmp = 0.0
	if (t1 <= -7.6e+59)
		tmp = Float64(v / Float64(Float64(-u) - t1));
	elseif (t1 <= -6.6e-246)
		tmp = t_1;
	elseif (t1 <= 7e-240)
		tmp = Float64(Float64(Float64(t1 * v) / u) * Float64(-1.0 / Float64(u - t1)));
	elseif (t1 <= 1.65e+74)
		tmp = t_1;
	else
		tmp = Float64(v / Float64(u - t1));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -t1 * ((v / (t1 + u)) / (t1 + u));
	tmp = 0.0;
	if (t1 <= -7.6e+59)
		tmp = v / (-u - t1);
	elseif (t1 <= -6.6e-246)
		tmp = t_1;
	elseif (t1 <= 7e-240)
		tmp = ((t1 * v) / u) * (-1.0 / (u - t1));
	elseif (t1 <= 1.65e+74)
		tmp = t_1;
	else
		tmp = v / (u - t1);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-t1) * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -7.6e+59], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -6.6e-246], t$95$1, If[LessEqual[t1, 7e-240], N[(N[(N[(t1 * v), $MachinePrecision] / u), $MachinePrecision] * N[(-1.0 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.65e+74], t$95$1, N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -6.6 \cdot 10^{-246}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t1 \leq 7 \cdot 10^{-240}:\\
\;\;\;\;\frac{t1 \cdot v}{u} \cdot \frac{-1}{u - t1}\\

\mathbf{elif}\;t1 \leq 1.65 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -7.6000000000000002e59

    1. Initial program 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6000000000000002e59 < t1 < -6.6000000000000002e-246 or 7.00000000000000032e-240 < t1 < 1.6500000000000001e74

    1. Initial program 86.7%

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

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

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

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

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

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

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

    if -6.6000000000000002e-246 < t1 < 7.00000000000000032e-240

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{-u} \cdot \sqrt{-u}} - t1}{t1}} \cdot \frac{1}{t1 + u} \]
      13. sqrt-unprod48.2%

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

        \[\leadsto \frac{v}{\frac{\sqrt{\color{blue}{u \cdot u}} - t1}{t1}} \cdot \frac{1}{t1 + u} \]
      15. sqrt-unprod11.9%

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

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

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

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

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

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

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

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

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

    if 1.6500000000000001e74 < t1

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1}}{u - t1}} \]
      4. associate-/l/54.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot v}{u - t1}} \]
      10. metadata-eval92.1%

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

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

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

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

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

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

        \[\leadsto \frac{v \cdot \color{blue}{1}}{u - t1} \]
      17. *-rgt-identity92.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -7.6 \cdot 10^{+59}:\\ \;\;\;\;\frac{v}{\left(-u\right) - t1}\\ \mathbf{elif}\;t1 \leq -6.6 \cdot 10^{-246}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{t1 + u}}{t1 + u}\\ \mathbf{elif}\;t1 \leq 7 \cdot 10^{-240}:\\ \;\;\;\;\frac{t1 \cdot v}{u} \cdot \frac{-1}{u - t1}\\ \mathbf{elif}\;t1 \leq 1.65 \cdot 10^{+74}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{t1 + u}}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{v}{u - t1}\\ \mathbf{if}\;t1 \leq -7.2 \cdot 10^{+116}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq -4.4 \cdot 10^{-246}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;t1 \leq 4.2 \cdot 10^{-239}:\\ \;\;\;\;\frac{t1 \cdot v}{u} \cdot \frac{-1}{u - t1}\\ \mathbf{elif}\;t1 \leq 1.65 \cdot 10^{+74}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{t1 + u}}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ v (- u t1))))
   (if (<= t1 -7.2e+116)
     t_1
     (if (<= t1 -4.4e-246)
       (* (- v) (/ t1 (* (+ t1 u) (+ t1 u))))
       (if (<= t1 4.2e-239)
         (* (/ (* t1 v) u) (/ -1.0 (- u t1)))
         (if (<= t1 1.65e+74) (* (- t1) (/ (/ v (+ t1 u)) (+ t1 u))) t_1))))))
double code(double u, double v, double t1) {
	double t_1 = v / (u - t1);
	double tmp;
	if (t1 <= -7.2e+116) {
		tmp = t_1;
	} else if (t1 <= -4.4e-246) {
		tmp = -v * (t1 / ((t1 + u) * (t1 + u)));
	} else if (t1 <= 4.2e-239) {
		tmp = ((t1 * v) / u) * (-1.0 / (u - t1));
	} else if (t1 <= 1.65e+74) {
		tmp = -t1 * ((v / (t1 + u)) / (t1 + u));
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = v / (u - t1)
    if (t1 <= (-7.2d+116)) then
        tmp = t_1
    else if (t1 <= (-4.4d-246)) then
        tmp = -v * (t1 / ((t1 + u) * (t1 + u)))
    else if (t1 <= 4.2d-239) then
        tmp = ((t1 * v) / u) * ((-1.0d0) / (u - t1))
    else if (t1 <= 1.65d+74) then
        tmp = -t1 * ((v / (t1 + u)) / (t1 + u))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = v / (u - t1);
	double tmp;
	if (t1 <= -7.2e+116) {
		tmp = t_1;
	} else if (t1 <= -4.4e-246) {
		tmp = -v * (t1 / ((t1 + u) * (t1 + u)));
	} else if (t1 <= 4.2e-239) {
		tmp = ((t1 * v) / u) * (-1.0 / (u - t1));
	} else if (t1 <= 1.65e+74) {
		tmp = -t1 * ((v / (t1 + u)) / (t1 + u));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = v / (u - t1)
	tmp = 0
	if t1 <= -7.2e+116:
		tmp = t_1
	elif t1 <= -4.4e-246:
		tmp = -v * (t1 / ((t1 + u) * (t1 + u)))
	elif t1 <= 4.2e-239:
		tmp = ((t1 * v) / u) * (-1.0 / (u - t1))
	elif t1 <= 1.65e+74:
		tmp = -t1 * ((v / (t1 + u)) / (t1 + u))
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(v / Float64(u - t1))
	tmp = 0.0
	if (t1 <= -7.2e+116)
		tmp = t_1;
	elseif (t1 <= -4.4e-246)
		tmp = Float64(Float64(-v) * Float64(t1 / Float64(Float64(t1 + u) * Float64(t1 + u))));
	elseif (t1 <= 4.2e-239)
		tmp = Float64(Float64(Float64(t1 * v) / u) * Float64(-1.0 / Float64(u - t1)));
	elseif (t1 <= 1.65e+74)
		tmp = Float64(Float64(-t1) * Float64(Float64(v / Float64(t1 + u)) / Float64(t1 + u)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = v / (u - t1);
	tmp = 0.0;
	if (t1 <= -7.2e+116)
		tmp = t_1;
	elseif (t1 <= -4.4e-246)
		tmp = -v * (t1 / ((t1 + u) * (t1 + u)));
	elseif (t1 <= 4.2e-239)
		tmp = ((t1 * v) / u) * (-1.0 / (u - t1));
	elseif (t1 <= 1.65e+74)
		tmp = -t1 * ((v / (t1 + u)) / (t1 + u));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -7.2e+116], t$95$1, If[LessEqual[t1, -4.4e-246], N[((-v) * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.2e-239], N[(N[(N[(t1 * v), $MachinePrecision] / u), $MachinePrecision] * N[(-1.0 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.65e+74], N[((-t1) * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{v}{u - t1}\\
\mathbf{if}\;t1 \leq -7.2 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t1 \leq 4.2 \cdot 10^{-239}:\\
\;\;\;\;\frac{t1 \cdot v}{u} \cdot \frac{-1}{u - t1}\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -7.19999999999999941e116 or 1.6500000000000001e74 < t1

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1}}{u - t1}} \]
      4. associate-/l/46.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot v}{u - t1}} \]
      10. metadata-eval94.2%

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

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

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

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

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

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

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

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

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

    if -7.19999999999999941e116 < t1 < -4.39999999999999996e-246

    1. Initial program 89.3%

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

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

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

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

    if -4.39999999999999996e-246 < t1 < 4.2000000000000004e-239

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{v}{\frac{\color{blue}{\sqrt{-u} \cdot \sqrt{-u}} - t1}{t1}} \cdot \frac{1}{t1 + u} \]
      13. sqrt-unprod48.2%

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

        \[\leadsto \frac{v}{\frac{\sqrt{\color{blue}{u \cdot u}} - t1}{t1}} \cdot \frac{1}{t1 + u} \]
      15. sqrt-unprod11.9%

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

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

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

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

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

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

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

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

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

    if 4.2000000000000004e-239 < t1 < 1.6500000000000001e74

    1. Initial program 83.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -7.2 \cdot 10^{+116}:\\ \;\;\;\;\frac{v}{u - t1}\\ \mathbf{elif}\;t1 \leq -4.4 \cdot 10^{-246}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;t1 \leq 4.2 \cdot 10^{-239}:\\ \;\;\;\;\frac{t1 \cdot v}{u} \cdot \frac{-1}{u - t1}\\ \mathbf{elif}\;t1 \leq 1.65 \cdot 10^{+74}:\\ \;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{t1 + u}}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u - t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -5.2e-51

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\frac{1}{\frac{t1 + u}{v}}} \]
      2. inv-pow88.8%

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

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

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

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

    if -5.2e-51 < t1 < 6.00000000000000048e-76

    1. Initial program 80.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.0%

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

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

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

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

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

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

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

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

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

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

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

    if 6.00000000000000048e-76 < t1

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num83.3%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -1.2000000000000001e-52

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\frac{1}{\frac{t1 + u}{v}}} \]
      2. inv-pow88.8%

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

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

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

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

    if -1.2000000000000001e-52 < t1 < 1.2e16

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

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

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

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

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

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

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

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

    if 1.2e16 < t1

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num90.3%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 78.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -5.00000000000000004e-51

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\frac{1}{\frac{t1 + u}{v}}} \]
      2. inv-pow88.8%

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

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

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

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

    if -5.00000000000000004e-51 < t1 < 1.15e16

    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. times-frac94.4%

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

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

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

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

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

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

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

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

    if 1.15e16 < t1

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num90.3%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 78.4% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -3.10000000000000015e-53

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\frac{1}{\frac{t1 + u}{v}}} \]
      2. inv-pow88.8%

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

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

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

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

    if -3.10000000000000015e-53 < t1 < 1.15e16

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e16 < t1

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num90.3%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 68.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.99999999999999989e119 or 3.9999999999999998e87 < u

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999989e119 < u < 3.9999999999999998e87

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 58.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -5.5000000000000003e171 or 1.6e181 < u

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num70.8%

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000003e171 < u < 1.6e181

    1. Initial program 68.5%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Step-by-step derivation
      1. associate-/l*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*79.2%

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

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

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

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

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

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

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

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

Alternative 10: 58.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.8 \cdot 10^{+174} \lor \neg \left(u \leq 1.16 \cdot 10^{+154}\right):\\
\;\;\;\;\frac{v}{-u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -7.79999999999999962e174 or 1.16000000000000001e154 < u

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.79999999999999962e174 < u < 1.16000000000000001e154

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 23.2% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.6500000000000001e57 or 7.6000000000000001e114 < t1

    1. Initial program 51.4%

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

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

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

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

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

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

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

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

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

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

    if -1.6500000000000001e57 < t1 < 7.6000000000000001e114

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t1}{\left(-u\right) - t1} \cdot \color{blue}{\frac{v}{t1}} \]
    6. Step-by-step derivation
      1. clear-num52.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.9% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.70000000000000009e90 < u

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 62.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.99999999999999968e217 < u

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{t1}{u}}{t1} \cdot v} \]
    12. Simplified78.3%

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

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

Alternative 14: 62.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.70000000000000009e90 < u

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 97.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 69.0% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 71.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{\frac{v}{\frac{u - t1}{t1}}}{t1} \end{array} \]
(FPCore (u v t1) :precision binary64 (/ (/ v (/ (- u t1) t1)) t1))
double code(double u, double v, double t1) {
	return (v / ((u - t1) / t1)) / 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) / t1)) / t1
end function
public static double code(double u, double v, double t1) {
	return (v / ((u - t1) / t1)) / t1;
}
def code(u, v, t1):
	return (v / ((u - t1) / t1)) / t1
function code(u, v, t1)
	return Float64(Float64(v / Float64(Float64(u - t1) / t1)) / t1)
end
function tmp = code(u, v, t1)
	tmp = (v / ((u - t1) / t1)) / t1;
end
code[u_, v_, t1_] := N[(N[(v / N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{v}{\frac{\color{blue}{u} - t1}{t1}}}{t1} \]
  7. Applied egg-rr73.4%

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

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

Alternative 18: 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 70.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 61.6% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t1 \cdot \frac{\frac{v}{t1}}{u - t1}} \]
    4. associate-/l/44.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1 \cdot v}{u - t1}} \]
    10. metadata-eval64.9%

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

      \[\leadsto \frac{\color{blue}{-1 \cdot \left(-1 \cdot v\right)}}{u - t1} \]
    12. *-commutative64.9%

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

      \[\leadsto \frac{\color{blue}{\left(-1 \cdot v\right) \cdot -1}}{u - t1} \]
    14. *-commutative64.9%

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

      \[\leadsto \frac{\color{blue}{v \cdot \left(-1 \cdot -1\right)}}{u - t1} \]
    16. metadata-eval64.9%

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

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

    \[\leadsto \color{blue}{\frac{v}{u - t1}} \]
  10. Final simplification64.9%

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

Alternative 20: 14.3% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{v}{t1}} \]
  7. Final simplification14.7%

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

Reproduce

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