Rosa's DopplerBench

Percentage Accurate: 72.8% → 98.1%
Time: 18.4s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 72.8% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -8.8 \cdot 10^{+83}:\\
\;\;\;\;\frac{u \cdot \frac{v}{t1} - v}{t1 + u}\\

\mathbf{elif}\;t1 \leq 5.2 \cdot 10^{+163}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{\left(-u\right) - t1}\\

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


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

    1. Initial program 55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.79999999999999995e83 < t1 < 5.2000000000000003e163

    1. Initial program 82.7%

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

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

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

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

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

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

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

    if 5.2000000000000003e163 < t1

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.7% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e-30 < t1 < 4.6e-96

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{0 - \left(\left(-u\right) - \color{blue}{\left(-t1\right)}\right)} \]
      11. add-sqr-sqrt36.1%

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

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

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

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

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{0 - \left(\color{blue}{u} - \left(-t1\right)\right)} \]
      16. associate-+l-39.9%

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{\color{blue}{\left(0 - u\right) + \left(-t1\right)}} \]
      17. neg-sub039.9%

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

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

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

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

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

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

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{u + \color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \]
      24. sqrt-unprod81.9%

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

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

      \[\leadsto \color{blue}{\frac{-\frac{t1}{\frac{u}{v}}}{t1 + u}} \]
    8. Step-by-step derivation
      1. distribute-neg-frac81.9%

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

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

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

    if 4.6e-96 < t1

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{u}{t1} - 1}{\frac{t1 + u}{v}}} \]
      3. sub-neg82.3%

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

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

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

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

Alternative 4: 79.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4e-30 < t1 < 2.49999999999999997e-96

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{0 - \left(\left(-u\right) - \color{blue}{\left(-t1\right)}\right)} \]
      11. add-sqr-sqrt36.1%

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

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

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

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

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{0 - \left(\color{blue}{u} - \left(-t1\right)\right)} \]
      16. associate-+l-39.9%

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{\color{blue}{\left(0 - u\right) + \left(-t1\right)}} \]
      17. neg-sub039.9%

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

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

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

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

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

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

        \[\leadsto \frac{-\frac{t1}{\frac{u}{v}}}{u + \color{blue}{\sqrt{-t1} \cdot \sqrt{-t1}}} \]
      24. sqrt-unprod81.9%

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

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

      \[\leadsto \color{blue}{\frac{-\frac{t1}{\frac{u}{v}}}{t1 + u}} \]
    8. Step-by-step derivation
      1. distribute-neg-frac81.9%

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

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

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

    if 2.49999999999999997e-96 < t1

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt34.0%

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

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

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

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

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

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

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

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

Alternative 5: 78.8% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.99999999999999962e-31 < t1 < 4.6e-96

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.6e-96 < t1

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt34.0%

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

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

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

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

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

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

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

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

Alternative 6: 76.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.000000000000001e-30 < t1 < 8.50000000000000003e-94

    1. Initial program 82.5%

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

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

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

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

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

    if 8.50000000000000003e-94 < t1

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt34.0%

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

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

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

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

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

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

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

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

Alternative 7: 68.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{+54} \lor \neg \left(u \leq 2.35 \cdot 10^{+67}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.14999999999999997e54 or 2.35000000000000009e67 < u

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.14999999999999997e54 < u < 2.35000000000000009e67

    1. Initial program 72.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.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 57.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.3 \cdot 10^{+148} \lor \neg \left(u \leq 3.2 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.3000000000000001e148 or 3.20000000000000023e71 < u

    1. Initial program 77.3%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t1 around 0 65.4%

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

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

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

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

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

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

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

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

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

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

    if -2.3000000000000001e148 < u < 3.20000000000000023e71

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 56.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{v}}{u} \]
      6. clear-num39.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \]
      7. inv-pow39.4%

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

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

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

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

    if -2.1999999999999999e54 < u < 3.20000000000000023e71

    1. Initial program 72.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.4%

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

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

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

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

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

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

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

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

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

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

    if 3.20000000000000023e71 < u

    1. Initial program 76.1%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t1 around 0 67.5%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{v}{u}} \]
    7. Step-by-step derivation
      1. *-commutative36.6%

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

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

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

Alternative 10: 57.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.4 \cdot 10^{+148} \lor \neg \left(u \leq 1.85 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{-v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -9.3999999999999994e148 or 1.85e71 < u

    1. Initial program 77.3%

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

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

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

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

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

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

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

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

    if -9.3999999999999994e148 < u < 1.85e71

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 57.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.9 \cdot 10^{+150} \lor \neg \left(u \leq 4.5 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.89999999999999995e150 or 4.49999999999999999e62 < u

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999995e150 < u < 4.49999999999999999e62

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 23.5% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.6e114 or 1.25e100 < t1

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-v}{t1}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity85.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{v}{t1} \cdot 1} \]
    10. Step-by-step derivation
      1. *-rgt-identity36.4%

        \[\leadsto \color{blue}{\frac{v}{t1}} \]
    11. Simplified36.4%

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

    if -2.6e114 < t1 < 1.25e100

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 98.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 61.8% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.40000000000000001e74 < v

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 61.3% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{-v}}{t1 + u} \]
  10. Step-by-step derivation
    1. add-sqr-sqrt27.5%

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

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

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

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

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

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

    \[\leadsto \frac{-v}{\color{blue}{t1 - u}} \]
  12. Final simplification60.7%

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

Alternative 17: 14.0% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{-v}{t1}} \]
  8. Step-by-step derivation
    1. *-un-lft-identity52.6%

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

      \[\leadsto \color{blue}{\frac{-v}{t1} \cdot 1} \]
    3. add-sqr-sqrt22.6%

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

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

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

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

      \[\leadsto \frac{\color{blue}{v}}{t1} \cdot 1 \]
  9. Applied egg-rr13.3%

    \[\leadsto \color{blue}{\frac{v}{t1} \cdot 1} \]
  10. Step-by-step derivation
    1. *-rgt-identity13.3%

      \[\leadsto \color{blue}{\frac{v}{t1}} \]
  11. Simplified13.3%

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

Reproduce

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