Rosa's DopplerBench

Percentage Accurate: 72.6% → 97.9%
Time: 9.6s
Alternatives: 20
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 20 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.6% 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.9% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t1 \leq -4.9 \cdot 10^{-144}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t1 \leq 2.4 \cdot 10^{+144}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -3.0000000000000001e98 or 2.4000000000000001e144 < t1

    1. Initial program 45.6%

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

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

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

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

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

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

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

    if -3.0000000000000001e98 < t1 < -4.9000000000000001e-144 or 6.00000000000000061e-185 < t1 < 2.4000000000000001e144

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

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

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

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

    if -4.9000000000000001e-144 < t1 < 6.00000000000000061e-185

    1. Initial program 85.6%

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

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

        \[\leadsto \frac{\color{blue}{\frac{-t1}{\frac{t1 + u}{v}}}}{t1 + u} \]
    3. Simplified93.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -3 \cdot 10^{+98}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -4.9 \cdot 10^{-144}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;t1 \leq 6 \cdot 10^{-185}:\\ \;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\ \mathbf{elif}\;t1 \leq 2.4 \cdot 10^{+144}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]

Alternative 3: 90.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t1 + u\right) \cdot \left(t1 + u\right)\\ t_2 := \frac{-v}{t1 + u}\\ \mathbf{if}\;t1 \leq -1.85 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t1 \leq -4.2 \cdot 10^{-204}:\\ \;\;\;\;\frac{t1 \cdot \left(-v\right)}{t_1}\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-189}:\\ \;\;\;\;\frac{-v}{\frac{u}{\frac{t1}{u}}}\\ \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{+142}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (* (+ t1 u) (+ t1 u))) (t_2 (/ (- v) (+ t1 u))))
   (if (<= t1 -1.85e+96)
     t_2
     (if (<= t1 -4.2e-204)
       (/ (* t1 (- v)) t_1)
       (if (<= t1 1.1e-189)
         (/ (- v) (/ u (/ t1 u)))
         (if (<= t1 2.5e+142) (* (- v) (/ t1 t_1)) t_2))))))
