Rosa's DopplerBench

Percentage Accurate: 72.4% → 98.1%
Time: 12.9s
Alternatives: 16
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 16 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{-t1}{\frac{t1 + u}{v}}}{t1 + u}} \]
  4. Step-by-step derivation
    1. div-inv97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;u \leq -4.8 \cdot 10^{-127}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;u \leq 7.2 \cdot 10^{+103}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if u < -4.4999999999999997e177

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999997e177 < u < -4.79999999999999964e-127 or 8.49999999999999955e-162 < u < 7.20000000000000033e103

    1. Initial program 77.1%

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

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

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

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

    if -4.79999999999999964e-127 < u < 8.49999999999999955e-162

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

    if 7.20000000000000033e103 < u

    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/73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4.5 \cdot 10^{+177}:\\ \;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{-u}{v}}\\ \mathbf{elif}\;u \leq -4.8 \cdot 10^{-127}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{elif}\;u \leq 8.5 \cdot 10^{-162}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{elif}\;u \leq 7.2 \cdot 10^{+103}:\\ \;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{t1 - u}{v}}\\ \end{array} \]

Alternative 3: 79.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ t_2 := \frac{t1}{-\frac{u}{\frac{v}{u}}}\\ \mathbf{if}\;t1 \leq -190000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq -6.2 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t1 \leq -8 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq -1.25 \cdot 10^{-152}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t1 \leq 7.5 \cdot 10^{-17}:\\ \;\;\;\;v \cdot \left(-\frac{\frac{t1}{u}}{u}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 u))) (t_2 (/ t1 (- (/ u (/ v u))))))
   (if (<= t1 -190000000.0)
     t_1
     (if (<= t1 -6.2e-47)
       t_2
       (if (<= t1 -8e-77)
         t_1
         (if (<= t1 -1.25e-152)
           t_2
           (if (<= t1 7.5e-17) (* v (- (/ (/ t1 u) u))) t_1)))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double t_2 = t1 / -(u / (v / u));
	double tmp;
	if (t1 <= -190000000.0) {
		tmp = t_1;
	} else if (t1 <= -6.2e-47) {
		tmp = t_2;
	} else if (t1 <= -8e-77) {
		tmp = t_1;
	} else if (t1 <= -1.25e-152) {
		tmp = t_2;
	} else if (t1 <= 7.5e-17) {
		tmp = v * -((t1 / u) / u);
	} 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 = t1 / -(u / (v / u))
    if (t1 <= (-190000000.0d0)) then
        tmp = t_1
    else if (t1 <= (-6.2d-47)) then
        tmp = t_2
    else if (t1 <= (-8d-77)) then
        tmp = t_1
    else if (t1 <= (-1.25d-152)) then
        tmp = t_2
    else if (t1 <= 7.5d-17) then
        tmp = v * -((t1 / u) / u)
    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 = t1 / -(u / (v / u));
	double tmp;
	if (t1 <= -190000000.0) {
		tmp = t_1;
	} else if (t1 <= -6.2e-47) {
		tmp = t_2;
	} else if (t1 <= -8e-77) {
		tmp = t_1;
	} else if (t1 <= -1.25e-152) {
		tmp = t_2;
	} else if (t1 <= 7.5e-17) {
		tmp = v * -((t1 / u) / u);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + u)
	t_2 = t1 / -(u / (v / u))
	tmp = 0
	if t1 <= -190000000.0:
		tmp = t_1
	elif t1 <= -6.2e-47:
		tmp = t_2
	elif t1 <= -8e-77:
		tmp = t_1
	elif t1 <= -1.25e-152:
		tmp = t_2
	elif t1 <= 7.5e-17:
		tmp = v * -((t1 / u) / u)
	else:
		tmp = t_1
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + u))
	t_2 = Float64(t1 / Float64(-Float64(u / Float64(v / u))))
	tmp = 0.0
	if (t1 <= -190000000.0)
		tmp = t_1;
	elseif (t1 <= -6.2e-47)
		tmp = t_2;
	elseif (t1 <= -8e-77)
		tmp = t_1;
	elseif (t1 <= -1.25e-152)
		tmp = t_2;
	elseif (t1 <= 7.5e-17)
		tmp = Float64(v * Float64(-Float64(Float64(t1 / u) / u)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + u);
	t_2 = t1 / -(u / (v / u));
	tmp = 0.0;
	if (t1 <= -190000000.0)
		tmp = t_1;
	elseif (t1 <= -6.2e-47)
		tmp = t_2;
	elseif (t1 <= -8e-77)
		tmp = t_1;
	elseif (t1 <= -1.25e-152)
		tmp = t_2;
	elseif (t1 <= 7.5e-17)
		tmp = v * -((t1 / u) / u);
	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[(t1 / (-N[(u / N[(v / u), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[t1, -190000000.0], t$95$1, If[LessEqual[t1, -6.2e-47], t$95$2, If[LessEqual[t1, -8e-77], t$95$1, If[LessEqual[t1, -1.25e-152], t$95$2, If[LessEqual[t1, 7.5e-17], N[(v * (-N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision])), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
t_2 := \frac{t1}{-\frac{u}{\frac{v}{u}}}\\
\mathbf{if}\;t1 \leq -190000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t1 \leq -6.2 \cdot 10^{-47}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t1 \leq -8 \cdot 10^{-77}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t1 \leq -1.25 \cdot 10^{-152}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -1.9e8 or -6.1999999999999996e-47 < t1 < -7.9999999999999994e-77 or 7.49999999999999984e-17 < t1

    1. Initial program 68.8%

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

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

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

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

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

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

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

    if -1.9e8 < t1 < -6.1999999999999996e-47 or -7.9999999999999994e-77 < t1 < -1.2499999999999999e-152

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e-152 < t1 < 7.49999999999999984e-17

    1. Initial program 81.1%

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{-t1}{\frac{t1 + u}{v}}}{t1 + u}} \]
    4. Step-by-step derivation
      1. div-inv94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{v \cdot \frac{t1}{u \cdot u}} \]
      5. distribute-lft-neg-in79.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -190000000:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -6.2 \cdot 10^{-47}:\\ \;\;\;\;\frac{t1}{-\frac{u}{\frac{v}{u}}}\\ \mathbf{elif}\;t1 \leq -8 \cdot 10^{-77}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -1.25 \cdot 10^{-152}:\\ \;\;\;\;\frac{t1}{-\frac{u}{\frac{v}{u}}}\\ \mathbf{elif}\;t1 \leq 7.5 \cdot 10^{-17}:\\ \;\;\;\;v \cdot \left(-\frac{\frac{t1}{u}}{u}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \end{array} \]

Alternative 4: 79.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ t_2 := \frac{-t1 \cdot \frac{v}{u}}{u}\\ \mathbf{if}\;t1 \leq -4 \cdot 10^{+33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq -6 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t1 \leq -7.4 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq 3.2 \cdot 10^{-17}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1} \cdot \frac{t1}{t1 + u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 u))) (t_2 (/ (- (* t1 (/ v u))) u)))
   (if (<= t1 -4e+33)
     t_1
     (if (<= t1 -6e-47)
       t_2
       (if (<= t1 -7.4e-77)
         t_1
         (if (<= t1 3.2e-17) t_2 (* (/ (- v) t1) (/ t1 (+ t1 u)))))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double t_2 = -(t1 * (v / u)) / u;
	double tmp;
	if (t1 <= -4e+33) {
		tmp = t_1;
	} else if (t1 <= -6e-47) {
		tmp = t_2;
	} else if (t1 <= -7.4e-77) {
		tmp = t_1;
	} else if (t1 <= 3.2e-17) {
		tmp = t_2;
	} else {
		tmp = (-v / t1) * (t1 / (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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = -v / (t1 + u)
    t_2 = -(t1 * (v / u)) / u
    if (t1 <= (-4d+33)) then
        tmp = t_1
    else if (t1 <= (-6d-47)) then
        tmp = t_2
    else if (t1 <= (-7.4d-77)) then
        tmp = t_1
    else if (t1 <= 3.2d-17) then
        tmp = t_2
    else
        tmp = (-v / t1) * (t1 / (t1 + u))
    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 = -(t1 * (v / u)) / u;
	double tmp;
	if (t1 <= -4e+33) {
		tmp = t_1;
	} else if (t1 <= -6e-47) {
		tmp = t_2;
	} else if (t1 <= -7.4e-77) {
		tmp = t_1;
	} else if (t1 <= 3.2e-17) {
		tmp = t_2;
	} else {
		tmp = (-v / t1) * (t1 / (t1 + u));
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + u)
	t_2 = -(t1 * (v / u)) / u
	tmp = 0
	if t1 <= -4e+33:
		tmp = t_1
	elif t1 <= -6e-47:
		tmp = t_2
	elif t1 <= -7.4e-77:
		tmp = t_1
	elif t1 <= 3.2e-17:
		tmp = t_2
	else:
		tmp = (-v / t1) * (t1 / (t1 + u))
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + u))
	t_2 = Float64(Float64(-Float64(t1 * Float64(v / u))) / u)
	tmp = 0.0
	if (t1 <= -4e+33)
		tmp = t_1;
	elseif (t1 <= -6e-47)
		tmp = t_2;
	elseif (t1 <= -7.4e-77)
		tmp = t_1;
	elseif (t1 <= 3.2e-17)
		tmp = t_2;
	else
		tmp = Float64(Float64(Float64(-v) / t1) * Float64(t1 / Float64(t1 + u)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + u);
	t_2 = -(t1 * (v / u)) / u;
	tmp = 0.0;
	if (t1 <= -4e+33)
		tmp = t_1;
	elseif (t1 <= -6e-47)
		tmp = t_2;
	elseif (t1 <= -7.4e-77)
		tmp = t_1;
	elseif (t1 <= 3.2e-17)
		tmp = t_2;
	else
		tmp = (-v / t1) * (t1 / (t1 + u));
	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[((-N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision]) / u), $MachinePrecision]}, If[LessEqual[t1, -4e+33], t$95$1, If[LessEqual[t1, -6e-47], t$95$2, If[LessEqual[t1, -7.4e-77], t$95$1, If[LessEqual[t1, 3.2e-17], t$95$2, N[(N[((-v) / t1), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t1 \leq -6 \cdot 10^{-47}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t1 \leq -7.4 \cdot 10^{-77}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t1 \leq 3.2 \cdot 10^{-17}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -3.9999999999999998e33 or -6.00000000000000033e-47 < t1 < -7.39999999999999992e-77

    1. Initial program 70.5%

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

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

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

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

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

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

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

    if -3.9999999999999998e33 < t1 < -6.00000000000000033e-47 or -7.39999999999999992e-77 < t1 < 3.2000000000000002e-17

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2000000000000002e-17 < t1

    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/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. Step-by-step derivation
      1. associate-/r*94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{0} - \frac{v}{t1} \cdot \frac{t1}{t1 + u} \]
      2. neg-sub079.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -4 \cdot 10^{+33}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -6 \cdot 10^{-47}:\\ \;\;\;\;\frac{-t1 \cdot \frac{v}{u}}{u}\\ \mathbf{elif}\;t1 \leq -7.4 \cdot 10^{-77}:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq 3.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{-t1 \cdot \frac{v}{u}}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{t1} \cdot \frac{t1}{t1 + u}\\ \end{array} \]

Alternative 5: 76.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -16000000 \lor \neg \left(t1 \leq -7.8 \cdot 10^{-47} \lor \neg \left(t1 \leq -8 \cdot 10^{-77}\right) \land t1 \leq 2.1 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.6e7 or -7.79999999999999956e-47 < t1 < -7.9999999999999994e-77 or 2.1000000000000001e-16 < t1

    1. Initial program 68.8%

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

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

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

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

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

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

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

    if -1.6e7 < t1 < -7.79999999999999956e-47 or -7.9999999999999994e-77 < t1 < 2.1000000000000001e-16

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -16000000 \lor \neg \left(t1 \leq -7.8 \cdot 10^{-47} \lor \neg \left(t1 \leq -8 \cdot 10^{-77}\right) \land t1 \leq 2.1 \cdot 10^{-16}\right):\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\ \end{array} \]

Alternative 6: 79.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -7.6 \cdot 10^{+36} \lor \neg \left(t1 \leq -7 \cdot 10^{-47} \lor \neg \left(t1 \leq -8 \cdot 10^{-77}\right) \land t1 \leq 1.3 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -7.6000000000000005e36 or -6.9999999999999996e-47 < t1 < -7.9999999999999994e-77 or 1.2999999999999999e-16 < t1

    1. Initial program 68.6%

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

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

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

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

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

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

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

    if -7.6000000000000005e36 < t1 < -6.9999999999999996e-47 or -7.9999999999999994e-77 < t1 < 1.2999999999999999e-16

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -7.6 \cdot 10^{+36} \lor \neg \left(t1 \leq -7 \cdot 10^{-47} \lor \neg \left(t1 \leq -8 \cdot 10^{-77}\right) \land t1 \leq 1.3 \cdot 10^{-16}\right):\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\frac{-t1 \cdot \frac{v}{u}}{u}\\ \end{array} \]

Alternative 7: 76.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ \mathbf{if}\;t1 \leq -25500000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq -6.1 \cdot 10^{-47}:\\ \;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\ \mathbf{elif}\;t1 \leq -8 \cdot 10^{-77} \lor \neg \left(t1 \leq 9.5 \cdot 10^{-17}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 u))))
   (if (<= t1 -25500000.0)
     t_1
     (if (<= t1 -6.1e-47)
       (* t1 (/ v (* u (- u))))
       (if (or (<= t1 -8e-77) (not (<= t1 9.5e-17)))
         t_1
         (* (- v) (/ t1 (* u u))))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double tmp;
	if (t1 <= -25500000.0) {
		tmp = t_1;
	} else if (t1 <= -6.1e-47) {
		tmp = t1 * (v / (u * -u));
	} else if ((t1 <= -8e-77) || !(t1 <= 9.5e-17)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = -v / (t1 + u)
    if (t1 <= (-25500000.0d0)) then
        tmp = t_1
    else if (t1 <= (-6.1d-47)) then
        tmp = t1 * (v / (u * -u))
    else if ((t1 <= (-8d-77)) .or. (.not. (t1 <= 9.5d-17))) then
        tmp = t_1
    else
        tmp = -v * (t1 / (u * u))
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double tmp;
	if (t1 <= -25500000.0) {
		tmp = t_1;
	} else if (t1 <= -6.1e-47) {
		tmp = t1 * (v / (u * -u));
	} else if ((t1 <= -8e-77) || !(t1 <= 9.5e-17)) {
		tmp = t_1;
	} else {
		tmp = -v * (t1 / (u * u));
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + u)
	tmp = 0
	if t1 <= -25500000.0:
		tmp = t_1
	elif t1 <= -6.1e-47:
		tmp = t1 * (v / (u * -u))
	elif (t1 <= -8e-77) or not (t1 <= 9.5e-17):
		tmp = t_1
	else:
		tmp = -v * (t1 / (u * u))
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + u))
	tmp = 0.0
	if (t1 <= -25500000.0)
		tmp = t_1;
	elseif (t1 <= -6.1e-47)
		tmp = Float64(t1 * Float64(v / Float64(u * Float64(-u))));
	elseif ((t1 <= -8e-77) || !(t1 <= 9.5e-17))
		tmp = t_1;
	else
		tmp = Float64(Float64(-v) * Float64(t1 / Float64(u * u)));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + u);
	tmp = 0.0;
	if (t1 <= -25500000.0)
		tmp = t_1;
	elseif (t1 <= -6.1e-47)
		tmp = t1 * (v / (u * -u));
	elseif ((t1 <= -8e-77) || ~((t1 <= 9.5e-17)))
		tmp = t_1;
	else
		tmp = -v * (t1 / (u * u));
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -25500000.0], t$95$1, If[LessEqual[t1, -6.1e-47], N[(t1 * N[(v / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, -8e-77], N[Not[LessEqual[t1, 9.5e-17]], $MachinePrecision]], t$95$1, N[((-v) * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -25500000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t1 \leq -8 \cdot 10^{-77} \lor \neg \left(t1 \leq 9.5 \cdot 10^{-17}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -2.55e7 or -6.1e-47 < t1 < -7.9999999999999994e-77 or 9.50000000000000029e-17 < t1

    1. Initial program 68.8%

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

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

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

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

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

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

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

    if -2.55e7 < t1 < -6.1e-47

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999994e-77 < t1 < 9.50000000000000029e-17

    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/85.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -25500000:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -6.1 \cdot 10^{-47}:\\ \;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\ \mathbf{elif}\;t1 \leq -8 \cdot 10^{-77} \lor \neg \left(t1 \leq 9.5 \cdot 10^{-17}\right):\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\ \end{array} \]

Alternative 8: 78.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-v}{t1 + u}\\ \mathbf{if}\;t1 \leq -48000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t1 \leq -1.15 \cdot 10^{-46}:\\ \;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\ \mathbf{elif}\;t1 \leq -8 \cdot 10^{-77} \lor \neg \left(t1 \leq 4.9 \cdot 10^{-17}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{\frac{-t1}{u}}{u}\\ \end{array} \end{array} \]
(FPCore (u v t1)
 :precision binary64
 (let* ((t_1 (/ (- v) (+ t1 u))))
   (if (<= t1 -48000000.0)
     t_1
     (if (<= t1 -1.15e-46)
       (* t1 (/ v (* u (- u))))
       (if (or (<= t1 -8e-77) (not (<= t1 4.9e-17)))
         t_1
         (* v (/ (/ (- t1) u) u)))))))
double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double tmp;
	if (t1 <= -48000000.0) {
		tmp = t_1;
	} else if (t1 <= -1.15e-46) {
		tmp = t1 * (v / (u * -u));
	} else if ((t1 <= -8e-77) || !(t1 <= 4.9e-17)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = -v / (t1 + u)
    if (t1 <= (-48000000.0d0)) then
        tmp = t_1
    else if (t1 <= (-1.15d-46)) then
        tmp = t1 * (v / (u * -u))
    else if ((t1 <= (-8d-77)) .or. (.not. (t1 <= 4.9d-17))) then
        tmp = t_1
    else
        tmp = v * ((-t1 / u) / u)
    end if
    code = tmp
end function
public static double code(double u, double v, double t1) {
	double t_1 = -v / (t1 + u);
	double tmp;
	if (t1 <= -48000000.0) {
		tmp = t_1;
	} else if (t1 <= -1.15e-46) {
		tmp = t1 * (v / (u * -u));
	} else if ((t1 <= -8e-77) || !(t1 <= 4.9e-17)) {
		tmp = t_1;
	} else {
		tmp = v * ((-t1 / u) / u);
	}
	return tmp;
}
def code(u, v, t1):
	t_1 = -v / (t1 + u)
	tmp = 0
	if t1 <= -48000000.0:
		tmp = t_1
	elif t1 <= -1.15e-46:
		tmp = t1 * (v / (u * -u))
	elif (t1 <= -8e-77) or not (t1 <= 4.9e-17):
		tmp = t_1
	else:
		tmp = v * ((-t1 / u) / u)
	return tmp
function code(u, v, t1)
	t_1 = Float64(Float64(-v) / Float64(t1 + u))
	tmp = 0.0
	if (t1 <= -48000000.0)
		tmp = t_1;
	elseif (t1 <= -1.15e-46)
		tmp = Float64(t1 * Float64(v / Float64(u * Float64(-u))));
	elseif ((t1 <= -8e-77) || !(t1 <= 4.9e-17))
		tmp = t_1;
	else
		tmp = Float64(v * Float64(Float64(Float64(-t1) / u) / u));
	end
	return tmp
end
function tmp_2 = code(u, v, t1)
	t_1 = -v / (t1 + u);
	tmp = 0.0;
	if (t1 <= -48000000.0)
		tmp = t_1;
	elseif (t1 <= -1.15e-46)
		tmp = t1 * (v / (u * -u));
	elseif ((t1 <= -8e-77) || ~((t1 <= 4.9e-17)))
		tmp = t_1;
	else
		tmp = v * ((-t1 / u) / u);
	end
	tmp_2 = tmp;
end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -48000000.0], t$95$1, If[LessEqual[t1, -1.15e-46], N[(t1 * N[(v / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, -8e-77], N[Not[LessEqual[t1, 4.9e-17]], $MachinePrecision]], t$95$1, N[(v * N[(N[((-t1) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -48000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t1 \leq -8 \cdot 10^{-77} \lor \neg \left(t1 \leq 4.9 \cdot 10^{-17}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t1 < -4.8e7 or -1.15e-46 < t1 < -7.9999999999999994e-77 or 4.90000000000000012e-17 < t1

    1. Initial program 68.8%

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

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

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

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

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

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

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

    if -4.8e7 < t1 < -1.15e-46

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.9999999999999994e-77 < t1 < 4.90000000000000012e-17

    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-/r*86.4%

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

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

      \[\leadsto \color{blue}{\frac{\frac{-t1}{\frac{t1 + u}{v}}}{t1 + u}} \]
    4. Step-by-step derivation
      1. div-inv95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{v \cdot \frac{t1}{u \cdot u}} \]
      5. distribute-lft-neg-in77.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -48000000:\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{elif}\;t1 \leq -1.15 \cdot 10^{-46}:\\ \;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\ \mathbf{elif}\;t1 \leq -8 \cdot 10^{-77} \lor \neg \left(t1 \leq 4.9 \cdot 10^{-17}\right):\\ \;\;\;\;\frac{-v}{t1 + u}\\ \mathbf{else}:\\ \;\;\;\;v \cdot \frac{\frac{-t1}{u}}{u}\\ \end{array} \]

Alternative 9: 77.4% accurate, 0.8× speedup?

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

\mathbf{elif}\;u \leq 42:\\
\;\;\;\;\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 < -2.8999999999999998e-115

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8999999999999998e-115 < u < 42

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

    if 42 < u

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.9 \cdot 10^{-115}:\\ \;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{-u}{v}}\\ \mathbf{elif}\;u \leq 42:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{t1 - u}{v}}\\ \end{array} \]

Alternative 10: 76.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.8999999999999998e-115 or 58 < u

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8999999999999998e-115 < u < 58

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

Alternative 11: 76.7% accurate, 0.8× speedup?

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

\mathbf{elif}\;u \leq 45:\\
\;\;\;\;\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 < -2.8999999999999998e-115

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8999999999999998e-115 < u < 45

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

    if 45 < u

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.9 \cdot 10^{-115}:\\ \;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{-u}{v}}\\ \mathbf{elif}\;u \leq 45:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\ \end{array} \]

Alternative 12: 68.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.8 \cdot 10^{+85} \lor \neg \left(u \leq 3 \cdot 10^{+101}\right):\\
\;\;\;\;v \cdot \frac{t1}{u \cdot u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -4.79999999999999993e85 or 2.99999999999999993e101 < u

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999993e85 < u < 2.99999999999999993e101

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

Alternative 13: 24.1% accurate, 1.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -2.45000000000000007e55 or 5.5999999999999996e89 < t1

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.45000000000000007e55 < t1 < 5.5999999999999996e89

    1. Initial program 79.9%

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

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

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

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

        \[\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/97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 56.2% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

    if 2.3499999999999999e110 < u

    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/73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq 2.35 \cdot 10^{+110}:\\ \;\;\;\;-\frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u}\\ \end{array} \]

Alternative 15: 62.1% 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.7%

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

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

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

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

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

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

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

Alternative 16: 14.3% 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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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