Rosa's DopplerBench

Percentage Accurate: 72.5% → 96.3%
Time: 11.3s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 72.5% 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: 96.3% accurate, 0.7× speedup?

\[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ \begin{array}{l} t_1 := \frac{v\_m}{t1 + u}\\ v\_s \cdot \begin{array}{l} \mathbf{if}\;v\_m \leq 4.1 \cdot 10^{+167}:\\ \;\;\;\;\frac{t\_1}{-1 - \frac{u}{t1}}\\ \mathbf{else}:\\ \;\;\;\;t1 \cdot \frac{t\_1}{\left(0 - u\right) - t1}\\ \end{array} \end{array} \end{array} \]
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
 :precision binary64
 (let* ((t_1 (/ v_m (+ t1 u))))
   (*
    v_s
    (if (<= v_m 4.1e+167)
      (/ t_1 (- -1.0 (/ u t1)))
      (* t1 (/ t_1 (- (- 0.0 u) t1)))))))
v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
	double t_1 = v_m / (t1 + u);
	double tmp;
	if (v_m <= 4.1e+167) {
		tmp = t_1 / (-1.0 - (u / t1));
	} else {
		tmp = t1 * (t_1 / ((0.0 - u) - t1));
	}
	return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
    real(8), intent (in) :: v_s
    real(8), intent (in) :: u
    real(8), intent (in) :: v_m
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: tmp
    t_1 = v_m / (t1 + u)
    if (v_m <= 4.1d+167) then
        tmp = t_1 / ((-1.0d0) - (u / t1))
    else
        tmp = t1 * (t_1 / ((0.0d0 - u) - t1))
    end if
    code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
	double t_1 = v_m / (t1 + u);
	double tmp;
	if (v_m <= 4.1e+167) {
		tmp = t_1 / (-1.0 - (u / t1));
	} else {
		tmp = t1 * (t_1 / ((0.0 - u) - t1));
	}
	return v_s * tmp;
}
v\_m = math.fabs(v)
v\_s = math.copysign(1.0, v)
def code(v_s, u, v_m, t1):
	t_1 = v_m / (t1 + u)
	tmp = 0
	if v_m <= 4.1e+167:
		tmp = t_1 / (-1.0 - (u / t1))
	else:
		tmp = t1 * (t_1 / ((0.0 - u) - t1))
	return v_s * tmp
v\_m = abs(v)
v\_s = copysign(1.0, v)
function code(v_s, u, v_m, t1)
	t_1 = Float64(v_m / Float64(t1 + u))
	tmp = 0.0
	if (v_m <= 4.1e+167)
		tmp = Float64(t_1 / Float64(-1.0 - Float64(u / t1)));
	else
		tmp = Float64(t1 * Float64(t_1 / Float64(Float64(0.0 - u) - t1)));
	end
	return Float64(v_s * tmp)
end
v\_m = abs(v);
v\_s = sign(v) * abs(1.0);
function tmp_2 = code(v_s, u, v_m, t1)
	t_1 = v_m / (t1 + u);
	tmp = 0.0;
	if (v_m <= 4.1e+167)
		tmp = t_1 / (-1.0 - (u / t1));
	else
		tmp = t1 * (t_1 / ((0.0 - u) - t1));
	end
	tmp_2 = v_s * tmp;
end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := Block[{t$95$1 = N[(v$95$m / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, N[(v$95$s * If[LessEqual[v$95$m, 4.1e+167], N[(t$95$1 / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(t$95$1 / N[(N[(0.0 - u), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)

\\
\begin{array}{l}
t_1 := \frac{v\_m}{t1 + u}\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;v\_m \leq 4.1 \cdot 10^{+167}:\\
\;\;\;\;\frac{t\_1}{-1 - \frac{u}{t1}}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if v < 4.1e167

    1. Initial program 75.6%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
      2. times-fracN/A

        \[\leadsto \frac{v}{t1 + u} \cdot \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{t1 + u}} \]
      3. clear-numN/A

        \[\leadsto \frac{v}{t1 + u} \cdot \frac{1}{\color{blue}{\frac{t1 + u}{\mathsf{neg}\left(t1\right)}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{v}{t1 + u}}{\color{blue}{\frac{t1 + u}{\mathsf{neg}\left(t1\right)}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{v}{t1 + u}\right), \color{blue}{\left(\frac{t1 + u}{\mathsf{neg}\left(t1\right)}\right)}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \left(t1 + u\right)\right), \left(\frac{\color{blue}{t1 + u}}{\mathsf{neg}\left(t1\right)}\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{t1 + \color{blue}{u}}{\mathsf{neg}\left(t1\right)}\right)\right) \]
      8. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(t1 + u\right)\right)}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right)\right)}}\right)\right) \]
      9. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(t1 + u\right)\right)}{t1}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(t1 + u\right)\right)\right), \color{blue}{t1}\right)\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{/.f64}\left(\left(0 - \left(t1 + u\right)\right), t1\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(t1 + u\right)\right), t1\right)\right) \]
      13. +-lowering-+.f6497.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(t1, u\right)\right), t1\right)\right) \]
    4. Applied egg-rr97.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \color{blue}{\left(-1 \cdot \frac{u}{t1} - 1\right)}\right) \]
    6. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 \cdot \frac{u}{t1} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 \cdot \frac{u}{t1} + -1\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 + \color{blue}{-1 \cdot \frac{u}{t1}}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 + \left(\mathsf{neg}\left(\frac{u}{t1}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 - \color{blue}{\frac{u}{t1}}\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{\_.f64}\left(-1, \color{blue}{\left(\frac{u}{t1}\right)}\right)\right) \]
      7. /-lowering-/.f6497.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(u, \color{blue}{t1}\right)\right)\right) \]
    7. Simplified97.9%

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

    if 4.1e167 < v

    1. Initial program 45.4%

      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(t1\right)\right) \cdot \color{blue}{\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}} \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \mathsf{neg}\left(t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto t1 \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t1, \color{blue}{\left(\mathsf{neg}\left(\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)\right)}\right) \]
      5. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t1, \mathsf{neg.f64}\left(\left(\frac{v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(t1, \mathsf{neg.f64}\left(\left(\frac{\frac{v}{t1 + u}}{t1 + u}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{v}{t1 + u}\right), \left(t1 + u\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \left(t1 + u\right)\right), \left(t1 + u\right)\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(t1 + u\right)\right)\right)\right) \]
      10. +-lowering-+.f6495.6%

        \[\leadsto \mathsf{*.f64}\left(t1, \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{+.f64}\left(t1, u\right)\right)\right)\right) \]
    4. Applied egg-rr95.6%

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

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

Alternative 2: 79.9% accurate, 0.6× speedup?