double code(double u, double v, double t1) {
	double t_1 = (t1 + u) * (t1 + u);
	double t_2 = -v / (t1 + u);
	double tmp;
	if (t1 <= -1.85e+96) {
		tmp = t_2;
	} else if (t1 <= -4.2e-204) {
		tmp = (t1 * -v) / t_1;
	} else if (t1 <= 1.1e-189) {
		tmp = -v / (u / (t1 / u));
	} else if (t1 <= 2.5e+142) {
		tmp = -v * (t1 / t_1);
	} else {
		tmp = t_2;
	}
	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 = (t1 + u) * (t1 + u)
    t_2 = -v / (t1 + u)
    if (t1 <= (-1.85d+96)) then
        tmp = t_2
    else if (t1 <= (-4.2d-204)) then
        tmp = (t1 * -v) / t_1
    else if (t1 <= 1.1d-189) then
        tmp = -v / (u / (t1 / u))
    else if (t1 <= 2.5d+142) then
        tmp = -v * (t1 / t_1)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = (t1 + u) * (t1 + u);
	double t_2 = -v / (t1 + u);
	double tmp;
	if (t1 <= -1.85e+96) {
		tmp = t_2;
	} else if (t1 <= -4.2e-204) {
		tmp = (t1 * -v) / t_1;
	} else if (t1 <= 1.1e-189) {
		tmp = -v / (u / (t1 / u));
	} else if (t1 <= 2.5e+142) {
		tmp = -v * (t1 / t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = (t1 + u) * (t1 + u)
	t_2 = -v / (t1 + u)
	tmp = 0
	if t1 <= -1.85e+96:
		tmp = t_2
	elif t1 <= -4.2e-204:
		tmp = (t1 * -v) / t_1
	elif t1 <= 1.1e-189:
		tmp = -v / (u / (t1 / u))
	elif t1 <= 2.5e+142:
		tmp = -v * (t1 / t_1)
	else:
		tmp = t_2
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(t1 + u) * Float64(t1 + u))
	t_2 = Float64(Float64(-v) / Float64(t1 + u))
	tmp = 0.0
	if (t1 <= -1.85e+96)
		tmp = t_2;
	elseif (t1 <= -4.2e-204)
		tmp = Float64(Float64(t1 * Float64(-v)) / t_1);
	elseif (t1 <= 1.1e-189)
		tmp = Float64(Float64(-v) / Float64(u / Float64(t1 / u)));
	elseif (t1 <= 2.5e+142)
		tmp = Float64(Float64(-v) * Float64(t1 / t_1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = (t1 + u) * (t1 + u);
	t_2 = -v / (t1 + u);
	tmp = 0.0;
	if (t1 <= -1.85e+96)
		tmp = t_2;
	elseif (t1 <= -4.2e-204)
		tmp = (t1 * -v) / t_1;
	elseif (t1 <= 1.1e-189)
		tmp = -v / (u / (t1 / u));
	elseif (t1 <= 2.5e+142)
		tmp = -v * (t1 / t_1);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.85e+96], t$95$2, If[LessEqual[t1, -4.2e-204], N[(N[(t1 * (-v)), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t1, 1.1e-189], N[((-v) / N[(u / N[(t1 / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.5e+142], N[((-v) * N[(t1 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -4.2 \cdot 10^{-204}:\\
\;\;\;\;\frac{t1 \cdot \left(-v\right)}{t_1}\\

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

\mathbf{elif}\;t1 \leq 2.5 \cdot 10^{+142}:\\
\;\;\;\;\left(-v\right) \cdot \frac{t1}{t_1}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t1 < -1.84999999999999996e96 or 2.5000000000000001e142 < t1

    1. Initial program 45.1%

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

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

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

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

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

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

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

    if -1.84999999999999996e96 < t1 < -4.20000000000000018e-204

    1. Initial program 94.6%

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

    if -4.20000000000000018e-204 < t1 < 1.1000000000000001e-189

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg81.6%

        \[\leadsto \color{blue}{-\frac{t1 \cdot v}{{u}^{2}}} \]
      2. *-commutative81.6%

        \[\leadsto -\frac{\color{blue}{v \cdot t1}}{{u}^{2}} \]
      3. unpow281.6%

        \[\leadsto -\frac{v \cdot t1}{\color{blue}{u \cdot u}} \]
      4. times-frac91.0%

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

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

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

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

    if 1.1000000000000001e-189 < t1 < 2.5000000000000001e142

    1. Initial program 82.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.85 \cdot 10^{+96}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -4.2 \cdot 10^{-204}:\\ \;\;\;\;\frac{t1 \cdot \left(-v\right)}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-189}:\\ \;\;\;\;\frac{-v}{\frac{u}{\frac{t1}{u}}}\\ \mathbf{elif}\;t1 \leq 2.5 \cdot 10^{+142}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]

Alternative 4: 77.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -5.8e-49 or 2.80000000000000012e-79 < 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/79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e-49 < u < 2.80000000000000012e-79

    1. Initial program 65.9%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified85.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5.8 \cdot 10^{-49} \lor \neg \left(u \leq 2.8 \cdot 10^{-79}\right):\\ \;\;\;\;\frac{t1}{\frac{t1 - u}{\frac{v}{t1 + u}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1}\\ \end{array} \]

Alternative 5: 78.2% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -4.79999999999999985e-49

    1. Initial program 78.4%

      \[\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}{\frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
      2. *-commutative78.4%

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

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

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

        \[\leadsto \color{blue}{\frac{v \cdot \frac{-t1}{t1 + u}}{t1 + u}} \]
      3. *-commutative96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999985e-49 < u < 1.9000000000000001e-79

    1. Initial program 65.9%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified85.4%

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

    if 1.9000000000000001e-79 < u

    1. Initial program 78.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{-t1}{\frac{t1 + u}{v}}}}{t1 + u} \]
      5. div-inv99.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.8 \cdot 10^{-49}:\\ \;\;\;\;\frac{t1}{\frac{t1 - u}{\frac{v}{t1 + u}}}\\ \mathbf{elif}\;u \leq 1.9 \cdot 10^{-79}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{t1 - u}{v}}\\ \end{array} \]

Alternative 6: 77.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.8 \cdot 10^{-45}:\\
\;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if u < -3.79999999999999997e-45

    1. Initial program 78.9%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg69.1%

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{{u}^{2}}{v}}} \]
      3. distribute-neg-frac73.1%

        \[\leadsto \color{blue}{\frac{-t1}{\frac{{u}^{2}}{v}}} \]
      4. unpow273.1%

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

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

      \[\leadsto \frac{-t1}{\color{blue}{\frac{{u}^{2}}{v}}} \]
    8. Step-by-step derivation
      1. unpow273.1%

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

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

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

    if -3.79999999999999997e-45 < u < 3.1e19

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

    if 3.1e19 < u

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.8 \cdot 10^{-45}:\\ \;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\ \mathbf{elif}\;u \leq 3.1 \cdot 10^{+19}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\ \end{array} \]

Alternative 7: 78.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -6.00000000000000021e-83 or 175 < t1

    1. Initial program 61.7%

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

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

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

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

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

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

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

    if -6.00000000000000021e-83 < t1 < 175

    1. Initial program 88.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{t1 + u} \cdot \frac{t1}{\frac{t1 + u}{v}}} \]
      5. div-inv95.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg76.6%

        \[\leadsto \color{blue}{-\frac{t1 \cdot v}{{u}^{2}}} \]
      2. *-commutative76.6%

        \[\leadsto -\frac{\color{blue}{v \cdot t1}}{{u}^{2}} \]
      3. unpow276.6%

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

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

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

        \[\leadsto -\color{blue}{\frac{v}{\frac{u}{\frac{t1}{u}}}} \]
    6. Simplified80.0%

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

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

Alternative 8: 79.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -6.00000000000000021e-83 or 400 < t1

    1. Initial program 61.7%

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

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

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

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

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

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

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

    if -6.00000000000000021e-83 < t1 < 400

    1. Initial program 88.3%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg76.6%

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{{u}^{2}}{v}}} \]
      3. distribute-neg-frac74.9%

        \[\leadsto \color{blue}{\frac{-t1}{\frac{{u}^{2}}{v}}} \]
      4. unpow274.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    10. Step-by-step derivation
      1. mul-1-neg76.6%

        \[\leadsto \color{blue}{-\frac{t1 \cdot v}{{u}^{2}}} \]
      2. unpow276.6%

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

        \[\leadsto -\color{blue}{\frac{t1}{u \cdot u} \cdot v} \]
      4. distribute-lft-neg-in75.6%

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{-1}{-1} \cdot \color{blue}{\frac{\frac{t1}{u} \cdot 1}{u}}\right) \cdot v \]
      12. *-rgt-identity80.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t1}{-u \cdot u}} \cdot v \]
      19. associate-/r/74.9%

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

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

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

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

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

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

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

