Rosa's DopplerBench

Percentage Accurate: 72.2% → 97.8%
Time: 9.8s
Alternatives: 9
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 9 alternatives:

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

Initial Program: 72.2% 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.8% accurate, 1.0× speedup?

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

\\
\frac{t1}{\left(-t1\right) - u} \cdot \frac{v}{t1 + u}
\end{array}
Derivation
  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-frac98.9%

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

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

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

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

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

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

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

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

Alternative 2: 90.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t1 \leq -1.7 \cdot 10^{-175}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t1 \leq 9.2 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -2.00000000000000003e122 or 9.20000000000000051e125 < t1

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000003e122 < t1 < -1.7e-175 or 2.8999999999999999e-260 < t1 < 9.20000000000000051e125

    1. Initial program 83.8%

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

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

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

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

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

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

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

    if -1.7e-175 < t1 < 2.8999999999999999e-260

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2 \cdot 10^{+122}:\\ \;\;\;\;\frac{v}{-t1}\\ \mathbf{elif}\;t1 \leq -1.7 \cdot 10^{-175}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{\left(-t1\right) - u}}{t1 + u}\\ \mathbf{elif}\;t1 \leq 2.9 \cdot 10^{-260}:\\ \;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\ \mathbf{elif}\;t1 \leq 9.2 \cdot 10^{+125}:\\ \;\;\;\;t1 \cdot \frac{\frac{v}{\left(-t1\right) - u}}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{-t1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 78.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.4 \cdot 10^{-22} \lor \neg \left(t1 \leq 2.5 \cdot 10^{-119}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -6.39999999999999975e-22 or 2.49999999999999996e-119 < t1

    1. Initial program 71.3%

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

    if -6.39999999999999975e-22 < t1 < 2.49999999999999996e-119

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 78.8% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 75.3%

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

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

    if -7.79999999999999944e-27 < t1 < 7.99999999999999983e-113

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.99999999999999983e-113 < t1

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

Alternative 5: 67.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.49999999999999996e76 or 3.7999999999999999e119 < u

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{t1}{u}}}{\frac{u}{v}} \]
    11. Step-by-step derivation
      1. div-inv62.6%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t1}}{\frac{u}{v} \cdot u} \]
    14. Simplified62.7%

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

    if -2.49999999999999996e76 < u < 3.7999999999999999e119

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 57.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.8 \cdot 10^{+69} \lor \neg \left(u \leq 1.8 \cdot 10^{+129}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.8000000000000003e69 or 1.8000000000000001e129 < u

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8000000000000003e69 < u < 1.8000000000000001e129

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 56.5% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

    if 2.14999999999999997e133 < u

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 61.4% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 16.9% accurate, 4.0× speedup?

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

\\
\frac{v}{u}
\end{array}
Derivation
  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. associate-/l*77.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{v}{u}} \]
  11. Final simplification16.3%

    \[\leadsto \frac{v}{u} \]
  12. Add Preprocessing

Reproduce

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