Rosa's DopplerBench

Percentage Accurate: 73.1% → 98.2%
Time: 12.1s
Alternatives: 15
Speedup: 1.1×

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 15 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.1% 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.2% 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 70.2%

    \[\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. Add Preprocessing
  5. Final simplification98.0%

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

Alternative 2: 76.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1999999999999999e-101 < u < 2.3000000000000001e-48

    1. Initial program 62.5%

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

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

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

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

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

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

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

    if 2.3000000000000001e-48 < u

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{\frac{t1 - u}{\frac{v}{u}}}{t1}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. associate-/l/78.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t1 - u}{v \cdot \frac{t1}{u}}}} \]
    11. Simplified78.0%

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

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

Alternative 3: 77.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e-101 < u < 6.0000000000000003e-36

    1. Initial program 63.4%

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

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

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

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

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

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

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

    if 6.0000000000000003e-36 < u

    1. Initial program 75.6%

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

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

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

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

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

Alternative 4: 76.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e-101 < u < 2.3000000000000001e-48

    1. Initial program 62.5%

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

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

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

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

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

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

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

    if 2.3000000000000001e-48 < u

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e-101 < u < 2.60000000000000003e-17

    1. Initial program 63.0%

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

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

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

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

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

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

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

    if 2.60000000000000003e-17 < u

    1. Initial program 77.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 75.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e-101 < u < 2.3000000000000001e-48

    1. Initial program 62.5%

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

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

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

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

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

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

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

    if 2.3000000000000001e-48 < u

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -2.6 \cdot 10^{-101}:\\ \;\;\;\;\frac{\frac{v}{u}}{\frac{-u}{t1}}\\ \mathbf{elif}\;u \leq 2.3 \cdot 10^{-48}:\\ \;\;\;\;\frac{-v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{u} \cdot \frac{t1}{t1 - u}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 76.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7000000000000003e-102 < u < 2.3000000000000001e-48

    1. Initial program 62.5%

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

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

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

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

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

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

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

    if 2.3000000000000001e-48 < u

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 78.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.2 \cdot 10^{-30} \lor \neg \left(t1 \leq 1.85 \cdot 10^{-150}\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t1 < -1.19999999999999992e-30 or 1.85e-150 < t1

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.19999999999999992e-30 < t1 < 1.85e-150

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -1.2 \cdot 10^{-30} \lor \neg \left(t1 \leq 1.85 \cdot 10^{-150}\right):\\ \;\;\;\;\frac{v}{u \cdot -2 - t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{v}{u}}{\frac{-u}{t1}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 59.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.79999999999999986e118 or 6.9999999999999997e196 < u

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.79999999999999986e118 < u < 6.9999999999999997e196

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

Alternative 10: 60.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.3 \cdot 10^{+117} \lor \neg \left(u \leq 6.2 \cdot 10^{+196}\right):\\
\;\;\;\;\frac{t1}{\frac{t1 \cdot u}{v}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -2.29999999999999988e117 or 6.2000000000000002e196 < u

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999988e117 < u < 6.2000000000000002e196

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

Alternative 11: 58.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.6 \cdot 10^{+120} \lor \neg \left(u \leq 2.1 \cdot 10^{+221}\right):\\
\;\;\;\;\frac{-v}{u}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -8.6000000000000003e120 or 2.10000000000000002e221 < u

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-v}}{u} \]
    10. Simplified47.7%

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

    if -8.6000000000000003e120 < u < 2.10000000000000002e221

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

Alternative 12: 95.2% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 98.1% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 62.5% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{v}{u \cdot -2 - t1} \]
  9. Add Preprocessing

Alternative 15: 54.4% accurate, 3.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(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 70.2%

    \[\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. Add Preprocessing
  5. Taylor expanded in t1 around inf 53.8%

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

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

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

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

    \[\leadsto \frac{-v}{t1} \]
  9. Add Preprocessing

Reproduce

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