Alternative 9: 76.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.85 \cdot 10^{-45} \lor \neg \left(u \leq 1.02 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.85e-45 or 1.02e14 < u

    1. Initial program 79.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.5%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg73.4%

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{{u}^{2}}{v}}} \]
      3. distribute-neg-frac75.8%

        \[\leadsto \color{blue}{\frac{-t1}{\frac{{u}^{2}}{v}}} \]
      4. unpow275.8%

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

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

      \[\leadsto \frac{-t1}{\color{blue}{\frac{{u}^{2}}{v}}} \]
    8. Step-by-step derivation
      1. unpow275.8%

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

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

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

    if -1.85e-45 < u < 1.02e14

    1. Initial program 67.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified80.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.85 \cdot 10^{-45} \lor \neg \left(u \leq 1.02 \cdot 10^{+14}\right):\\ \;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1}\\ \end{array} \]

Alternative 10: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 11: 67.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.6 \cdot 10^{+29} \lor \neg \left(u \leq 7.2 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -3.59999999999999976e29 or 7.19999999999999985e94 < u

    1. Initial program 79.2%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg76.0%

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{{u}^{2}}{v}}} \]
      3. distribute-neg-frac77.2%

        \[\leadsto \color{blue}{\frac{-t1}{\frac{{u}^{2}}{v}}} \]
      4. unpow277.2%

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

      \[\leadsto \color{blue}{\frac{-t1}{\frac{u \cdot u}{v}}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt39.3%

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

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

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

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

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

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

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

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

    if -3.59999999999999976e29 < u < 7.19999999999999985e94

    1. Initial program 69.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}{\frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
      2. *-commutative77.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.6 \cdot 10^{+29} \lor \neg \left(u \leq 7.2 \cdot 10^{+94}\right):\\ \;\;\;\;\frac{t1}{u} \cdot \frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1}\\ \end{array} \]

