Rosa's DopplerBench

Percentage Accurate: 72.7% → 98.1%
Time: 9.4s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 72.7% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -1.32 \cdot 10^{+104}:\\
\;\;\;\;t\_1 \cdot \left(\frac{u}{t1} + -1\right)\\

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

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


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

    1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

    if -1.32000000000000003e104 < t1 < 1.05e107

    1. Initial program 81.9%

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

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

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

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

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

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

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

    if 1.05e107 < t1

    1. Initial program 51.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 76.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;t1 \leq -4.2 \cdot 10^{-96} \lor \neg \left(t1 \leq 200\right):\\
\;\;\;\;\frac{v}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -4.20000000000000002e-96 or 200 < t1

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000002e-96 < t1 < 200

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 75.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9499999999999999e-97 < t1 < 7.2000000000000002e42

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2000000000000002e42 < t1

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 75.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55999999999999991e-99 < t1 < 2.20000000000000001e43

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000001e43 < t1

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 68.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.8 \cdot 10^{+57} \lor \neg \left(u \leq 2.2 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.8e57 or 2.2e107 < u

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8e57 < u < 2.2e107

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.90000000000000001e54 or 2.15e107 < u

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot t1}{t1 + u}} \cdot \frac{v}{u} \]
      4. *-lft-identity68.7%

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

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

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

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

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

    if -4.90000000000000001e54 < u < 2.15e107

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 57.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{+128} \lor \neg \left(u \leq 4.7 \cdot 10^{+132}\right):\\
\;\;\;\;\frac{v}{-u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -3.3999999999999999e128 or 4.7e132 < u

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3999999999999999e128 < u < 4.7e132

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 57.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -9 \cdot 10^{+133} \lor \neg \left(u \leq 6 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -8.9999999999999997e133 or 6.00000000000000013e133 < u

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.9999999999999997e133 < u < 6.00000000000000013e133

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 23.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.5 \cdot 10^{+101} \lor \neg \left(t1 \leq 1.85 \cdot 10^{+67}\right):\\
\;\;\;\;\frac{v}{t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -6.50000000000000016e101 or 1.8499999999999999e67 < t1

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

    if -6.50000000000000016e101 < t1 < 1.8499999999999999e67

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 60.9% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 14.1% accurate, 4.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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