Rosa's DopplerBench

Percentage Accurate: 73.8% → 97.7%
Time: 11.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: 73.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: 97.7% accurate, 0.9× speedup?

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

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

    \[\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*86.2%

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

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

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

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

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

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

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

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

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

Alternative 2: 90.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{+52}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\

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


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

    1. Initial program 41.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.40000000000000047e122 < t1 < 4.6e52

    1. Initial program 87.4%

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

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

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

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

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

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

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

    if 4.6e52 < t1

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.9:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\

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

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


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

    1. Initial program 63.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 88.4%

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

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

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

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

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

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

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

    if -1.8999999999999999 < t1 < 1.25e-31

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{-t1 \cdot v}}{u}}{t1 + u} \]
      3. distribute-rgt-neg-in79.9%

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

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

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

    if 1.25e-31 < t1

    1. Initial program 67.7%

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

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

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

Alternative 4: 77.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 63.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 88.4%

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

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

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

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

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

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

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

    if -9.99999999999999999e-15 < t1 < 2.9999999999999999e-81

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9999999999999999e-81 < t1

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{t1}{t1} \cdot \frac{u - t1}{v}}} \]
      6. *-inverses80.5%

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

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

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

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

Alternative 5: 63.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9 \cdot 10^{-149} \lor \neg \left(t1 \leq 1.5 \cdot 10^{-168}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -8.9999999999999996e-149 or 1.49999999999999996e-168 < t1

    1. Initial program 70.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 75.9%

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

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

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

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

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

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

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

    if -8.9999999999999996e-149 < t1 < 1.49999999999999996e-168

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 56.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e115 < u < 5.00000000000000029e62

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000029e62 < u

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{v}{u}} \]
    11. Step-by-step derivation
      1. clear-num30.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \]
      2. inv-pow30.0%

        \[\leadsto \color{blue}{{\left(\frac{u}{v}\right)}^{-1}} \]
    12. Applied egg-rr30.0%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{u}{v}}} \]
    14. Simplified30.0%

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

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

Alternative 7: 57.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.1 \cdot 10^{+114} \lor \neg \left(u \leq 6.8 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.1000000000000001e114 or 6.7999999999999995e86 < u

    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. times-frac95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{t1}{t1} \cdot \frac{u - t1}{v}}} \]
      6. *-inverses40.7%

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

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

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

    if -4.1000000000000001e114 < u < 6.7999999999999995e86

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 56.9% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1000000000000001e109 < u < 1.8799999999999999e84

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

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

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

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

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

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

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

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

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

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

    if 1.8799999999999999e84 < u

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 24.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.8000000000000001e98 or 3.09999999999999986e118 < t1

    1. Initial program 45.4%

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

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

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

    if -2.8000000000000001e98 < t1 < 3.09999999999999986e118

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 97.9% 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 75.0%

    \[\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*86.2%

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

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

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

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

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

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

Alternative 11: 97.7% accurate, 0.9× speedup?

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

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

    \[\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*86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 60.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999996e86 < u

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 98.0% accurate, 1.0× speedup?

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

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

    \[\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*86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{v \cdot \frac{t1}{t1 + u}}{\left(-u\right) - t1} \]
  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 75.0%

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

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

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

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

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

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

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

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

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

Alternative 15: 60.7% 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 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 60.9% 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 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{t1}{t1} \cdot \frac{u - t1}{v}}} \]
    6. *-inverses57.4%

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

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

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

Alternative 17: 14.8% 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 75.0%

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

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

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

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

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

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

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

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

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

Reproduce

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