Alternative 12: 67.1% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 78.2%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg72.1%

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{{u}^{2}}{v}}} \]
      3. distribute-neg-frac75.3%

        \[\leadsto \color{blue}{\frac{-t1}{\frac{{u}^{2}}{v}}} \]
      4. unpow275.3%

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

      \[\leadsto \color{blue}{\frac{-t1}{\frac{u \cdot u}{v}}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt39.7%

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

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

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

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

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

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

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

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

    if -3.59999999999999976e29 < u < 1.10000000000000006e94

    1. Initial program 69.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}{\frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
      2. *-commutative77.3%

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

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

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

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

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

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

    if 1.10000000000000006e94 < u

    1. Initial program 80.4%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg80.6%

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{{u}^{2}}{v}}} \]
      3. distribute-neg-frac79.3%

        \[\leadsto \color{blue}{\frac{-t1}{\frac{{u}^{2}}{v}}} \]
      4. unpow279.3%

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

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

        \[\leadsto \color{blue}{\frac{-t1}{u \cdot u} \cdot v} \]
      2. add-sqr-sqrt33.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.6 \cdot 10^{+29}:\\ \;\;\;\;\frac{t1}{u} \cdot \frac{v}{u}\\ \mathbf{elif}\;u \leq 1.1 \cdot 10^{+94}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{t1}{u \cdot u}\\ \end{array} \]

Alternative 13: 67.6% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 78.2%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg72.1%

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{{u}^{2}}{v}}} \]
      3. distribute-neg-frac75.3%

        \[\leadsto \color{blue}{\frac{-t1}{\frac{{u}^{2}}{v}}} \]
      4. unpow275.3%

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

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

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

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

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

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

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

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

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

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

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

    if -3.59999999999999976e29 < u < 1.8e92

    1. Initial program 69.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}{\frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \cdot v} \]
      2. *-commutative77.3%

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

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

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

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

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

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

    if 1.8e92 < u

    1. Initial program 80.4%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t1 \cdot v}{{u}^{2}}} \]
    5. Step-by-step derivation
      1. mul-1-neg80.6%

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

        \[\leadsto -\color{blue}{\frac{t1}{\frac{{u}^{2}}{v}}} \]
      3. distribute-neg-frac79.3%

        \[\leadsto \color{blue}{\frac{-t1}{\frac{{u}^{2}}{v}}} \]
      4. unpow279.3%

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

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

        \[\leadsto \color{blue}{\frac{-t1}{u \cdot u} \cdot v} \]
      2. add-sqr-sqrt33.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.6 \cdot 10^{+29}:\\ \;\;\;\;t1 \cdot \frac{v}{u \cdot u}\\ \mathbf{elif}\;u \leq 1.8 \cdot 10^{+92}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{t1}{u \cdot u}\\ \end{array} \]

Alternative 14: 57.4% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000001e189 < u < 1.79999999999999997e87

    1. Initial program 69.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified66.2%

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

    if 1.79999999999999997e87 < 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. associate-/l*79.7%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{t1 + u} \cdot \frac{t1}{\frac{t1 + u}{v}}} \]
      5. div-inv99.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t1 + u}{-v}}} \]
      4. add-sqr-sqrt23.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4 \cdot 10^{+189}:\\ \;\;\;\;\frac{-v}{u}\\ \mathbf{elif}\;u \leq 1.8 \cdot 10^{+87}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{u}{v}}\\ \end{array} \]

