Rosa's DopplerBench

Percentage Accurate: 73.6% → 98.1%
Time: 10.3s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 73.6% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}} \]
  4. Final simplification99.2%

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

Alternative 2: 77.7% accurate, 0.9× speedup?

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

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

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

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


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

    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. times-frac99.8%

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

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

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

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

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

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

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

    if -2.69999999999999993e-61 < u < 9.19999999999999942e-28

    1. Initial program 66.8%

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

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

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

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

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

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

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

    if 9.19999999999999942e-28 < u

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.7 \cdot 10^{-61}:\\ \;\;\;\;-\frac{v}{u} \cdot \frac{t1}{u}\\ \mathbf{elif}\;u \leq 9.2 \cdot 10^{-28}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\ \end{array} \]

Alternative 3: 77.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -5 \cdot 10^{-64}:\\
\;\;\;\;\frac{\frac{v}{u}}{1 - \frac{u}{t1}}\\

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

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


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

    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. times-frac99.8%

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000033e-64 < u < 6.1999999999999997e-27

    1. Initial program 66.8%

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

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

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

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

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

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

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

    if 6.1999999999999997e-27 < u

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5 \cdot 10^{-64}:\\ \;\;\;\;\frac{\frac{v}{u}}{1 - \frac{u}{t1}}\\ \mathbf{elif}\;u \leq 6.2 \cdot 10^{-27}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\ \end{array} \]

Alternative 4: 77.9% accurate, 0.9× speedup?

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

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

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

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


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

    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. times-frac99.8%

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

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

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

    if -6.4000000000000003e-60 < u < 3.09999999999999992e-28

    1. Initial program 66.8%

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

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

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

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

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

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

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

    if 3.09999999999999992e-28 < u

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.2% accurate, 0.9× speedup?

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

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

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

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


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

    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. times-frac99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.2e-72 < u < 3.3000000000000002e-28

    1. Initial program 66.8%

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

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

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

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

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

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

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

    if 3.3000000000000002e-28 < u

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 80.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{v}{\frac{t1 - u}{\color{blue}{t1}}}}{t1 + u} \]
    5. Applied egg-rr39.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-1}{t1 - u} \cdot v} \]
    9. Step-by-step derivation
      1. expm1-log1p-u83.3%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{-1}{t1 - u} \cdot v\right)} - 1} \]
      3. *-commutative37.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{v \cdot \frac{-1}{t1 - u}}\right)} - 1 \]
      4. frac-2neg37.5%

        \[\leadsto e^{\mathsf{log1p}\left(v \cdot \color{blue}{\frac{--1}{-\left(t1 - u\right)}}\right)} - 1 \]
      5. metadata-eval37.5%

        \[\leadsto e^{\mathsf{log1p}\left(v \cdot \frac{\color{blue}{1}}{-\left(t1 - u\right)}\right)} - 1 \]
      6. un-div-inv37.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{v}{-\left(t1 - u\right)}}\right)} - 1 \]
      7. sub-neg37.5%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{v}{\color{blue}{\left(-t1\right) + \left(-\left(-u\right)\right)}}\right)} - 1 \]
      9. remove-double-neg37.5%

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

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

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

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

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

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

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

    if -2.49999999999999984e-50 < t1 < 2.70000000000000009e-52

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

    if 2.70000000000000009e-52 < t1

    1. Initial program 74.1%

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

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

        \[\leadsto \frac{\color{blue}{\frac{v}{\frac{t1 + u}{-t1}}}}{t1 + u} \]
      4. associate-/l/90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.5 \cdot 10^{-50}:\\ \;\;\;\;\frac{v}{u - t1}\\ \mathbf{elif}\;t1 \leq 2.7 \cdot 10^{-52}:\\ \;\;\;\;-\frac{v}{u} \cdot \frac{t1}{u}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \end{array} \]

Alternative 7: 77.1% accurate, 1.0× speedup?

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

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

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

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


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

    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. times-frac99.8%

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

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

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

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

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

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

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

    if -5.20000000000000021e-61 < u < 3.8000000000000003e-30

    1. Initial program 66.8%

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

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

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

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

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

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

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

    if 3.8000000000000003e-30 < u

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5.2 \cdot 10^{-61}:\\ \;\;\;\;-\frac{v}{u} \cdot \frac{t1}{u}\\ \mathbf{elif}\;u \leq 3.8 \cdot 10^{-30}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\ \end{array} \]

Alternative 8: 67.7% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -6.59999999999999969e104 or 2.20000000000000003e86 < u

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot v}{\frac{u}{-t1} \cdot u}} \]
      3. *-un-lft-identity74.5%

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

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

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

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

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

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

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

    if -6.59999999999999969e104 < u < 2.20000000000000003e86

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{v}{\frac{\color{blue}{t1 - u}}{-\left(-t1\right)}}}{t1 + u} \]
      13. remove-double-neg43.2%

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

      \[\leadsto \color{blue}{\frac{\frac{v}{\frac{t1 - u}{t1}}}{t1 + u}} \]
    6. Step-by-step derivation
      1. clear-num43.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{t1}{\color{blue}{\frac{-\left(t1 + u\right)}{-v}}}}{t1 + u} \]
      19. associate-/r/24.3%

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

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

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

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

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

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

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

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

