Rosa's DopplerBench

Percentage Accurate: 72.7% → 97.7%
Time: 11.7s
Alternatives: 19
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 19 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.7% 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: 97.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.5% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.74999999999999986e81 < t1 < 5.0000000000000002e191

    1. Initial program 80.7%

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

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

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

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

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

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

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

    if 5.0000000000000002e191 < t1

    1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 75.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.3 \cdot 10^{-111} \lor \neg \left(t1 \leq 9.5 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.29999999999999991e-111 or 9.5000000000000002e-104 < t1

    1. Initial program 69.3%

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

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

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

        \[\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. Step-by-step derivation
      1. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999991e-111 < t1 < 9.5000000000000002e-104

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 76.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.8 \cdot 10^{-108} \lor \neg \left(t1 \leq 8.5 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -6.80000000000000004e-108 or 8.50000000000000007e-104 < t1

    1. Initial program 69.3%

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

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

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

        \[\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. Step-by-step derivation
      1. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000004e-108 < t1 < 8.50000000000000007e-104

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

Alternative 5: 77.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.5 \cdot 10^{-110} \lor \neg \left(t1 \leq 1.15 \cdot 10^{-101}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -9.50000000000000004e-110 or 1.15e-101 < t1

    1. Initial program 69.3%

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

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

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

        \[\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. Step-by-step derivation
      1. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000004e-110 < t1 < 1.15e-101

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.8e-110 or 2.0000000000000001e-101 < t1

    1. Initial program 69.3%

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

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

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

        \[\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. Step-by-step derivation
      1. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8e-110 < t1 < 2.0000000000000001e-101

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{\frac{t1}{\frac{t1 + u}{v}}}}{t1 + u} \]
    8. Applied egg-rr96.4%

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

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

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

Alternative 7: 66.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.82 \cdot 10^{-177} \lor \neg \left(t1 \leq 1.45 \cdot 10^{-147}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.81999999999999993e-177 or 1.4500000000000001e-147 < t1

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.81999999999999993e-177 < t1 < 1.4500000000000001e-147

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 66.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.8 \cdot 10^{-178} \lor \neg \left(t1 \leq 2.8 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -5.7999999999999995e-178 or 2.8e-104 < t1

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999995e-178 < t1 < 2.8e-104

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.6 \cdot 10^{-177} \lor \neg \left(t1 \leq 7.5 \cdot 10^{-147}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.6000000000000001e-177 or 7.50000000000000047e-147 < t1

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e-177 < t1 < 7.50000000000000047e-147

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 66.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8.1 \cdot 10^{-178} \lor \neg \left(t1 \leq 1.45 \cdot 10^{-148}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -8.0999999999999997e-178 or 1.4499999999999999e-148 < t1

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0999999999999997e-178 < t1 < 1.4499999999999999e-148

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.95 \cdot 10^{-178} \lor \neg \left(t1 \leq 2.1 \cdot 10^{-152}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.95000000000000013e-178 or 2.09999999999999999e-152 < t1

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95000000000000013e-178 < t1 < 2.09999999999999999e-152

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 57.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+54} \lor \neg \left(u \leq 2.5 \cdot 10^{+142}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.09999999999999986e54 or 2.5000000000000001e142 < u

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{1}}{\frac{u}{v}} \]
    12. Simplified47.3%

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

    if -2.09999999999999986e54 < u < 2.5000000000000001e142

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 57.9% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.09999999999999986e54 < u < 4.19999999999999975e143

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

    if 4.19999999999999975e143 < u

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t1 \cdot \color{blue}{\frac{1}{\frac{-u}{\frac{v}{t1}}}} \]
      10. un-div-inv50.9%

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

        \[\leadsto -\frac{t1}{\color{blue}{\frac{-u}{v} \cdot t1}} \]
      12. add-sqr-sqrt0.0%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{t1}{t1}}{\frac{u}{v}}} \]
      3. *-inverses48.0%

        \[\leadsto -\frac{\color{blue}{1}}{\frac{u}{v}} \]
    12. Simplified48.0%

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

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

Alternative 14: 57.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+54} \lor \neg \left(u \leq 2.5 \cdot 10^{+175}\right):\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.09999999999999986e54 or 2.5e175 < u

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.09999999999999986e54 < u < 2.5e175

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 57.5% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000002e54 < u < 2.5999999999999999e174

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

    if 2.5999999999999999e174 < u

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 23.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.6 \cdot 10^{+50} \lor \neg \left(t1 \leq 3.9 \cdot 10^{+52}\right):\\
\;\;\;\;\frac{v}{t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -3.59999999999999986e50 or 3.9e52 < t1

    1. Initial program 56.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 92.4%

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

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

    if -3.59999999999999986e50 < t1 < 3.9e52

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 98.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 61.6% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 14.2% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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