Alternative 15: 57.6% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0999999999999999e189 < u < 1.99999999999999999e89

    1. Initial program 69.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified66.2%

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

    if 1.99999999999999999e89 < 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. associate-/l*79.7%

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{t1 + u} \cdot \frac{t1}{\frac{t1 + u}{v}}} \]
      5. div-inv99.8%

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

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

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

      \[\leadsto \frac{-1}{t1 + u} \cdot \color{blue}{v} \]
    5. Step-by-step derivation
      1. expm1-log1p-u47.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{-1}{t1 + u} \cdot v\right)\right)} \]
      2. expm1-udef70.1%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-1 \cdot v}{t1 + u}}\right)} - 1 \]
      4. neg-mul-170.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{-v}}{t1 + u}\right)} - 1 \]
      5. add-sqr-sqrt33.8%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-v\right) \cdot \left(-v\right)}}}{t1 + u}\right)} - 1 \]
      7. sqr-neg66.6%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{v \cdot v}}}{t1 + u}\right)} - 1 \]
      8. sqrt-unprod34.9%

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{v}{t1 + u}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def42.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{v}{t1 + u}\right)\right)} \]
      2. expm1-log1p42.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.1 \cdot 10^{+189}:\\ \;\;\;\;\frac{-v}{u}\\ \mathbf{elif}\;u \leq 2 \cdot 10^{+89}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{t1 + u}\\ \end{array} \]

Alternative 16: 57.4% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -3.9e189 or 1.1599999999999999e95 < u

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9e189 < u < 1.1599999999999999e95

    1. Initial program 69.5%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified66.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.9 \cdot 10^{+189}:\\ \;\;\;\;\frac{v}{u}\\ \mathbf{elif}\;u \leq 1.16 \cdot 10^{+95}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \]

Alternative 17: 57.4% accurate, 1.5× speedup?

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

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

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

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


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

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2000000000000001e189 < u < 2.04999999999999993e95

    1. Initial program 69.5%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{t1} \]
    6. Simplified66.4%

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

    if 2.04999999999999993e95 < u

    1. Initial program 80.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{t1 + u} \cdot \frac{t1}{\frac{t1 + u}{v}}} \]
      5. div-inv99.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t1 + u}{-v}}} \]
      4. add-sqr-sqrt22.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.2 \cdot 10^{+189}:\\ \;\;\;\;\frac{-v}{u}\\ \mathbf{elif}\;u \leq 2.05 \cdot 10^{+95}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \]

Alternative 18: 23.4% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.7 \cdot 10^{+24}:\\
\;\;\;\;\frac{v}{t1}\\

\mathbf{elif}\;t1 \leq 1.1 \cdot 10^{+22}:\\
\;\;\;\;\frac{v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.7e24 or 1.1e22 < t1

    1. Initial program 55.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t1 + u}{-v}}} \]
      4. add-sqr-sqrt50.1%

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

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

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

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

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

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

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

    if -2.7e24 < t1 < 1.1e22

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t1 + u}{-v}}} \]
      4. add-sqr-sqrt22.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.7 \cdot 10^{+24}:\\ \;\;\;\;\frac{v}{t1}\\ \mathbf{elif}\;t1 \leq 1.1 \cdot 10^{+22}:\\ \;\;\;\;\frac{v}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{t1}\\ \end{array} \]

Alternative 19: 61.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \frac{-v}{t1 + 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(Float64(-v) / 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}{t1 + u}
\end{array}
Derivation
  1. Initial program 73.5%

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

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

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

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

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

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

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

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

Alternative 20: 14.4% 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 73.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{t1 + u}{-v}}} \]
    4. add-sqr-sqrt35.3%

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{v}{t1}} \]
  8. Final simplification14.8%

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

Reproduce

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