\[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ \begin{array}{l} t_1 := 0 - \frac{\frac{t1}{\frac{t1 + u}{v\_m}}}{u}\\ v\_s \cdot \begin{array}{l} \mathbf{if}\;u \leq -9 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 1.65 \cdot 10^{-26}:\\ \;\;\;\;\left(t1 \cdot \frac{v\_m}{t1 + u}\right) \cdot \frac{-1}{t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
v\_m = (fabs.f64 v)
v\_s = (copysign.f64 #s(literal 1 binary64) v)
(FPCore (v_s u v_m t1)
 :precision binary64
 (let* ((t_1 (- 0.0 (/ (/ t1 (/ (+ t1 u) v_m)) u))))
   (*
    v_s
    (if (<= u -9e-24)
      t_1
      (if (<= u 1.65e-26) (* (* t1 (/ v_m (+ t1 u))) (/ -1.0 t1)) t_1)))))
v\_m = fabs(v);
v\_s = copysign(1.0, v);
double code(double v_s, double u, double v_m, double t1) {
	double t_1 = 0.0 - ((t1 / ((t1 + u) / v_m)) / u);
	double tmp;
	if (u <= -9e-24) {
		tmp = t_1;
	} else if (u <= 1.65e-26) {
		tmp = (t1 * (v_m / (t1 + u))) * (-1.0 / t1);
	} else {
		tmp = t_1;
	}
	return v_s * tmp;
}
v\_m = abs(v)
v\_s = copysign(1.0d0, v)
real(8) function code(v_s, u, v_m, t1)
    real(8), intent (in) :: v_s
    real(8), intent (in) :: u
    real(8), intent (in) :: v_m
    real(8), intent (in) :: t1
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 0.0d0 - ((t1 / ((t1 + u) / v_m)) / u)
    if (u <= (-9d-24)) then
        tmp = t_1
    else if (u <= 1.65d-26) then
        tmp = (t1 * (v_m / (t1 + u))) * ((-1.0d0) / t1)
    else
        tmp = t_1
    end if
    code = v_s * tmp
end function
v\_m = Math.abs(v);
v\_s = Math.copySign(1.0, v);
public static double code(double v_s, double u, double v_m, double t1) {
	double t_1 = 0.0 - ((t1 / ((t1 + u) / v_m)) / u);
	double tmp;
	if (u <= -9e-24) {
		tmp = t_1;
	} else if (u <= 1.65e-26) {
		tmp = (t1 * (v_m / (t1 + u))) * (-1.0 / t1);
	} else {
		tmp = t_1;
	}
	return v_s * tmp;
}
v\_m = math.fabs(v)
v\_s = math.copysign(1.0, v)
def code(v_s, u, v_m, t1):
	t_1 = 0.0 - ((t1 / ((t1 + u) / v_m)) / u)
	tmp = 0
	if u <= -9e-24:
		tmp = t_1
	elif u <= 1.65e-26:
		tmp = (t1 * (v_m / (t1 + u))) * (-1.0 / t1)
	else:
		tmp = t_1
	return v_s * tmp
v\_m = abs(v)
v\_s = copysign(1.0, v)
function code(v_s, u, v_m, t1)
	t_1 = Float64(0.0 - Float64(Float64(t1 / Float64(Float64(t1 + u) / v_m)) / u))
	tmp = 0.0
	if (u <= -9e-24)
		tmp = t_1;
	elseif (u <= 1.65e-26)
		tmp = Float64(Float64(t1 * Float64(v_m / Float64(t1 + u))) * Float64(-1.0 / t1));
	else
		tmp = t_1;
	end
	return Float64(v_s * tmp)
end
v\_m = abs(v);
v\_s = sign(v) * abs(1.0);
function tmp_2 = code(v_s, u, v_m, t1)
	t_1 = 0.0 - ((t1 / ((t1 + u) / v_m)) / u);
	tmp = 0.0;
	if (u <= -9e-24)
		tmp = t_1;
	elseif (u <= 1.65e-26)
		tmp = (t1 * (v_m / (t1 + u))) * (-1.0 / t1);
	else
		tmp = t_1;
	end
	tmp_2 = v_s * tmp;
end
v\_m = N[Abs[v], $MachinePrecision]
v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[v$95$s_, u_, v$95$m_, t1_] := Block[{t$95$1 = N[(0.0 - N[(N[(t1 / N[(N[(t1 + u), $MachinePrecision] / v$95$m), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]}, N[(v$95$s * If[LessEqual[u, -9e-24], t$95$1, If[LessEqual[u, 1.65e-26], N[(N[(t1 * N[(v$95$m / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / t1), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
\begin{array}{l}
v\_m = \left|v\right|
\\
v\_s = \mathsf{copysign}\left(1, v\right)

\\
\begin{array}{l}
t_1 := 0 - \frac{\frac{t1}{\frac{t1 + u}{v\_m}}}{u}\\
v\_s \cdot \begin{array}{l}
\mathbf{if}\;u \leq -9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;u \leq 1.65 \cdot 10^{-26}:\\
\;\;\;\;\left(t1 \cdot \frac{v\_m}{t1 + u}\right) \cdot \frac{-1}{t1}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if u < -8.9999999999999995e-24 or 1.6499999999999999e-26 < u

    1. Initial program 82.7%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(t1\right), v\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(t1, u\right), \color{blue}{u}\right)\right) \]
    4. Step-by-step derivation
      1. Simplified73.4%

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

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

          \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot \frac{v}{t1 + u}}{u} \]
        3. distribute-lft-neg-inN/A

          \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot \frac{v}{t1 + u}\right)}{u} \]
        4. distribute-frac-negN/A

          \[\leadsto \mathsf{neg}\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right) \]
        5. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{v}{t1 + u}\right), u\right)\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
        8. un-div-invN/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{t1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \left(\frac{t1 + u}{v}\right)\right), u\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\left(t1 + u\right), v\right)\right), u\right)\right) \]
        11. +-lowering-+.f6486.6%

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(t1, u\right), v\right)\right), u\right)\right) \]
      3. Applied egg-rr86.6%

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

      if -8.9999999999999995e-24 < u < 1.6499999999999999e-26

      1. Initial program 61.8%

        \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. remove-double-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
        2. neg-mul-1N/A

          \[\leadsto \frac{-1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
        3. times-fracN/A

          \[\leadsto \frac{-1}{t1 + u} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{-1}{t1 + u}\right), \color{blue}{\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}\right)}\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \left(t1 + u\right)\right), \left(\frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}}{t1 + u}\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}\right)\right) \]
        7. distribute-lft-neg-outN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1 \cdot v\right)\right)\right)}{t1 + u}\right)\right) \]
        8. remove-double-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{t1 \cdot v}{\color{blue}{t1} + u}\right)\right) \]
        9. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(t1 \cdot \color{blue}{\frac{v}{t1 + u}}\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \color{blue}{\left(\frac{v}{t1 + u}\right)}\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \color{blue}{\left(t1 + u\right)}\right)\right)\right) \]
        12. +-lowering-+.f6495.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, \color{blue}{u}\right)\right)\right)\right) \]
      4. Applied egg-rr95.7%

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

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{t1}\right)}, \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right)\right)\right) \]
      6. Step-by-step derivation
        1. /-lowering-/.f6482.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, t1\right), \mathsf{*.f64}\left(\color{blue}{t1}, \mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right)\right)\right) \]
      7. Simplified82.7%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -9 \cdot 10^{-24}:\\ \;\;\;\;0 - \frac{\frac{t1}{\frac{t1 + u}{v}}}{u}\\ \mathbf{elif}\;u \leq 1.65 \cdot 10^{-26}:\\ \;\;\;\;\left(t1 \cdot \frac{v}{t1 + u}\right) \cdot \frac{-1}{t1}\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{\frac{t1}{\frac{t1 + u}{v}}}{u}\\ \end{array} \]
    7. Add Preprocessing

    Alternative 3: 80.2% accurate, 0.6× speedup?

    \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ \begin{array}{l} t_1 := 0 - \frac{\frac{t1}{\frac{t1 + u}{v\_m}}}{u}\\ v\_s \cdot \begin{array}{l} \mathbf{if}\;u \leq -5 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 7.2 \cdot 10^{-29}:\\ \;\;\;\;0 - \frac{v\_m}{t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
    v\_m = (fabs.f64 v)
    v\_s = (copysign.f64 #s(literal 1 binary64) v)
    (FPCore (v_s u v_m t1)
     :precision binary64
     (let* ((t_1 (- 0.0 (/ (/ t1 (/ (+ t1 u) v_m)) u))))
       (* v_s (if (<= u -5e-26) t_1 (if (<= u 7.2e-29) (- 0.0 (/ v_m t1)) t_1)))))
    v\_m = fabs(v);
    v\_s = copysign(1.0, v);
    double code(double v_s, double u, double v_m, double t1) {
    	double t_1 = 0.0 - ((t1 / ((t1 + u) / v_m)) / u);
    	double tmp;
    	if (u <= -5e-26) {
    		tmp = t_1;
    	} else if (u <= 7.2e-29) {
    		tmp = 0.0 - (v_m / t1);
    	} else {
    		tmp = t_1;
    	}
    	return v_s * tmp;
    }
    
    v\_m = abs(v)
    v\_s = copysign(1.0d0, v)
    real(8) function code(v_s, u, v_m, t1)
        real(8), intent (in) :: v_s
        real(8), intent (in) :: u
        real(8), intent (in) :: v_m
        real(8), intent (in) :: t1
        real(8) :: t_1
        real(8) :: tmp
        t_1 = 0.0d0 - ((t1 / ((t1 + u) / v_m)) / u)
        if (u <= (-5d-26)) then
            tmp = t_1
        else if (u <= 7.2d-29) then
            tmp = 0.0d0 - (v_m / t1)
        else
            tmp = t_1
        end if
        code = v_s * tmp
    end function
    
    v\_m = Math.abs(v);
    v\_s = Math.copySign(1.0, v);
    public static double code(double v_s, double u, double v_m, double t1) {
    	double t_1 = 0.0 - ((t1 / ((t1 + u) / v_m)) / u);
    	double tmp;
    	if (u <= -5e-26) {
    		tmp = t_1;
    	} else if (u <= 7.2e-29) {
    		tmp = 0.0 - (v_m / t1);
    	} else {
    		tmp = t_1;
    	}
    	return v_s * tmp;
    }
    
    v\_m = math.fabs(v)
    v\_s = math.copysign(1.0, v)
    def code(v_s, u, v_m, t1):
    	t_1 = 0.0 - ((t1 / ((t1 + u) / v_m)) / u)
    	tmp = 0
    	if u <= -5e-26:
    		tmp = t_1
    	elif u <= 7.2e-29:
    		tmp = 0.0 - (v_m / t1)
    	else:
    		tmp = t_1
    	return v_s * tmp
    
    v\_m = abs(v)
    v\_s = copysign(1.0, v)
    function code(v_s, u, v_m, t1)
    	t_1 = Float64(0.0 - Float64(Float64(t1 / Float64(Float64(t1 + u) / v_m)) / u))
    	tmp = 0.0
    	if (u <= -5e-26)
    		tmp = t_1;
    	elseif (u <= 7.2e-29)
    		tmp = Float64(0.0 - Float64(v_m / t1));
    	else
    		tmp = t_1;
    	end
    	return Float64(v_s * tmp)
    end
    
    v\_m = abs(v);
    v\_s = sign(v) * abs(1.0);
    function tmp_2 = code(v_s, u, v_m, t1)
    	t_1 = 0.0 - ((t1 / ((t1 + u) / v_m)) / u);
    	tmp = 0.0;
    	if (u <= -5e-26)
    		tmp = t_1;
    	elseif (u <= 7.2e-29)
    		tmp = 0.0 - (v_m / t1);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = v_s * tmp;
    end
    
    v\_m = N[Abs[v], $MachinePrecision]
    v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[v$95$s_, u_, v$95$m_, t1_] := Block[{t$95$1 = N[(0.0 - N[(N[(t1 / N[(N[(t1 + u), $MachinePrecision] / v$95$m), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]}, N[(v$95$s * If[LessEqual[u, -5e-26], t$95$1, If[LessEqual[u, 7.2e-29], N[(0.0 - N[(v$95$m / t1), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
    
    \begin{array}{l}
    v\_m = \left|v\right|
    \\
    v\_s = \mathsf{copysign}\left(1, v\right)
    
    \\
    \begin{array}{l}
    t_1 := 0 - \frac{\frac{t1}{\frac{t1 + u}{v\_m}}}{u}\\
    v\_s \cdot \begin{array}{l}
    \mathbf{if}\;u \leq -5 \cdot 10^{-26}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;u \leq 7.2 \cdot 10^{-29}:\\
    \;\;\;\;0 - \frac{v\_m}{t1}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if u < -5.00000000000000019e-26 or 7.19999999999999948e-29 < u

      1. Initial program 82.7%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(t1\right), v\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(t1, u\right), \color{blue}{u}\right)\right) \]
      4. Step-by-step derivation
        1. Simplified73.4%

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

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

            \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot \frac{v}{t1 + u}}{u} \]
          3. distribute-lft-neg-inN/A

            \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot \frac{v}{t1 + u}\right)}{u} \]
          4. distribute-frac-negN/A

            \[\leadsto \mathsf{neg}\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right) \]
          5. neg-lowering-neg.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{v}{t1 + u}\right), u\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
          8. un-div-invN/A

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{t1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \left(\frac{t1 + u}{v}\right)\right), u\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\left(t1 + u\right), v\right)\right), u\right)\right) \]
          11. +-lowering-+.f6486.6%

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(t1, u\right), v\right)\right), u\right)\right) \]
        3. Applied egg-rr86.6%

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

        if -5.00000000000000019e-26 < u < 7.19999999999999948e-29

        1. Initial program 61.8%

          \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t1 around inf

          \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
          2. neg-sub0N/A

            \[\leadsto 0 - \color{blue}{\frac{v}{t1}} \]
          3. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{v}{t1}\right)}\right) \]
          4. /-lowering-/.f6482.2%

            \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(v, \color{blue}{t1}\right)\right) \]
        5. Simplified82.2%

          \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
        6. Step-by-step derivation
          1. sub0-negN/A

            \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto \mathsf{neg.f64}\left(\left(\frac{v}{t1}\right)\right) \]
          3. /-lowering-/.f6482.2%

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, t1\right)\right) \]
        7. Applied egg-rr82.2%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -5 \cdot 10^{-26}:\\ \;\;\;\;0 - \frac{\frac{t1}{\frac{t1 + u}{v}}}{u}\\ \mathbf{elif}\;u \leq 7.2 \cdot 10^{-29}:\\ \;\;\;\;0 - \frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{\frac{t1}{\frac{t1 + u}{v}}}{u}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 4: 78.0% accurate, 0.6× speedup?

      \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ \begin{array}{l} t_1 := \frac{\frac{t1}{\frac{u}{v\_m}}}{0 - u}\\ v\_s \cdot \begin{array}{l} \mathbf{if}\;u \leq -1.55 \cdot 10^{-22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 8.8 \cdot 10^{-28}:\\ \;\;\;\;0 - \frac{v\_m}{t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
      v\_m = (fabs.f64 v)
      v\_s = (copysign.f64 #s(literal 1 binary64) v)
      (FPCore (v_s u v_m t1)
       :precision binary64
       (let* ((t_1 (/ (/ t1 (/ u v_m)) (- 0.0 u))))
         (*
          v_s
          (if (<= u -1.55e-22) t_1 (if (<= u 8.8e-28) (- 0.0 (/ v_m t1)) t_1)))))
      v\_m = fabs(v);
      v\_s = copysign(1.0, v);
      double code(double v_s, double u, double v_m, double t1) {
      	double t_1 = (t1 / (u / v_m)) / (0.0 - u);
      	double tmp;
      	if (u <= -1.55e-22) {
      		tmp = t_1;
      	} else if (u <= 8.8e-28) {
      		tmp = 0.0 - (v_m / t1);
      	} else {
      		tmp = t_1;
      	}
      	return v_s * tmp;
      }
      
      v\_m = abs(v)
      v\_s = copysign(1.0d0, v)
      real(8) function code(v_s, u, v_m, t1)
          real(8), intent (in) :: v_s
          real(8), intent (in) :: u
          real(8), intent (in) :: v_m
          real(8), intent (in) :: t1
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (t1 / (u / v_m)) / (0.0d0 - u)
          if (u <= (-1.55d-22)) then
              tmp = t_1
          else if (u <= 8.8d-28) then
              tmp = 0.0d0 - (v_m / t1)
          else
              tmp = t_1
          end if
          code = v_s * tmp
      end function
      
      v\_m = Math.abs(v);
      v\_s = Math.copySign(1.0, v);
      public static double code(double v_s, double u, double v_m, double t1) {
      	double t_1 = (t1 / (u / v_m)) / (0.0 - u);
      	double tmp;
      	if (u <= -1.55e-22) {
      		tmp = t_1;
      	} else if (u <= 8.8e-28) {
      		tmp = 0.0 - (v_m / t1);
      	} else {
      		tmp = t_1;
      	}
      	return v_s * tmp;
      }
      
      v\_m = math.fabs(v)
      v\_s = math.copysign(1.0, v)
      def code(v_s, u, v_m, t1):
      	t_1 = (t1 / (u / v_m)) / (0.0 - u)
      	tmp = 0
      	if u <= -1.55e-22:
      		tmp = t_1
      	elif u <= 8.8e-28:
      		tmp = 0.0 - (v_m / t1)
      	else:
      		tmp = t_1
      	return v_s * tmp
      
      v\_m = abs(v)
      v\_s = copysign(1.0, v)
      function code(v_s, u, v_m, t1)
      	t_1 = Float64(Float64(t1 / Float64(u / v_m)) / Float64(0.0 - u))
      	tmp = 0.0
      	if (u <= -1.55e-22)
      		tmp = t_1;
      	elseif (u <= 8.8e-28)
      		tmp = Float64(0.0 - Float64(v_m / t1));
      	else
      		tmp = t_1;
      	end
      	return Float64(v_s * tmp)
      end
      
      v\_m = abs(v);
      v\_s = sign(v) * abs(1.0);
      function tmp_2 = code(v_s, u, v_m, t1)
      	t_1 = (t1 / (u / v_m)) / (0.0 - u);
      	tmp = 0.0;
      	if (u <= -1.55e-22)
      		tmp = t_1;
      	elseif (u <= 8.8e-28)
      		tmp = 0.0 - (v_m / t1);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = v_s * tmp;
      end
      
      v\_m = N[Abs[v], $MachinePrecision]
      v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[v$95$s_, u_, v$95$m_, t1_] := Block[{t$95$1 = N[(N[(t1 / N[(u / v$95$m), $MachinePrecision]), $MachinePrecision] / N[(0.0 - u), $MachinePrecision]), $MachinePrecision]}, N[(v$95$s * If[LessEqual[u, -1.55e-22], t$95$1, If[LessEqual[u, 8.8e-28], N[(0.0 - N[(v$95$m / t1), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
      
      \begin{array}{l}
      v\_m = \left|v\right|
      \\
      v\_s = \mathsf{copysign}\left(1, v\right)
      
      \\
      \begin{array}{l}
      t_1 := \frac{\frac{t1}{\frac{u}{v\_m}}}{0 - u}\\
      v\_s \cdot \begin{array}{l}
      \mathbf{if}\;u \leq -1.55 \cdot 10^{-22}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;u \leq 8.8 \cdot 10^{-28}:\\
      \;\;\;\;0 - \frac{v\_m}{t1}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if u < -1.55000000000000006e-22 or 8.79999999999999984e-28 < u

        1. Initial program 82.7%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(t1\right), v\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(t1, u\right), \color{blue}{u}\right)\right) \]
        4. Step-by-step derivation
          1. Simplified73.4%

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

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

              \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot \frac{v}{t1 + u}}{u} \]
            3. distribute-lft-neg-inN/A

              \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot \frac{v}{t1 + u}\right)}{u} \]
            4. distribute-frac-negN/A

              \[\leadsto \mathsf{neg}\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right) \]
            5. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{v}{t1 + u}\right), u\right)\right) \]
            7. clear-numN/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
            8. un-div-invN/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{t1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \left(\frac{t1 + u}{v}\right)\right), u\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\left(t1 + u\right), v\right)\right), u\right)\right) \]
            11. +-lowering-+.f6486.6%

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(t1, u\right), v\right)\right), u\right)\right) \]
          3. Applied egg-rr86.6%

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

            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\color{blue}{u}, v\right)\right), u\right)\right) \]
          5. Step-by-step derivation
            1. Simplified82.5%

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

            if -1.55000000000000006e-22 < u < 8.79999999999999984e-28

            1. Initial program 61.8%

              \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            2. Add Preprocessing
            3. Taylor expanded in t1 around inf

              \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
              2. neg-sub0N/A

                \[\leadsto 0 - \color{blue}{\frac{v}{t1}} \]
              3. --lowering--.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{v}{t1}\right)}\right) \]
              4. /-lowering-/.f6482.2%

                \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(v, \color{blue}{t1}\right)\right) \]
            5. Simplified82.2%

              \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
            6. Step-by-step derivation
              1. sub0-negN/A

                \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{neg.f64}\left(\left(\frac{v}{t1}\right)\right) \]
              3. /-lowering-/.f6482.2%

                \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, t1\right)\right) \]
            7. Applied egg-rr82.2%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.55 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{0 - u}\\ \mathbf{elif}\;u \leq 8.8 \cdot 10^{-28}:\\ \;\;\;\;0 - \frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{0 - u}\\ \end{array} \]
          8. Add Preprocessing

          Alternative 5: 77.4% accurate, 0.6× speedup?

          \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ \begin{array}{l} t_1 := \frac{v\_m}{\left(0 - u\right) - t1}\\ v\_s \cdot \begin{array}{l} \mathbf{if}\;t1 \leq -2.8 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t1 \leq 2.7 \cdot 10^{+50}:\\ \;\;\;\;\frac{0 - v\_m}{\frac{u}{\frac{t1}{u}}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
          v\_m = (fabs.f64 v)
          v\_s = (copysign.f64 #s(literal 1 binary64) v)
          (FPCore (v_s u v_m t1)
           :precision binary64
           (let* ((t_1 (/ v_m (- (- 0.0 u) t1))))
             (*
              v_s
              (if (<= t1 -2.8e-39)
                t_1
                (if (<= t1 2.7e+50) (/ (- 0.0 v_m) (/ u (/ t1 u))) t_1)))))
          v\_m = fabs(v);
          v\_s = copysign(1.0, v);
          double code(double v_s, double u, double v_m, double t1) {
          	double t_1 = v_m / ((0.0 - u) - t1);
          	double tmp;
          	if (t1 <= -2.8e-39) {
          		tmp = t_1;
          	} else if (t1 <= 2.7e+50) {
          		tmp = (0.0 - v_m) / (u / (t1 / u));
          	} else {
          		tmp = t_1;
          	}
          	return v_s * tmp;
          }
          
          v\_m = abs(v)
          v\_s = copysign(1.0d0, v)
          real(8) function code(v_s, u, v_m, t1)
              real(8), intent (in) :: v_s
              real(8), intent (in) :: u
              real(8), intent (in) :: v_m
              real(8), intent (in) :: t1
              real(8) :: t_1
              real(8) :: tmp
              t_1 = v_m / ((0.0d0 - u) - t1)
              if (t1 <= (-2.8d-39)) then
                  tmp = t_1
              else if (t1 <= 2.7d+50) then
                  tmp = (0.0d0 - v_m) / (u / (t1 / u))
              else
                  tmp = t_1
              end if
              code = v_s * tmp
          end function
          
          v\_m = Math.abs(v);
          v\_s = Math.copySign(1.0, v);
          public static double code(double v_s, double u, double v_m, double t1) {
          	double t_1 = v_m / ((0.0 - u) - t1);
          	double tmp;
          	if (t1 <= -2.8e-39) {
          		tmp = t_1;
          	} else if (t1 <= 2.7e+50) {
          		tmp = (0.0 - v_m) / (u / (t1 / u));
          	} else {
          		tmp = t_1;
          	}
          	return v_s * tmp;
          }
          
          v\_m = math.fabs(v)
          v\_s = math.copysign(1.0, v)
          def code(v_s, u, v_m, t1):
          	t_1 = v_m / ((0.0 - u) - t1)
          	tmp = 0
          	if t1 <= -2.8e-39:
          		tmp = t_1
          	elif t1 <= 2.7e+50:
          		tmp = (0.0 - v_m) / (u / (t1 / u))
          	else:
          		tmp = t_1
          	return v_s * tmp
          
          v\_m = abs(v)
          v\_s = copysign(1.0, v)
          function code(v_s, u, v_m, t1)
          	t_1 = Float64(v_m / Float64(Float64(0.0 - u) - t1))
          	tmp = 0.0
          	if (t1 <= -2.8e-39)
          		tmp = t_1;
          	elseif (t1 <= 2.7e+50)
          		tmp = Float64(Float64(0.0 - v_m) / Float64(u / Float64(t1 / u)));
          	else
          		tmp = t_1;
          	end
          	return Float64(v_s * tmp)
          end
          
          v\_m = abs(v);
          v\_s = sign(v) * abs(1.0);
          function tmp_2 = code(v_s, u, v_m, t1)
          	t_1 = v_m / ((0.0 - u) - t1);
          	tmp = 0.0;
          	if (t1 <= -2.8e-39)
          		tmp = t_1;
          	elseif (t1 <= 2.7e+50)
          		tmp = (0.0 - v_m) / (u / (t1 / u));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = v_s * tmp;
          end
          
          v\_m = N[Abs[v], $MachinePrecision]
          v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[v$95$s_, u_, v$95$m_, t1_] := Block[{t$95$1 = N[(v$95$m / N[(N[(0.0 - u), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, N[(v$95$s * If[LessEqual[t1, -2.8e-39], t$95$1, If[LessEqual[t1, 2.7e+50], N[(N[(0.0 - v$95$m), $MachinePrecision] / N[(u / N[(t1 / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
          
          \begin{array}{l}
          v\_m = \left|v\right|
          \\
          v\_s = \mathsf{copysign}\left(1, v\right)
          
          \\
          \begin{array}{l}
          t_1 := \frac{v\_m}{\left(0 - u\right) - t1}\\
          v\_s \cdot \begin{array}{l}
          \mathbf{if}\;t1 \leq -2.8 \cdot 10^{-39}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t1 \leq 2.7 \cdot 10^{+50}:\\
          \;\;\;\;\frac{0 - v\_m}{\frac{u}{\frac{t1}{u}}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t1 < -2.8000000000000001e-39 or 2.7e50 < t1

            1. Initial program 54.0%

              \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. remove-double-negN/A

                \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
              2. neg-mul-1N/A

                \[\leadsto \frac{-1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
              3. times-fracN/A

                \[\leadsto \frac{-1}{t1 + u} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{-1}{t1 + u}\right), \color{blue}{\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}\right)}\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \left(t1 + u\right)\right), \left(\frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}}{t1 + u}\right)\right) \]
              6. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}\right)\right) \]
              7. distribute-lft-neg-outN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1 \cdot v\right)\right)\right)}{t1 + u}\right)\right) \]
              8. remove-double-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{t1 \cdot v}{\color{blue}{t1} + u}\right)\right) \]
              9. associate-/l*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(t1 \cdot \color{blue}{\frac{v}{t1 + u}}\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \color{blue}{\left(\frac{v}{t1 + u}\right)}\right)\right) \]
              11. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \color{blue}{\left(t1 + u\right)}\right)\right)\right) \]
              12. +-lowering-+.f6499.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, \color{blue}{u}\right)\right)\right)\right) \]
            4. Applied egg-rr99.8%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \color{blue}{v}\right) \]
            6. Step-by-step derivation
              1. Simplified85.0%

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

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

                  \[\leadsto \frac{\mathsf{neg}\left(v\right)}{\color{blue}{t1} + u} \]
                3. distribute-neg-fracN/A

                  \[\leadsto \mathsf{neg}\left(\frac{v}{t1 + u}\right) \]
                4. neg-lowering-neg.f64N/A

                  \[\leadsto \mathsf{neg.f64}\left(\left(\frac{v}{t1 + u}\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \left(t1 + u\right)\right)\right) \]
                6. +-lowering-+.f6485.2%

                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right)\right) \]
              3. Applied egg-rr85.2%

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

              if -2.8000000000000001e-39 < t1 < 2.7e50

              1. Initial program 89.3%

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

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

                  \[\leadsto \mathsf{neg}\left(\frac{t1 \cdot v}{{u}^{2}}\right) \]
                2. neg-sub0N/A

                  \[\leadsto 0 - \color{blue}{\frac{t1 \cdot v}{{u}^{2}}} \]
                3. --lowering--.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{t1 \cdot v}{{u}^{2}}\right)}\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \left(\frac{v \cdot t1}{{\color{blue}{u}}^{2}}\right)\right) \]
                5. associate-/l*N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \left(v \cdot \color{blue}{\frac{t1}{{u}^{2}}}\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(v, \color{blue}{\left(\frac{t1}{{u}^{2}}\right)}\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(v, \mathsf{/.f64}\left(t1, \color{blue}{\left({u}^{2}\right)}\right)\right)\right) \]
                8. unpow2N/A

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(v, \mathsf{/.f64}\left(t1, \left(u \cdot \color{blue}{u}\right)\right)\right)\right) \]
                9. *-lowering-*.f6473.0%

                  \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(v, \mathsf{/.f64}\left(t1, \mathsf{*.f64}\left(u, \color{blue}{u}\right)\right)\right)\right) \]
              5. Simplified73.0%

                \[\leadsto \color{blue}{0 - v \cdot \frac{t1}{u \cdot u}} \]
              6. Step-by-step derivation
                1. sub0-negN/A

                  \[\leadsto \mathsf{neg}\left(v \cdot \frac{t1}{u \cdot u}\right) \]
                2. neg-lowering-neg.f64N/A

                  \[\leadsto \mathsf{neg.f64}\left(\left(v \cdot \frac{t1}{u \cdot u}\right)\right) \]
                3. clear-numN/A

                  \[\leadsto \mathsf{neg.f64}\left(\left(v \cdot \frac{1}{\frac{u \cdot u}{t1}}\right)\right) \]
                4. un-div-invN/A

                  \[\leadsto \mathsf{neg.f64}\left(\left(\frac{v}{\frac{u \cdot u}{t1}}\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \left(\frac{u \cdot u}{t1}\right)\right)\right) \]
                6. clear-numN/A

                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \left(\frac{1}{\frac{t1}{u \cdot u}}\right)\right)\right) \]
                7. associate-/r*N/A

                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \left(\frac{1}{\frac{\frac{t1}{u}}{u}}\right)\right)\right) \]
                8. clear-numN/A

                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \left(\frac{u}{\frac{t1}{u}}\right)\right)\right) \]
                9. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \mathsf{/.f64}\left(u, \left(\frac{t1}{u}\right)\right)\right)\right) \]
                10. /-lowering-/.f6475.4%

                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \mathsf{/.f64}\left(u, \mathsf{/.f64}\left(t1, u\right)\right)\right)\right) \]
              7. Applied egg-rr75.4%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t1 \leq -2.8 \cdot 10^{-39}:\\ \;\;\;\;\frac{v}{\left(0 - u\right) - t1}\\ \mathbf{elif}\;t1 \leq 2.7 \cdot 10^{+50}:\\ \;\;\;\;\frac{0 - v}{\frac{u}{\frac{t1}{u}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{v}{\left(0 - u\right) - t1}\\ \end{array} \]
            9. Add Preprocessing

            Alternative 6: 58.1% accurate, 0.8× speedup?

            \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ v\_s \cdot \begin{array}{l} \mathbf{if}\;u \leq -1.8 \cdot 10^{+228}:\\ \;\;\;\;0 - \frac{v\_m}{u}\\ \mathbf{elif}\;u \leq 8.5 \cdot 10^{+178}:\\ \;\;\;\;0 - \frac{v\_m}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{u}{v\_m}}\\ \end{array} \end{array} \]
            v\_m = (fabs.f64 v)
            v\_s = (copysign.f64 #s(literal 1 binary64) v)
            (FPCore (v_s u v_m t1)
             :precision binary64
             (*
              v_s
              (if (<= u -1.8e+228)
                (- 0.0 (/ v_m u))
                (if (<= u 8.5e+178) (- 0.0 (/ v_m t1)) (/ -1.0 (/ u v_m))))))
            v\_m = fabs(v);
            v\_s = copysign(1.0, v);
            double code(double v_s, double u, double v_m, double t1) {
            	double tmp;
            	if (u <= -1.8e+228) {
            		tmp = 0.0 - (v_m / u);
            	} else if (u <= 8.5e+178) {
            		tmp = 0.0 - (v_m / t1);
            	} else {
            		tmp = -1.0 / (u / v_m);
            	}
            	return v_s * tmp;
            }
            
            v\_m = abs(v)
            v\_s = copysign(1.0d0, v)
            real(8) function code(v_s, u, v_m, t1)
                real(8), intent (in) :: v_s
                real(8), intent (in) :: u
                real(8), intent (in) :: v_m
                real(8), intent (in) :: t1
                real(8) :: tmp
                if (u <= (-1.8d+228)) then
                    tmp = 0.0d0 - (v_m / u)
                else if (u <= 8.5d+178) then
                    tmp = 0.0d0 - (v_m / t1)
                else
                    tmp = (-1.0d0) / (u / v_m)
                end if
                code = v_s * tmp
            end function
            
            v\_m = Math.abs(v);
            v\_s = Math.copySign(1.0, v);
            public static double code(double v_s, double u, double v_m, double t1) {
            	double tmp;
            	if (u <= -1.8e+228) {
            		tmp = 0.0 - (v_m / u);
            	} else if (u <= 8.5e+178) {
            		tmp = 0.0 - (v_m / t1);
            	} else {
            		tmp = -1.0 / (u / v_m);
            	}
            	return v_s * tmp;
            }
            
            v\_m = math.fabs(v)
            v\_s = math.copysign(1.0, v)
            def code(v_s, u, v_m, t1):
            	tmp = 0
            	if u <= -1.8e+228:
            		tmp = 0.0 - (v_m / u)
            	elif u <= 8.5e+178:
            		tmp = 0.0 - (v_m / t1)
            	else:
            		tmp = -1.0 / (u / v_m)
            	return v_s * tmp
            
            v\_m = abs(v)
            v\_s = copysign(1.0, v)
            function code(v_s, u, v_m, t1)
            	tmp = 0.0
            	if (u <= -1.8e+228)
            		tmp = Float64(0.0 - Float64(v_m / u));
            	elseif (u <= 8.5e+178)
            		tmp = Float64(0.0 - Float64(v_m / t1));
            	else
            		tmp = Float64(-1.0 / Float64(u / v_m));
            	end
            	return Float64(v_s * tmp)
            end
            
            v\_m = abs(v);
            v\_s = sign(v) * abs(1.0);
            function tmp_2 = code(v_s, u, v_m, t1)
            	tmp = 0.0;
            	if (u <= -1.8e+228)
            		tmp = 0.0 - (v_m / u);
            	elseif (u <= 8.5e+178)
            		tmp = 0.0 - (v_m / t1);
            	else
            		tmp = -1.0 / (u / v_m);
            	end
            	tmp_2 = v_s * tmp;
            end
            
            v\_m = N[Abs[v], $MachinePrecision]
            v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * If[LessEqual[u, -1.8e+228], N[(0.0 - N[(v$95$m / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 8.5e+178], N[(0.0 - N[(v$95$m / t1), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(u / v$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
            
            \begin{array}{l}
            v\_m = \left|v\right|
            \\
            v\_s = \mathsf{copysign}\left(1, v\right)
            
            \\
            v\_s \cdot \begin{array}{l}
            \mathbf{if}\;u \leq -1.8 \cdot 10^{+228}:\\
            \;\;\;\;0 - \frac{v\_m}{u}\\
            
            \mathbf{elif}\;u \leq 8.5 \cdot 10^{+178}:\\
            \;\;\;\;0 - \frac{v\_m}{t1}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{-1}{\frac{u}{v\_m}}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if u < -1.8e228

              1. Initial program 82.6%

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(t1\right), v\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(t1, u\right), \color{blue}{u}\right)\right) \]
              4. Step-by-step derivation
                1. Simplified82.6%

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

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

                    \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot \frac{v}{t1 + u}}{u} \]
                  3. distribute-lft-neg-inN/A

                    \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot \frac{v}{t1 + u}\right)}{u} \]
                  4. distribute-frac-negN/A

                    \[\leadsto \mathsf{neg}\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right) \]
                  5. neg-lowering-neg.f64N/A

                    \[\leadsto \mathsf{neg.f64}\left(\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right)\right) \]
                  6. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{v}{t1 + u}\right), u\right)\right) \]
                  7. clear-numN/A

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
                  8. un-div-invN/A

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{t1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
                  9. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \left(\frac{t1 + u}{v}\right)\right), u\right)\right) \]
                  10. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\left(t1 + u\right), v\right)\right), u\right)\right) \]
                  11. +-lowering-+.f64100.0%

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(t1, u\right), v\right)\right), u\right)\right) \]
                3. Applied egg-rr100.0%

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

                  \[\leadsto \mathsf{neg.f64}\left(\color{blue}{\left(\frac{v}{u}\right)}\right) \]
                5. Step-by-step derivation
                  1. /-lowering-/.f6457.6%

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, u\right)\right) \]
                6. Simplified57.6%

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

                if -1.8e228 < u < 8.49999999999999991e178

                1. Initial program 71.7%

                  \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in t1 around inf

                  \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
                  2. neg-sub0N/A

                    \[\leadsto 0 - \color{blue}{\frac{v}{t1}} \]
                  3. --lowering--.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{v}{t1}\right)}\right) \]
                  4. /-lowering-/.f6458.0%

                    \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(v, \color{blue}{t1}\right)\right) \]
                5. Simplified58.0%

                  \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
                6. Step-by-step derivation
                  1. sub0-negN/A

                    \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
                  2. neg-lowering-neg.f64N/A

                    \[\leadsto \mathsf{neg.f64}\left(\left(\frac{v}{t1}\right)\right) \]
                  3. /-lowering-/.f6458.0%

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, t1\right)\right) \]
                7. Applied egg-rr58.0%

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

                if 8.49999999999999991e178 < u

                1. Initial program 80.0%

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(t1\right), v\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(t1, u\right), \color{blue}{u}\right)\right) \]
                4. Step-by-step derivation
                  1. Simplified80.0%

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

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

                      \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot \frac{v}{t1 + u}}{u} \]
                    3. distribute-lft-neg-inN/A

                      \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot \frac{v}{t1 + u}\right)}{u} \]
                    4. distribute-frac-negN/A

                      \[\leadsto \mathsf{neg}\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right) \]
                    5. neg-lowering-neg.f64N/A

                      \[\leadsto \mathsf{neg.f64}\left(\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right)\right) \]
                    6. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{v}{t1 + u}\right), u\right)\right) \]
                    7. clear-numN/A

                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
                    8. un-div-invN/A

                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{t1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
                    9. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \left(\frac{t1 + u}{v}\right)\right), u\right)\right) \]
                    10. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\left(t1 + u\right), v\right)\right), u\right)\right) \]
                    11. +-lowering-+.f6499.9%

                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(t1, u\right), v\right)\right), u\right)\right) \]
                  3. Applied egg-rr99.9%

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

                    \[\leadsto \mathsf{neg.f64}\left(\color{blue}{\left(\frac{v}{u}\right)}\right) \]
                  5. Step-by-step derivation
                    1. /-lowering-/.f6462.8%

                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, u\right)\right) \]
                  6. Simplified62.8%

                    \[\leadsto -\color{blue}{\frac{v}{u}} \]
                  7. Step-by-step derivation
                    1. neg-mul-1N/A

                      \[\leadsto -1 \cdot \color{blue}{\frac{v}{u}} \]
                    2. clear-numN/A

                      \[\leadsto -1 \cdot \frac{1}{\color{blue}{\frac{u}{v}}} \]
                    3. un-div-invN/A

                      \[\leadsto \frac{-1}{\color{blue}{\frac{u}{v}}} \]
                    4. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \color{blue}{\left(\frac{u}{v}\right)}\right) \]
                    5. div-invN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \left(u \cdot \color{blue}{\frac{1}{v}}\right)\right) \]
                    6. clear-numN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \left(u \cdot \frac{1}{\color{blue}{\frac{v}{1}}}\right)\right) \]
                    7. clear-numN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \left(u \cdot \frac{1}{\frac{1}{\color{blue}{\frac{1}{v}}}}\right)\right) \]
                    8. metadata-evalN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \left(u \cdot \frac{1}{\frac{1}{\frac{\mathsf{neg}\left(-1\right)}{v}}}\right)\right) \]
                    9. distribute-neg-fracN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \left(u \cdot \frac{1}{\frac{1}{\mathsf{neg}\left(\frac{-1}{v}\right)}}\right)\right) \]
                    10. un-div-invN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \left(\frac{u}{\color{blue}{\frac{1}{\mathsf{neg}\left(\frac{-1}{v}\right)}}}\right)\right) \]
                    11. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(u, \color{blue}{\left(\frac{1}{\mathsf{neg}\left(\frac{-1}{v}\right)}\right)}\right)\right) \]
                    12. distribute-frac-neg2N/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(u, \left(\mathsf{neg}\left(\frac{1}{\frac{-1}{v}}\right)\right)\right)\right) \]
                    13. frac-2negN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(u, \left(\mathsf{neg}\left(\frac{1}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(v\right)}}\right)\right)\right)\right) \]
                    14. metadata-evalN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(u, \left(\mathsf{neg}\left(\frac{1}{\frac{1}{\mathsf{neg}\left(v\right)}}\right)\right)\right)\right) \]
                    15. remove-double-divN/A

                      \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(u, \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(v\right)\right)\right)\right)\right)\right) \]
                    16. remove-double-neg62.8%

                      \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(u, v\right)\right) \]
                  8. Applied egg-rr62.8%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.8 \cdot 10^{+228}:\\ \;\;\;\;0 - \frac{v}{u}\\ \mathbf{elif}\;u \leq 8.5 \cdot 10^{+178}:\\ \;\;\;\;0 - \frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{u}{v}}\\ \end{array} \]
                7. Add Preprocessing

                Alternative 7: 57.9% accurate, 0.8× speedup?

                \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ \begin{array}{l} t_1 := 0 - \frac{v\_m}{u}\\ v\_s \cdot \begin{array}{l} \mathbf{if}\;u \leq -1.8 \cdot 10^{+228}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;u \leq 2.5 \cdot 10^{+178}:\\ \;\;\;\;0 - \frac{v\_m}{t1}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
                v\_m = (fabs.f64 v)
                v\_s = (copysign.f64 #s(literal 1 binary64) v)
                (FPCore (v_s u v_m t1)
                 :precision binary64
                 (let* ((t_1 (- 0.0 (/ v_m u))))
                   (*
                    v_s
                    (if (<= u -1.8e+228) t_1 (if (<= u 2.5e+178) (- 0.0 (/ v_m t1)) t_1)))))
                v\_m = fabs(v);
                v\_s = copysign(1.0, v);
                double code(double v_s, double u, double v_m, double t1) {
                	double t_1 = 0.0 - (v_m / u);
                	double tmp;
                	if (u <= -1.8e+228) {
                		tmp = t_1;
                	} else if (u <= 2.5e+178) {
                		tmp = 0.0 - (v_m / t1);
                	} else {
                		tmp = t_1;
                	}
                	return v_s * tmp;
                }
                
                v\_m = abs(v)
                v\_s = copysign(1.0d0, v)
                real(8) function code(v_s, u, v_m, t1)
                    real(8), intent (in) :: v_s
                    real(8), intent (in) :: u
                    real(8), intent (in) :: v_m
                    real(8), intent (in) :: t1
                    real(8) :: t_1
                    real(8) :: tmp
                    t_1 = 0.0d0 - (v_m / u)
                    if (u <= (-1.8d+228)) then
                        tmp = t_1
                    else if (u <= 2.5d+178) then
                        tmp = 0.0d0 - (v_m / t1)
                    else
                        tmp = t_1
                    end if
                    code = v_s * tmp
                end function
                
                v\_m = Math.abs(v);
                v\_s = Math.copySign(1.0, v);
                public static double code(double v_s, double u, double v_m, double t1) {
                	double t_1 = 0.0 - (v_m / u);
                	double tmp;
                	if (u <= -1.8e+228) {
                		tmp = t_1;
                	} else if (u <= 2.5e+178) {
                		tmp = 0.0 - (v_m / t1);
                	} else {
                		tmp = t_1;
                	}
                	return v_s * tmp;
                }
                
                v\_m = math.fabs(v)
                v\_s = math.copysign(1.0, v)
                def code(v_s, u, v_m, t1):
                	t_1 = 0.0 - (v_m / u)
                	tmp = 0
                	if u <= -1.8e+228:
                		tmp = t_1
                	elif u <= 2.5e+178:
                		tmp = 0.0 - (v_m / t1)
                	else:
                		tmp = t_1
                	return v_s * tmp
                
                v\_m = abs(v)
                v\_s = copysign(1.0, v)
                function code(v_s, u, v_m, t1)
                	t_1 = Float64(0.0 - Float64(v_m / u))
                	tmp = 0.0
                	if (u <= -1.8e+228)
                		tmp = t_1;
                	elseif (u <= 2.5e+178)
                		tmp = Float64(0.0 - Float64(v_m / t1));
                	else
                		tmp = t_1;
                	end
                	return Float64(v_s * tmp)
                end
                
                v\_m = abs(v);
                v\_s = sign(v) * abs(1.0);
                function tmp_2 = code(v_s, u, v_m, t1)
                	t_1 = 0.0 - (v_m / u);
                	tmp = 0.0;
                	if (u <= -1.8e+228)
                		tmp = t_1;
                	elseif (u <= 2.5e+178)
                		tmp = 0.0 - (v_m / t1);
                	else
                		tmp = t_1;
                	end
                	tmp_2 = v_s * tmp;
                end
                
                v\_m = N[Abs[v], $MachinePrecision]
                v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[v$95$s_, u_, v$95$m_, t1_] := Block[{t$95$1 = N[(0.0 - N[(v$95$m / u), $MachinePrecision]), $MachinePrecision]}, N[(v$95$s * If[LessEqual[u, -1.8e+228], t$95$1, If[LessEqual[u, 2.5e+178], N[(0.0 - N[(v$95$m / t1), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
                
                \begin{array}{l}
                v\_m = \left|v\right|
                \\
                v\_s = \mathsf{copysign}\left(1, v\right)
                
                \\
                \begin{array}{l}
                t_1 := 0 - \frac{v\_m}{u}\\
                v\_s \cdot \begin{array}{l}
                \mathbf{if}\;u \leq -1.8 \cdot 10^{+228}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;u \leq 2.5 \cdot 10^{+178}:\\
                \;\;\;\;0 - \frac{v\_m}{t1}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if u < -1.8e228 or 2.49999999999999995e178 < u

                  1. Initial program 80.8%

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(t1\right), v\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(t1, u\right), \color{blue}{u}\right)\right) \]
                  4. Step-by-step derivation
                    1. Simplified80.8%

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

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

                        \[\leadsto \frac{\left(\mathsf{neg}\left(t1\right)\right) \cdot \frac{v}{t1 + u}}{u} \]
                      3. distribute-lft-neg-inN/A

                        \[\leadsto \frac{\mathsf{neg}\left(t1 \cdot \frac{v}{t1 + u}\right)}{u} \]
                      4. distribute-frac-negN/A

                        \[\leadsto \mathsf{neg}\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right) \]
                      5. neg-lowering-neg.f64N/A

                        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{t1 \cdot \frac{v}{t1 + u}}{u}\right)\right) \]
                      6. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{v}{t1 + u}\right), u\right)\right) \]
                      7. clear-numN/A

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(t1 \cdot \frac{1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
                      8. un-div-invN/A

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{t1}{\frac{t1 + u}{v}}\right), u\right)\right) \]
                      9. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \left(\frac{t1 + u}{v}\right)\right), u\right)\right) \]
                      10. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\left(t1 + u\right), v\right)\right), u\right)\right) \]
                      11. +-lowering-+.f64100.0%

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(t1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(t1, u\right), v\right)\right), u\right)\right) \]
                    3. Applied egg-rr100.0%

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

                      \[\leadsto \mathsf{neg.f64}\left(\color{blue}{\left(\frac{v}{u}\right)}\right) \]
                    5. Step-by-step derivation
                      1. /-lowering-/.f6461.1%

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, u\right)\right) \]
                    6. Simplified61.1%

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

                    if -1.8e228 < u < 2.49999999999999995e178

                    1. Initial program 71.7%

                      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in t1 around inf

                      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
                      2. neg-sub0N/A

                        \[\leadsto 0 - \color{blue}{\frac{v}{t1}} \]
                      3. --lowering--.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{v}{t1}\right)}\right) \]
                      4. /-lowering-/.f6458.0%

                        \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(v, \color{blue}{t1}\right)\right) \]
                    5. Simplified58.0%

                      \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
                    6. Step-by-step derivation
                      1. sub0-negN/A

                        \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
                      2. neg-lowering-neg.f64N/A

                        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{v}{t1}\right)\right) \]
                      3. /-lowering-/.f6458.0%

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, t1\right)\right) \]
                    7. Applied egg-rr58.0%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;u \leq -1.8 \cdot 10^{+228}:\\ \;\;\;\;0 - \frac{v}{u}\\ \mathbf{elif}\;u \leq 2.5 \cdot 10^{+178}:\\ \;\;\;\;0 - \frac{v}{t1}\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{v}{u}\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 8: 97.8% accurate, 0.9× speedup?

                  \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ v\_s \cdot \left(\frac{-1}{t1 + u} \cdot \left(t1 \cdot \frac{v\_m}{t1 + u}\right)\right) \end{array} \]
                  v\_m = (fabs.f64 v)
                  v\_s = (copysign.f64 #s(literal 1 binary64) v)
                  (FPCore (v_s u v_m t1)
                   :precision binary64
                   (* v_s (* (/ -1.0 (+ t1 u)) (* t1 (/ v_m (+ t1 u))))))
                  v\_m = fabs(v);
                  v\_s = copysign(1.0, v);
                  double code(double v_s, double u, double v_m, double t1) {
                  	return v_s * ((-1.0 / (t1 + u)) * (t1 * (v_m / (t1 + u))));
                  }
                  
                  v\_m = abs(v)
                  v\_s = copysign(1.0d0, v)
                  real(8) function code(v_s, u, v_m, t1)
                      real(8), intent (in) :: v_s
                      real(8), intent (in) :: u
                      real(8), intent (in) :: v_m
                      real(8), intent (in) :: t1
                      code = v_s * (((-1.0d0) / (t1 + u)) * (t1 * (v_m / (t1 + u))))
                  end function
                  
                  v\_m = Math.abs(v);
                  v\_s = Math.copySign(1.0, v);
                  public static double code(double v_s, double u, double v_m, double t1) {
                  	return v_s * ((-1.0 / (t1 + u)) * (t1 * (v_m / (t1 + u))));
                  }
                  
                  v\_m = math.fabs(v)
                  v\_s = math.copysign(1.0, v)
                  def code(v_s, u, v_m, t1):
                  	return v_s * ((-1.0 / (t1 + u)) * (t1 * (v_m / (t1 + u))))
                  
                  v\_m = abs(v)
                  v\_s = copysign(1.0, v)
                  function code(v_s, u, v_m, t1)
                  	return Float64(v_s * Float64(Float64(-1.0 / Float64(t1 + u)) * Float64(t1 * Float64(v_m / Float64(t1 + u)))))
                  end
                  
                  v\_m = abs(v);
                  v\_s = sign(v) * abs(1.0);
                  function tmp = code(v_s, u, v_m, t1)
                  	tmp = v_s * ((-1.0 / (t1 + u)) * (t1 * (v_m / (t1 + u))));
                  end
                  
                  v\_m = N[Abs[v], $MachinePrecision]
                  v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * N[(N[(-1.0 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 * N[(v$95$m / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  v\_m = \left|v\right|
                  \\
                  v\_s = \mathsf{copysign}\left(1, v\right)
                  
                  \\
                  v\_s \cdot \left(\frac{-1}{t1 + u} \cdot \left(t1 \cdot \frac{v\_m}{t1 + u}\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 72.9%

                    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. remove-double-negN/A

                      \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
                    2. neg-mul-1N/A

                      \[\leadsto \frac{-1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
                    3. times-fracN/A

                      \[\leadsto \frac{-1}{t1 + u} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}} \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\left(\frac{-1}{t1 + u}\right), \color{blue}{\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}\right)}\right) \]
                    5. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \left(t1 + u\right)\right), \left(\frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}}{t1 + u}\right)\right) \]
                    6. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}\right)\right) \]
                    7. distribute-lft-neg-outN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1 \cdot v\right)\right)\right)}{t1 + u}\right)\right) \]
                    8. remove-double-negN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{t1 \cdot v}{\color{blue}{t1} + u}\right)\right) \]
                    9. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(t1 \cdot \color{blue}{\frac{v}{t1 + u}}\right)\right) \]
                    10. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \color{blue}{\left(\frac{v}{t1 + u}\right)}\right)\right) \]
                    11. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \color{blue}{\left(t1 + u\right)}\right)\right)\right) \]
                    12. +-lowering-+.f6497.7%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, \color{blue}{u}\right)\right)\right)\right) \]
                  4. Applied egg-rr97.7%

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

                  Alternative 9: 97.9% accurate, 1.1× speedup?

                  \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ v\_s \cdot \frac{\frac{v\_m}{t1 + u}}{-1 - \frac{u}{t1}} \end{array} \]
                  v\_m = (fabs.f64 v)
                  v\_s = (copysign.f64 #s(literal 1 binary64) v)
                  (FPCore (v_s u v_m t1)
                   :precision binary64
                   (* v_s (/ (/ v_m (+ t1 u)) (- -1.0 (/ u t1)))))
                  v\_m = fabs(v);
                  v\_s = copysign(1.0, v);
                  double code(double v_s, double u, double v_m, double t1) {
                  	return v_s * ((v_m / (t1 + u)) / (-1.0 - (u / t1)));
                  }
                  
                  v\_m = abs(v)
                  v\_s = copysign(1.0d0, v)
                  real(8) function code(v_s, u, v_m, t1)
                      real(8), intent (in) :: v_s
                      real(8), intent (in) :: u
                      real(8), intent (in) :: v_m
                      real(8), intent (in) :: t1
                      code = v_s * ((v_m / (t1 + u)) / ((-1.0d0) - (u / t1)))
                  end function
                  
                  v\_m = Math.abs(v);
                  v\_s = Math.copySign(1.0, v);
                  public static double code(double v_s, double u, double v_m, double t1) {
                  	return v_s * ((v_m / (t1 + u)) / (-1.0 - (u / t1)));
                  }
                  
                  v\_m = math.fabs(v)
                  v\_s = math.copysign(1.0, v)
                  def code(v_s, u, v_m, t1):
                  	return v_s * ((v_m / (t1 + u)) / (-1.0 - (u / t1)))
                  
                  v\_m = abs(v)
                  v\_s = copysign(1.0, v)
                  function code(v_s, u, v_m, t1)
                  	return Float64(v_s * Float64(Float64(v_m / Float64(t1 + u)) / Float64(-1.0 - Float64(u / t1))))
                  end
                  
                  v\_m = abs(v);
                  v\_s = sign(v) * abs(1.0);
                  function tmp = code(v_s, u, v_m, t1)
                  	tmp = v_s * ((v_m / (t1 + u)) / (-1.0 - (u / t1)));
                  end
                  
                  v\_m = N[Abs[v], $MachinePrecision]
                  v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * N[(N[(v$95$m / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  v\_m = \left|v\right|
                  \\
                  v\_s = \mathsf{copysign}\left(1, v\right)
                  
                  \\
                  v\_s \cdot \frac{\frac{v\_m}{t1 + u}}{-1 - \frac{u}{t1}}
                  \end{array}
                  
                  Derivation
                  1. Initial program 72.9%

                    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{v \cdot \left(\mathsf{neg}\left(t1\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
                    2. times-fracN/A

                      \[\leadsto \frac{v}{t1 + u} \cdot \color{blue}{\frac{\mathsf{neg}\left(t1\right)}{t1 + u}} \]
                    3. clear-numN/A

                      \[\leadsto \frac{v}{t1 + u} \cdot \frac{1}{\color{blue}{\frac{t1 + u}{\mathsf{neg}\left(t1\right)}}} \]
                    4. un-div-invN/A

                      \[\leadsto \frac{\frac{v}{t1 + u}}{\color{blue}{\frac{t1 + u}{\mathsf{neg}\left(t1\right)}}} \]
                    5. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(\frac{v}{t1 + u}\right), \color{blue}{\left(\frac{t1 + u}{\mathsf{neg}\left(t1\right)}\right)}\right) \]
                    6. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \left(t1 + u\right)\right), \left(\frac{\color{blue}{t1 + u}}{\mathsf{neg}\left(t1\right)}\right)\right) \]
                    7. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{t1 + \color{blue}{u}}{\mathsf{neg}\left(t1\right)}\right)\right) \]
                    8. frac-2negN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(t1 + u\right)\right)}{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right)\right)}}\right)\right) \]
                    9. remove-double-negN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(t1 + u\right)\right)}{t1}\right)\right) \]
                    10. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(t1 + u\right)\right)\right), \color{blue}{t1}\right)\right) \]
                    11. neg-sub0N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{/.f64}\left(\left(0 - \left(t1 + u\right)\right), t1\right)\right) \]
                    12. --lowering--.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(t1 + u\right)\right), t1\right)\right) \]
                    13. +-lowering-+.f6496.2%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{+.f64}\left(t1, u\right)\right), t1\right)\right) \]
                  4. Applied egg-rr96.2%

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \color{blue}{\left(-1 \cdot \frac{u}{t1} - 1\right)}\right) \]
                  6. Step-by-step derivation
                    1. sub-negN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 \cdot \frac{u}{t1} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
                    2. metadata-evalN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 \cdot \frac{u}{t1} + -1\right)\right) \]
                    3. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 + \color{blue}{-1 \cdot \frac{u}{t1}}\right)\right) \]
                    4. mul-1-negN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 + \left(\mathsf{neg}\left(\frac{u}{t1}\right)\right)\right)\right) \]
                    5. unsub-negN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \left(-1 - \color{blue}{\frac{u}{t1}}\right)\right) \]
                    6. --lowering--.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{\_.f64}\left(-1, \color{blue}{\left(\frac{u}{t1}\right)}\right)\right) \]
                    7. /-lowering-/.f6496.3%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{\_.f64}\left(-1, \mathsf{/.f64}\left(u, \color{blue}{t1}\right)\right)\right) \]
                  7. Simplified96.3%

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

                  Alternative 10: 61.2% accurate, 1.7× speedup?

                  \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ v\_s \cdot \frac{v\_m}{\left(0 - u\right) - t1} \end{array} \]
                  v\_m = (fabs.f64 v)
                  v\_s = (copysign.f64 #s(literal 1 binary64) v)
                  (FPCore (v_s u v_m t1) :precision binary64 (* v_s (/ v_m (- (- 0.0 u) t1))))
                  v\_m = fabs(v);
                  v\_s = copysign(1.0, v);
                  double code(double v_s, double u, double v_m, double t1) {
                  	return v_s * (v_m / ((0.0 - u) - t1));
                  }
                  
                  v\_m = abs(v)
                  v\_s = copysign(1.0d0, v)
                  real(8) function code(v_s, u, v_m, t1)
                      real(8), intent (in) :: v_s
                      real(8), intent (in) :: u
                      real(8), intent (in) :: v_m
                      real(8), intent (in) :: t1
                      code = v_s * (v_m / ((0.0d0 - u) - t1))
                  end function
                  
                  v\_m = Math.abs(v);
                  v\_s = Math.copySign(1.0, v);
                  public static double code(double v_s, double u, double v_m, double t1) {
                  	return v_s * (v_m / ((0.0 - u) - t1));
                  }
                  
                  v\_m = math.fabs(v)
                  v\_s = math.copysign(1.0, v)
                  def code(v_s, u, v_m, t1):
                  	return v_s * (v_m / ((0.0 - u) - t1))
                  
                  v\_m = abs(v)
                  v\_s = copysign(1.0, v)
                  function code(v_s, u, v_m, t1)
                  	return Float64(v_s * Float64(v_m / Float64(Float64(0.0 - u) - t1)))
                  end
                  
                  v\_m = abs(v);
                  v\_s = sign(v) * abs(1.0);
                  function tmp = code(v_s, u, v_m, t1)
                  	tmp = v_s * (v_m / ((0.0 - u) - t1));
                  end
                  
                  v\_m = N[Abs[v], $MachinePrecision]
                  v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * N[(v$95$m / N[(N[(0.0 - u), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  v\_m = \left|v\right|
                  \\
                  v\_s = \mathsf{copysign}\left(1, v\right)
                  
                  \\
                  v\_s \cdot \frac{v\_m}{\left(0 - u\right) - t1}
                  \end{array}
                  
                  Derivation
                  1. Initial program 72.9%

                    \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. remove-double-negN/A

                      \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
                    2. neg-mul-1N/A

                      \[\leadsto \frac{-1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)\right)}{\color{blue}{\left(t1 + u\right)} \cdot \left(t1 + u\right)} \]
                    3. times-fracN/A

                      \[\leadsto \frac{-1}{t1 + u} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}} \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\left(\frac{-1}{t1 + u}\right), \color{blue}{\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}\right)}\right) \]
                    5. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \left(t1 + u\right)\right), \left(\frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}}{t1 + u}\right)\right) \]
                    6. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1\right)\right) \cdot v\right)}{t1 + u}\right)\right) \]
                    7. distribute-lft-neg-outN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(t1 \cdot v\right)\right)\right)}{t1 + u}\right)\right) \]
                    8. remove-double-negN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(\frac{t1 \cdot v}{\color{blue}{t1} + u}\right)\right) \]
                    9. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \left(t1 \cdot \color{blue}{\frac{v}{t1 + u}}\right)\right) \]
                    10. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \color{blue}{\left(\frac{v}{t1 + u}\right)}\right)\right) \]
                    11. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \color{blue}{\left(t1 + u\right)}\right)\right)\right) \]
                    12. +-lowering-+.f6497.7%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \mathsf{*.f64}\left(t1, \mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, \color{blue}{u}\right)\right)\right)\right) \]
                  4. Applied egg-rr97.7%

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{+.f64}\left(t1, u\right)\right), \color{blue}{v}\right) \]
                  6. Step-by-step derivation
                    1. Simplified58.6%

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

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

                        \[\leadsto \frac{\mathsf{neg}\left(v\right)}{\color{blue}{t1} + u} \]
                      3. distribute-neg-fracN/A

                        \[\leadsto \mathsf{neg}\left(\frac{v}{t1 + u}\right) \]
                      4. neg-lowering-neg.f64N/A

                        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{v}{t1 + u}\right)\right) \]
                      5. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \left(t1 + u\right)\right)\right) \]
                      6. +-lowering-+.f6458.7%

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, \mathsf{+.f64}\left(t1, u\right)\right)\right) \]
                    3. Applied egg-rr58.7%

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

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

                    Alternative 11: 54.2% accurate, 2.4× speedup?

                    \[\begin{array}{l} v\_m = \left|v\right| \\ v\_s = \mathsf{copysign}\left(1, v\right) \\ v\_s \cdot \left(0 - \frac{v\_m}{t1}\right) \end{array} \]
                    v\_m = (fabs.f64 v)
                    v\_s = (copysign.f64 #s(literal 1 binary64) v)
                    (FPCore (v_s u v_m t1) :precision binary64 (* v_s (- 0.0 (/ v_m t1))))
                    v\_m = fabs(v);
                    v\_s = copysign(1.0, v);
                    double code(double v_s, double u, double v_m, double t1) {
                    	return v_s * (0.0 - (v_m / t1));
                    }
                    
                    v\_m = abs(v)
                    v\_s = copysign(1.0d0, v)
                    real(8) function code(v_s, u, v_m, t1)
                        real(8), intent (in) :: v_s
                        real(8), intent (in) :: u
                        real(8), intent (in) :: v_m
                        real(8), intent (in) :: t1
                        code = v_s * (0.0d0 - (v_m / t1))
                    end function
                    
                    v\_m = Math.abs(v);
                    v\_s = Math.copySign(1.0, v);
                    public static double code(double v_s, double u, double v_m, double t1) {
                    	return v_s * (0.0 - (v_m / t1));
                    }
                    
                    v\_m = math.fabs(v)
                    v\_s = math.copysign(1.0, v)
                    def code(v_s, u, v_m, t1):
                    	return v_s * (0.0 - (v_m / t1))
                    
                    v\_m = abs(v)
                    v\_s = copysign(1.0, v)
                    function code(v_s, u, v_m, t1)
                    	return Float64(v_s * Float64(0.0 - Float64(v_m / t1)))
                    end
                    
                    v\_m = abs(v);
                    v\_s = sign(v) * abs(1.0);
                    function tmp = code(v_s, u, v_m, t1)
                    	tmp = v_s * (0.0 - (v_m / t1));
                    end
                    
                    v\_m = N[Abs[v], $MachinePrecision]
                    v\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[v]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[v$95$s_, u_, v$95$m_, t1_] := N[(v$95$s * N[(0.0 - N[(v$95$m / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    v\_m = \left|v\right|
                    \\
                    v\_s = \mathsf{copysign}\left(1, v\right)
                    
                    \\
                    v\_s \cdot \left(0 - \frac{v\_m}{t1}\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 72.9%

                      \[\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)} \]
                    2. Add Preprocessing
                    3. Taylor expanded in t1 around inf

                      \[\leadsto \color{blue}{-1 \cdot \frac{v}{t1}} \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
                      2. neg-sub0N/A

                        \[\leadsto 0 - \color{blue}{\frac{v}{t1}} \]
                      3. --lowering--.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{v}{t1}\right)}\right) \]
                      4. /-lowering-/.f6453.4%

                        \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(v, \color{blue}{t1}\right)\right) \]
                    5. Simplified53.4%

                      \[\leadsto \color{blue}{0 - \frac{v}{t1}} \]
                    6. Step-by-step derivation
                      1. sub0-negN/A

                        \[\leadsto \mathsf{neg}\left(\frac{v}{t1}\right) \]
                      2. neg-lowering-neg.f64N/A

                        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{v}{t1}\right)\right) \]
                      3. /-lowering-/.f6453.4%

                        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(v, t1\right)\right) \]
                    7. Applied egg-rr53.4%

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

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

                    Reproduce

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