Alternative 9: 68.0% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.55000000000000002e105 or 2.3500000000000001e86 < u

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot v}{\frac{u}{-t1} \cdot u}} \]
      3. *-un-lft-identity74.5%

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

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

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

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

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

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

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

    if -1.55000000000000002e105 < u < 2.3500000000000001e86

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.55 \cdot 10^{+105} \lor \neg \left(u \leq 2.35 \cdot 10^{+86}\right):\\ \;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \end{array} \]

Alternative 10: 67.8% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6000000000000002e57 < u < 1.84999999999999996e86

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.84999999999999996e86 < u

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot v}{\frac{u}{-t1} \cdot u}} \]
      3. *-un-lft-identity77.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -3.6 \cdot 10^{+57}:\\ \;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\ \mathbf{elif}\;u \leq 1.85 \cdot 10^{+86}:\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\ \end{array} \]

Alternative 11: 67.8% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{v}{u} \cdot \frac{-t1}{u}} \]
      2. clear-num90.5%

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

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

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

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

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

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

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

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

    if -4.7999999999999998e55 < u < 2.3500000000000001e86

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3500000000000001e86 < u

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot v}{\frac{u}{-t1} \cdot u}} \]
      3. *-un-lft-identity77.2%

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

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

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

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

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

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

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

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

Alternative 12: 57.5% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -1.2e58 or 1.1e138 < u

    1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e58 < u < 1.1e138

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

Alternative 13: 57.5% accurate, 1.5× speedup?

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

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

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

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


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e58 < u < 4.0000000000000001e138

    1. Initial program 72.4%

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

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

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

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

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

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

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

    if 4.0000000000000001e138 < u

    1. Initial program 80.5%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    7. Simplified42.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.2 \cdot 10^{+58}:\\ \;\;\;\;\frac{v}{u}\\ \mathbf{elif}\;u \leq 4 \cdot 10^{+138}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u}\\ \end{array} \]

Alternative 14: 57.1% accurate, 1.5× speedup?

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

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

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

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


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

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000036e25 < u < 1.4e138

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

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

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

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

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

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

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

    if 1.4e138 < u

    1. Initial program 80.5%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    7. Simplified42.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -4 \cdot 10^{+25}:\\ \;\;\;\;\frac{v}{t1 + u}\\ \mathbf{elif}\;u \leq 1.4 \cdot 10^{+138}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-v}{u}\\ \end{array} \]

Alternative 15: 23.6% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.8 \cdot 10^{+81} \lor \neg \left(t1 \leq 1.9 \cdot 10^{+108}\right):\\
\;\;\;\;\frac{v}{t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.80000000000000003e81 or 1.90000000000000004e108 < t1

    1. Initial program 55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.80000000000000003e81 < t1 < 1.90000000000000004e108

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{v}{\frac{\color{blue}{t1 - u}}{-\left(-t1\right)}}}{t1 + u} \]
    13. remove-double-neg61.2%

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

    \[\leadsto \color{blue}{\frac{\frac{v}{\frac{t1 - u}{t1}}}{t1 + u}} \]
  6. Step-by-step derivation
    1. clear-num61.2%

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

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

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

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

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{t1 \cdot t1}}}{t1 - u} \cdot v}{t1 + u} \]
    6. sqr-neg44.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{t1}{\color{blue}{\frac{-\left(t1 + u\right)}{-v}}}}{t1 + u} \]
    19. associate-/r/40.2%

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

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

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

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

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

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

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

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

Alternative 17: 61.2% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{v}{\frac{\color{blue}{t1 - u}}{-\left(-t1\right)}}}{t1 + u} \]
    13. remove-double-neg61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{-1}{t1 - u} \cdot v} \]
  9. Step-by-step derivation
    1. expm1-log1p-u53.1%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{-1}{t1 - u} \cdot v\right)} - 1} \]
    3. *-commutative44.4%

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

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

      \[\leadsto e^{\mathsf{log1p}\left(v \cdot \frac{\color{blue}{1}}{-\left(t1 - u\right)}\right)} - 1 \]
    6. un-div-inv44.4%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{v}{-\left(t1 - u\right)}}\right)} - 1 \]
    7. sub-neg44.4%

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

      \[\leadsto e^{\mathsf{log1p}\left(\frac{v}{\color{blue}{\left(-t1\right) + \left(-\left(-u\right)\right)}}\right)} - 1 \]
    9. remove-double-neg44.4%

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{v}{u - t1}} \]
  13. Final simplification62.2%

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

Alternative 18: 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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{v}{t1}} \]
  7. Final simplification15.7%

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

Reproduce

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