Rosa's TurbineBenchmark

Percentage Accurate: 84.5% → 96.7%
Time: 14.0s
Alternatives: 13
Speedup: 1.7×

Specification

?
\[\begin{array}{l} \\ \left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \end{array} \]
(FPCore (v w r)
 :precision binary64
 (-
  (-
   (+ 3.0 (/ 2.0 (* r r)))
   (/ (* (* 0.125 (- 3.0 (* 2.0 v))) (* (* (* w w) r) r)) (- 1.0 v)))
  4.5))
double code(double v, double w, double r) {
	return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
real(8) function code(v, w, r)
    real(8), intent (in) :: v
    real(8), intent (in) :: w
    real(8), intent (in) :: r
    code = ((3.0d0 + (2.0d0 / (r * r))) - (((0.125d0 * (3.0d0 - (2.0d0 * v))) * (((w * w) * r) * r)) / (1.0d0 - v))) - 4.5d0
end function
public static double code(double v, double w, double r) {
	return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
def code(v, w, r):
	return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5
function code(v, w, r)
	return Float64(Float64(Float64(3.0 + Float64(2.0 / Float64(r * r))) - Float64(Float64(Float64(0.125 * Float64(3.0 - Float64(2.0 * v))) * Float64(Float64(Float64(w * w) * r) * r)) / Float64(1.0 - v))) - 4.5)
end
function tmp = code(v, w, r)
	tmp = ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
end
code[v_, w_, r_] := N[(N[(N[(3.0 + N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(0.125 * N[(3.0 - N[(2.0 * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(w * w), $MachinePrecision] * r), $MachinePrecision] * r), $MachinePrecision]), $MachinePrecision] / N[(1.0 - v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5
\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 13 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: 84.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \end{array} \]
(FPCore (v w r)
 :precision binary64
 (-
  (-
   (+ 3.0 (/ 2.0 (* r r)))
   (/ (* (* 0.125 (- 3.0 (* 2.0 v))) (* (* (* w w) r) r)) (- 1.0 v)))
  4.5))
double code(double v, double w, double r) {
	return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
real(8) function code(v, w, r)
    real(8), intent (in) :: v
    real(8), intent (in) :: w
    real(8), intent (in) :: r
    code = ((3.0d0 + (2.0d0 / (r * r))) - (((0.125d0 * (3.0d0 - (2.0d0 * v))) * (((w * w) * r) * r)) / (1.0d0 - v))) - 4.5d0
end function
public static double code(double v, double w, double r) {
	return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
def code(v, w, r):
	return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5
function code(v, w, r)
	return Float64(Float64(Float64(3.0 + Float64(2.0 / Float64(r * r))) - Float64(Float64(Float64(0.125 * Float64(3.0 - Float64(2.0 * v))) * Float64(Float64(Float64(w * w) * r) * r)) / Float64(1.0 - v))) - 4.5)
end
function tmp = code(v, w, r)
	tmp = ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
end
code[v_, w_, r_] := N[(N[(N[(3.0 + N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(0.125 * N[(3.0 - N[(2.0 * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(w * w), $MachinePrecision] * r), $MachinePrecision] * r), $MachinePrecision]), $MachinePrecision] / N[(1.0 - v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5
\end{array}

Alternative 1: 96.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{2}{r \cdot r}\\ \mathbf{if}\;v \leq -2 \cdot 10^{+115}:\\ \;\;\;\;t\_0 + \left(\left(r \cdot \left(r \cdot w\right)\right) \cdot \left(w \cdot -0.25\right) + -1.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_0 + 3\right) + \frac{\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \left(0.125 \cdot \left(v \cdot 2 - 3\right)\right)}{1 - v}\right) - 4.5\\ \end{array} \end{array} \]
(FPCore (v w r)
 :precision binary64
 (let* ((t_0 (/ 2.0 (* r r))))
   (if (<= v -2e+115)
     (+ t_0 (+ (* (* r (* r w)) (* w -0.25)) -1.5))
     (-
      (+
       (+ t_0 3.0)
       (/ (* (* (* r w) (* r w)) (* 0.125 (- (* v 2.0) 3.0))) (- 1.0 v)))
      4.5))))
double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double tmp;
	if (v <= -2e+115) {
		tmp = t_0 + (((r * (r * w)) * (w * -0.25)) + -1.5);
	} else {
		tmp = ((t_0 + 3.0) + ((((r * w) * (r * w)) * (0.125 * ((v * 2.0) - 3.0))) / (1.0 - v))) - 4.5;
	}
	return tmp;
}
real(8) function code(v, w, r)
    real(8), intent (in) :: v
    real(8), intent (in) :: w
    real(8), intent (in) :: r
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 2.0d0 / (r * r)
    if (v <= (-2d+115)) then
        tmp = t_0 + (((r * (r * w)) * (w * (-0.25d0))) + (-1.5d0))
    else
        tmp = ((t_0 + 3.0d0) + ((((r * w) * (r * w)) * (0.125d0 * ((v * 2.0d0) - 3.0d0))) / (1.0d0 - v))) - 4.5d0
    end if
    code = tmp
end function
public static double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double tmp;
	if (v <= -2e+115) {
		tmp = t_0 + (((r * (r * w)) * (w * -0.25)) + -1.5);
	} else {
		tmp = ((t_0 + 3.0) + ((((r * w) * (r * w)) * (0.125 * ((v * 2.0) - 3.0))) / (1.0 - v))) - 4.5;
	}
	return tmp;
}
def code(v, w, r):
	t_0 = 2.0 / (r * r)
	tmp = 0
	if v <= -2e+115:
		tmp = t_0 + (((r * (r * w)) * (w * -0.25)) + -1.5)
	else:
		tmp = ((t_0 + 3.0) + ((((r * w) * (r * w)) * (0.125 * ((v * 2.0) - 3.0))) / (1.0 - v))) - 4.5
	return tmp
function code(v, w, r)
	t_0 = Float64(2.0 / Float64(r * r))
	tmp = 0.0
	if (v <= -2e+115)
		tmp = Float64(t_0 + Float64(Float64(Float64(r * Float64(r * w)) * Float64(w * -0.25)) + -1.5));
	else
		tmp = Float64(Float64(Float64(t_0 + 3.0) + Float64(Float64(Float64(Float64(r * w) * Float64(r * w)) * Float64(0.125 * Float64(Float64(v * 2.0) - 3.0))) / Float64(1.0 - v))) - 4.5);
	end
	return tmp
end
function tmp_2 = code(v, w, r)
	t_0 = 2.0 / (r * r);
	tmp = 0.0;
	if (v <= -2e+115)
		tmp = t_0 + (((r * (r * w)) * (w * -0.25)) + -1.5);
	else
		tmp = ((t_0 + 3.0) + ((((r * w) * (r * w)) * (0.125 * ((v * 2.0) - 3.0))) / (1.0 - v))) - 4.5;
	end
	tmp_2 = tmp;
end
code[v_, w_, r_] := Block[{t$95$0 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[v, -2e+115], N[(t$95$0 + N[(N[(N[(r * N[(r * w), $MachinePrecision]), $MachinePrecision] * N[(w * -0.25), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$0 + 3.0), $MachinePrecision] + N[(N[(N[(N[(r * w), $MachinePrecision] * N[(r * w), $MachinePrecision]), $MachinePrecision] * N[(0.125 * N[(N[(v * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{2}{r \cdot r}\\
\mathbf{if}\;v \leq -2 \cdot 10^{+115}:\\
\;\;\;\;t\_0 + \left(\left(r \cdot \left(r \cdot w\right)\right) \cdot \left(w \cdot -0.25\right) + -1.5\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(t\_0 + 3\right) + \frac{\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \left(0.125 \cdot \left(v \cdot 2 - 3\right)\right)}{1 - v}\right) - 4.5\\


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

    1. Initial program 84.3%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified69.2%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in v around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f6486.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    7. Simplified86.2%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. swap-sqrN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(\left(r \cdot w\right) \cdot r\right) \cdot w\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot w\right) \cdot r\right) \cdot \left(w \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot w\right) \cdot r\right), \left(w \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(r \cdot w\right)\right), \left(w \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(r \cdot w\right)\right), \left(w \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, w\right)\right), \left(w \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f6499.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, w\right)\right), \mathsf{*.f64}\left(w, \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    9. Applied egg-rr99.9%

      \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot \left(r \cdot w\right)\right) \cdot \left(w \cdot -0.25\right)} + -1.5\right) \]

    if -2e115 < v

    1. Initial program 81.2%

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{8}, \mathsf{\_.f64}\left(3, \mathsf{*.f64}\left(2, v\right)\right)\right), \left(\left(w \cdot w\right) \cdot \left(r \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      2. unswap-sqrN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{8}, \mathsf{\_.f64}\left(3, \mathsf{*.f64}\left(2, v\right)\right)\right), \left(\left(w \cdot r\right) \cdot \left(w \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{8}, \mathsf{\_.f64}\left(3, \mathsf{*.f64}\left(2, v\right)\right)\right), \mathsf{*.f64}\left(\left(w \cdot r\right), \left(w \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{8}, \mathsf{\_.f64}\left(3, \mathsf{*.f64}\left(2, v\right)\right)\right), \mathsf{*.f64}\left(\left(r \cdot w\right), \left(w \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{8}, \mathsf{\_.f64}\left(3, \mathsf{*.f64}\left(2, v\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(w \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{8}, \mathsf{\_.f64}\left(3, \mathsf{*.f64}\left(2, v\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(r \cdot w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      7. *-lowering-*.f6499.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{8}, \mathsf{\_.f64}\left(3, \mathsf{*.f64}\left(2, v\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(r, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
    4. Applied egg-rr99.3%

      \[\leadsto \left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \color{blue}{\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right)}}{1 - v}\right) - 4.5 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -2 \cdot 10^{+115}:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(\left(r \cdot \left(r \cdot w\right)\right) \cdot \left(w \cdot -0.25\right) + -1.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{2}{r \cdot r} + 3\right) + \frac{\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \left(0.125 \cdot \left(v \cdot 2 - 3\right)\right)}{1 - v}\right) - 4.5\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 95.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{2}{r \cdot r}\\ \mathbf{if}\;w \cdot w \leq 10^{+223}:\\ \;\;\;\;t\_0 + \left(-1.5 + \frac{r \cdot \left(w \cdot \left(\left(r \cdot w\right) \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \left(-1.5 + \left(w \cdot \left(\left(r \cdot r\right) \cdot w\right)\right) \cdot -0.375\right)\\ \end{array} \end{array} \]
(FPCore (v w r)
 :precision binary64
 (let* ((t_0 (/ 2.0 (* r r))))
   (if (<= (* w w) 1e+223)
     (+
      t_0
      (+ -1.5 (/ (* r (* w (* (* r w) (+ 0.375 (* v -0.25))))) (+ v -1.0))))
     (+ t_0 (+ -1.5 (* (* w (* (* r r) w)) -0.375))))))
double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double tmp;
	if ((w * w) <= 1e+223) {
		tmp = t_0 + (-1.5 + ((r * (w * ((r * w) * (0.375 + (v * -0.25))))) / (v + -1.0)));
	} else {
		tmp = t_0 + (-1.5 + ((w * ((r * r) * w)) * -0.375));
	}
	return tmp;
}
real(8) function code(v, w, r)
    real(8), intent (in) :: v
    real(8), intent (in) :: w
    real(8), intent (in) :: r
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 2.0d0 / (r * r)
    if ((w * w) <= 1d+223) then
        tmp = t_0 + ((-1.5d0) + ((r * (w * ((r * w) * (0.375d0 + (v * (-0.25d0)))))) / (v + (-1.0d0))))
    else
        tmp = t_0 + ((-1.5d0) + ((w * ((r * r) * w)) * (-0.375d0)))
    end if
    code = tmp
end function
public static double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double tmp;
	if ((w * w) <= 1e+223) {
		tmp = t_0 + (-1.5 + ((r * (w * ((r * w) * (0.375 + (v * -0.25))))) / (v + -1.0)));
	} else {
		tmp = t_0 + (-1.5 + ((w * ((r * r) * w)) * -0.375));
	}
	return tmp;
}
def code(v, w, r):
	t_0 = 2.0 / (r * r)
	tmp = 0
	if (w * w) <= 1e+223:
		tmp = t_0 + (-1.5 + ((r * (w * ((r * w) * (0.375 + (v * -0.25))))) / (v + -1.0)))
	else:
		tmp = t_0 + (-1.5 + ((w * ((r * r) * w)) * -0.375))
	return tmp
function code(v, w, r)
	t_0 = Float64(2.0 / Float64(r * r))
	tmp = 0.0
	if (Float64(w * w) <= 1e+223)
		tmp = Float64(t_0 + Float64(-1.5 + Float64(Float64(r * Float64(w * Float64(Float64(r * w) * Float64(0.375 + Float64(v * -0.25))))) / Float64(v + -1.0))));
	else
		tmp = Float64(t_0 + Float64(-1.5 + Float64(Float64(w * Float64(Float64(r * r) * w)) * -0.375)));
	end
	return tmp
end
function tmp_2 = code(v, w, r)
	t_0 = 2.0 / (r * r);
	tmp = 0.0;
	if ((w * w) <= 1e+223)
		tmp = t_0 + (-1.5 + ((r * (w * ((r * w) * (0.375 + (v * -0.25))))) / (v + -1.0)));
	else
		tmp = t_0 + (-1.5 + ((w * ((r * r) * w)) * -0.375));
	end
	tmp_2 = tmp;
end
code[v_, w_, r_] := Block[{t$95$0 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(w * w), $MachinePrecision], 1e+223], N[(t$95$0 + N[(-1.5 + N[(N[(r * N[(w * N[(N[(r * w), $MachinePrecision] * N[(0.375 + N[(v * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(v + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(-1.5 + N[(N[(w * N[(N[(r * r), $MachinePrecision] * w), $MachinePrecision]), $MachinePrecision] * -0.375), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{2}{r \cdot r}\\
\mathbf{if}\;w \cdot w \leq 10^{+223}:\\
\;\;\;\;t\_0 + \left(-1.5 + \frac{r \cdot \left(w \cdot \left(\left(r \cdot w\right) \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0 + \left(-1.5 + \left(w \cdot \left(\left(r \cdot r\right) \cdot w\right)\right) \cdot -0.375\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 w w) < 1.00000000000000005e223

    1. Initial program 95.0%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified80.3%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      12. *-lowering-*.f6495.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    6. Applied egg-rr95.0%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(0.375 + v \cdot -0.25\right)\right) \cdot r}}{v + -1} + -1.5\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(\left(r \cdot w\right) \cdot w\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot w\right)\right) \cdot w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f6499.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), \mathsf{*.f64}\left(r, w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    8. Applied egg-rr99.3%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(\left(0.375 + v \cdot -0.25\right) \cdot \left(r \cdot w\right)\right) \cdot w\right)} \cdot r}{v + -1} + -1.5\right) \]

    if 1.00000000000000005e223 < (*.f64 w w)

    1. Initial program 59.5%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified56.3%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      12. *-lowering-*.f6458.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    6. Applied egg-rr58.4%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(0.375 + v \cdot -0.25\right)\right) \cdot r}}{v + -1} + -1.5\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(\left(r \cdot w\right) \cdot w\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot w\right)\right) \cdot w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f6480.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), \mathsf{*.f64}\left(r, w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    8. Applied egg-rr80.4%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(\left(0.375 + v \cdot -0.25\right) \cdot \left(r \cdot w\right)\right) \cdot w\right)} \cdot r}{v + -1} + -1.5\right) \]
    9. Taylor expanded in v around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\frac{3}{8} \cdot \left(r \cdot w\right)\right)}, w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot w\right) \cdot \frac{3}{8}\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f6474.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    11. Simplified74.1%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\left(\color{blue}{\left(r \cdot \left(w \cdot 0.375\right)\right)} \cdot w\right) \cdot r}{v + -1} + -1.5\right) \]
    12. Taylor expanded in v around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-3}{8} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2} \cdot {w}^{2}\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({w}^{2} \cdot {r}^{2}\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot {r}^{2}\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(w \cdot \left(w \cdot {r}^{2}\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \left(w \cdot {r}^{2}\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(w, \left({r}^{2}\right)\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(w, \left(r \cdot r\right)\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f6497.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(r, r\right)\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
    14. Simplified97.4%

      \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(w \cdot \left(w \cdot \left(r \cdot r\right)\right)\right) \cdot -0.375} + -1.5\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \cdot w \leq 10^{+223}:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 + \frac{r \cdot \left(w \cdot \left(\left(r \cdot w\right) \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 + \left(w \cdot \left(\left(r \cdot r\right) \cdot w\right)\right) \cdot -0.375\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 95.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{2}{r \cdot r}\\ \mathbf{if}\;w \cdot w \leq 10^{+114}:\\ \;\;\;\;t\_0 + \left(-1.5 + \frac{r \cdot \left(\left(r \cdot w\right) \cdot \left(w \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \left(-1.5 + \left(w \cdot \left(\left(r \cdot r\right) \cdot w\right)\right) \cdot -0.375\right)\\ \end{array} \end{array} \]
(FPCore (v w r)
 :precision binary64
 (let* ((t_0 (/ 2.0 (* r r))))
   (if (<= (* w w) 1e+114)
     (+
      t_0
      (+ -1.5 (/ (* r (* (* r w) (* w (+ 0.375 (* v -0.25))))) (+ v -1.0))))
     (+ t_0 (+ -1.5 (* (* w (* (* r r) w)) -0.375))))))
double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double tmp;
	if ((w * w) <= 1e+114) {
		tmp = t_0 + (-1.5 + ((r * ((r * w) * (w * (0.375 + (v * -0.25))))) / (v + -1.0)));
	} else {
		tmp = t_0 + (-1.5 + ((w * ((r * r) * w)) * -0.375));
	}
	return tmp;
}
real(8) function code(v, w, r)
    real(8), intent (in) :: v
    real(8), intent (in) :: w
    real(8), intent (in) :: r
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 2.0d0 / (r * r)
    if ((w * w) <= 1d+114) then
        tmp = t_0 + ((-1.5d0) + ((r * ((r * w) * (w * (0.375d0 + (v * (-0.25d0)))))) / (v + (-1.0d0))))
    else
        tmp = t_0 + ((-1.5d0) + ((w * ((r * r) * w)) * (-0.375d0)))
    end if
    code = tmp
end function
public static double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double tmp;
	if ((w * w) <= 1e+114) {
		tmp = t_0 + (-1.5 + ((r * ((r * w) * (w * (0.375 + (v * -0.25))))) / (v + -1.0)));
	} else {
		tmp = t_0 + (-1.5 + ((w * ((r * r) * w)) * -0.375));
	}
	return tmp;
}
def code(v, w, r):
	t_0 = 2.0 / (r * r)
	tmp = 0
	if (w * w) <= 1e+114:
		tmp = t_0 + (-1.5 + ((r * ((r * w) * (w * (0.375 + (v * -0.25))))) / (v + -1.0)))
	else:
		tmp = t_0 + (-1.5 + ((w * ((r * r) * w)) * -0.375))
	return tmp
function code(v, w, r)
	t_0 = Float64(2.0 / Float64(r * r))
	tmp = 0.0
	if (Float64(w * w) <= 1e+114)
		tmp = Float64(t_0 + Float64(-1.5 + Float64(Float64(r * Float64(Float64(r * w) * Float64(w * Float64(0.375 + Float64(v * -0.25))))) / Float64(v + -1.0))));
	else
		tmp = Float64(t_0 + Float64(-1.5 + Float64(Float64(w * Float64(Float64(r * r) * w)) * -0.375)));
	end
	return tmp
end
function tmp_2 = code(v, w, r)
	t_0 = 2.0 / (r * r);
	tmp = 0.0;
	if ((w * w) <= 1e+114)
		tmp = t_0 + (-1.5 + ((r * ((r * w) * (w * (0.375 + (v * -0.25))))) / (v + -1.0)));
	else
		tmp = t_0 + (-1.5 + ((w * ((r * r) * w)) * -0.375));
	end
	tmp_2 = tmp;
end
code[v_, w_, r_] := Block[{t$95$0 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(w * w), $MachinePrecision], 1e+114], N[(t$95$0 + N[(-1.5 + N[(N[(r * N[(N[(r * w), $MachinePrecision] * N[(w * N[(0.375 + N[(v * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(v + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(-1.5 + N[(N[(w * N[(N[(r * r), $MachinePrecision] * w), $MachinePrecision]), $MachinePrecision] * -0.375), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{2}{r \cdot r}\\
\mathbf{if}\;w \cdot w \leq 10^{+114}:\\
\;\;\;\;t\_0 + \left(-1.5 + \frac{r \cdot \left(\left(r \cdot w\right) \cdot \left(w \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0 + \left(-1.5 + \left(w \cdot \left(\left(r \cdot r\right) \cdot w\right)\right) \cdot -0.375\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 w w) < 1e114

    1. Initial program 94.7%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified83.2%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      12. *-lowering-*.f6494.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    6. Applied egg-rr94.8%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(r \cdot w\right) \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot w\right) \cdot \left(w \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot w\right), \left(w \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(w \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(w, \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(w, \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    8. Applied egg-rr99.8%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot w\right) \cdot \left(w \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)} \cdot r}{v + -1} + -1.5\right) \]

    if 1e114 < (*.f64 w w)

    1. Initial program 67.2%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified58.0%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      12. *-lowering-*.f6466.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    6. Applied egg-rr66.3%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(0.375 + v \cdot -0.25\right)\right) \cdot r}}{v + -1} + -1.5\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(\left(r \cdot w\right) \cdot w\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot w\right)\right) \cdot w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f6483.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), \mathsf{*.f64}\left(r, w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    8. Applied egg-rr83.7%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(\left(0.375 + v \cdot -0.25\right) \cdot \left(r \cdot w\right)\right) \cdot w\right)} \cdot r}{v + -1} + -1.5\right) \]
    9. Taylor expanded in v around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\frac{3}{8} \cdot \left(r \cdot w\right)\right)}, w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot w\right) \cdot \frac{3}{8}\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f6476.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    11. Simplified76.2%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\left(\color{blue}{\left(r \cdot \left(w \cdot 0.375\right)\right)} \cdot w\right) \cdot r}{v + -1} + -1.5\right) \]
    12. Taylor expanded in v around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-3}{8} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2} \cdot {w}^{2}\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({w}^{2} \cdot {r}^{2}\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot {r}^{2}\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(w \cdot \left(w \cdot {r}^{2}\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \left(w \cdot {r}^{2}\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(w, \left({r}^{2}\right)\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(w, \left(r \cdot r\right)\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f6496.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(r, r\right)\right)\right), \frac{-3}{8}\right), \frac{-3}{2}\right)\right) \]
    14. Simplified96.6%

      \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(w \cdot \left(w \cdot \left(r \cdot r\right)\right)\right) \cdot -0.375} + -1.5\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \cdot w \leq 10^{+114}:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 + \frac{r \cdot \left(\left(r \cdot w\right) \cdot \left(w \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 + \left(w \cdot \left(\left(r \cdot r\right) \cdot w\right)\right) \cdot -0.375\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 97.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{2}{r \cdot r}\\ t_1 := t\_0 + \left(-1.5 + \left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)\right)\\ \mathbf{if}\;v \leq -2.1 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;v \leq 7 \cdot 10^{-10}:\\ \;\;\;\;t\_0 + \left(-1.5 + \frac{r \cdot \left(w \cdot \left(r \cdot \left(w \cdot 0.375\right)\right)\right)}{v + -1}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (v w r)
 :precision binary64
 (let* ((t_0 (/ 2.0 (* r r)))
        (t_1 (+ t_0 (+ -1.5 (* (* r w) (* (* r w) -0.25))))))
   (if (<= v -2.1e+28)
     t_1
     (if (<= v 7e-10)
       (+ t_0 (+ -1.5 (/ (* r (* w (* r (* w 0.375)))) (+ v -1.0))))
       t_1))))
double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double t_1 = t_0 + (-1.5 + ((r * w) * ((r * w) * -0.25)));
	double tmp;
	if (v <= -2.1e+28) {
		tmp = t_1;
	} else if (v <= 7e-10) {
		tmp = t_0 + (-1.5 + ((r * (w * (r * (w * 0.375)))) / (v + -1.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(v, w, r)
    real(8), intent (in) :: v
    real(8), intent (in) :: w
    real(8), intent (in) :: r
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = 2.0d0 / (r * r)
    t_1 = t_0 + ((-1.5d0) + ((r * w) * ((r * w) * (-0.25d0))))
    if (v <= (-2.1d+28)) then
        tmp = t_1
    else if (v <= 7d-10) then
        tmp = t_0 + ((-1.5d0) + ((r * (w * (r * (w * 0.375d0)))) / (v + (-1.0d0))))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double t_1 = t_0 + (-1.5 + ((r * w) * ((r * w) * -0.25)));
	double tmp;
	if (v <= -2.1e+28) {
		tmp = t_1;
	} else if (v <= 7e-10) {
		tmp = t_0 + (-1.5 + ((r * (w * (r * (w * 0.375)))) / (v + -1.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(v, w, r):
	t_0 = 2.0 / (r * r)
	t_1 = t_0 + (-1.5 + ((r * w) * ((r * w) * -0.25)))
	tmp = 0
	if v <= -2.1e+28:
		tmp = t_1
	elif v <= 7e-10:
		tmp = t_0 + (-1.5 + ((r * (w * (r * (w * 0.375)))) / (v + -1.0)))
	else:
		tmp = t_1
	return tmp
function code(v, w, r)
	t_0 = Float64(2.0 / Float64(r * r))
	t_1 = Float64(t_0 + Float64(-1.5 + Float64(Float64(r * w) * Float64(Float64(r * w) * -0.25))))
	tmp = 0.0
	if (v <= -2.1e+28)
		tmp = t_1;
	elseif (v <= 7e-10)
		tmp = Float64(t_0 + Float64(-1.5 + Float64(Float64(r * Float64(w * Float64(r * Float64(w * 0.375)))) / Float64(v + -1.0))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(v, w, r)
	t_0 = 2.0 / (r * r);
	t_1 = t_0 + (-1.5 + ((r * w) * ((r * w) * -0.25)));
	tmp = 0.0;
	if (v <= -2.1e+28)
		tmp = t_1;
	elseif (v <= 7e-10)
		tmp = t_0 + (-1.5 + ((r * (w * (r * (w * 0.375)))) / (v + -1.0)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[v_, w_, r_] := Block[{t$95$0 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(-1.5 + N[(N[(r * w), $MachinePrecision] * N[(N[(r * w), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[v, -2.1e+28], t$95$1, If[LessEqual[v, 7e-10], N[(t$95$0 + N[(-1.5 + N[(N[(r * N[(w * N[(r * N[(w * 0.375), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(v + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{2}{r \cdot r}\\
t_1 := t\_0 + \left(-1.5 + \left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)\right)\\
\mathbf{if}\;v \leq -2.1 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;v \leq 7 \cdot 10^{-10}:\\
\;\;\;\;t\_0 + \left(-1.5 + \frac{r \cdot \left(w \cdot \left(r \cdot \left(w \cdot 0.375\right)\right)\right)}{v + -1}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if v < -2.09999999999999989e28 or 6.99999999999999961e-10 < v

    1. Initial program 81.7%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified69.3%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in v around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f6480.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    7. Simplified80.1%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. swap-sqrN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\left(r \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    9. Applied egg-rr99.8%

      \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)} + -1.5\right) \]

    if -2.09999999999999989e28 < v < 6.99999999999999961e-10

    1. Initial program 81.9%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified73.7%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      12. *-lowering-*.f6481.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    6. Applied egg-rr81.9%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(0.375 + v \cdot -0.25\right)\right) \cdot r}}{v + -1} + -1.5\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(\left(r \cdot w\right) \cdot w\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot w\right)\right) \cdot w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), \left(r \cdot w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f6495.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), \mathsf{*.f64}\left(r, w\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    8. Applied egg-rr95.9%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(\left(0.375 + v \cdot -0.25\right) \cdot \left(r \cdot w\right)\right) \cdot w\right)} \cdot r}{v + -1} + -1.5\right) \]
    9. Taylor expanded in v around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\frac{3}{8} \cdot \left(r \cdot w\right)\right)}, w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot w\right) \cdot \frac{3}{8}\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f6495.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, \frac{3}{8}\right)\right), w\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    11. Simplified95.8%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\left(\color{blue}{\left(r \cdot \left(w \cdot 0.375\right)\right)} \cdot w\right) \cdot r}{v + -1} + -1.5\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;v \leq -2.1 \cdot 10^{+28}:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 + \left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)\right)\\ \mathbf{elif}\;v \leq 7 \cdot 10^{-10}:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 + \frac{r \cdot \left(w \cdot \left(r \cdot \left(w \cdot 0.375\right)\right)\right)}{v + -1}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 + \left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -0.25 \cdot \left(w \cdot w\right)\\ t_1 := \frac{2}{r \cdot r}\\ \mathbf{if}\;r \leq 2.15 \cdot 10^{-95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;r \leq 4000000000:\\ \;\;\;\;t\_1 + \left(-1.5 + \left(r \cdot r\right) \cdot t\_0\right)\\ \mathbf{elif}\;r \leq 9.2 \cdot 10^{+234}:\\ \;\;\;\;-1.5 + r \cdot \left(r \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (v w r)
 :precision binary64
 (let* ((t_0 (* -0.25 (* w w))) (t_1 (/ 2.0 (* r r))))
   (if (<= r 2.15e-95)
     t_1
     (if (<= r 4000000000.0)
       (+ t_1 (+ -1.5 (* (* r r) t_0)))
       (if (<= r 9.2e+234)
         (+ -1.5 (* r (* r t_0)))
         (* -0.375 (* r (* w (* r w)))))))))
double code(double v, double w, double r) {
	double t_0 = -0.25 * (w * w);
	double t_1 = 2.0 / (r * r);
	double tmp;
	if (r <= 2.15e-95) {
		tmp = t_1;
	} else if (r <= 4000000000.0) {
		tmp = t_1 + (-1.5 + ((r * r) * t_0));
	} else if (r <= 9.2e+234) {
		tmp = -1.5 + (r * (r * t_0));
	} else {
		tmp = -0.375 * (r * (w * (r * w)));
	}
	return tmp;
}
real(8) function code(v, w, r)
    real(8), intent (in) :: v
    real(8), intent (in) :: w
    real(8), intent (in) :: r
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (-0.25d0) * (w * w)
    t_1 = 2.0d0 / (r * r)
    if (r <= 2.15d-95) then
        tmp = t_1
    else if (r <= 4000000000.0d0) then
        tmp = t_1 + ((-1.5d0) + ((r * r) * t_0))
    else if (r <= 9.2d+234) then
        tmp = (-1.5d0) + (r * (r * t_0))
    else
        tmp = (-0.375d0) * (r * (w * (r * w)))
    end if
    code = tmp
end function
public static double code(double v, double w, double r) {
	double t_0 = -0.25 * (w * w);
	double t_1 = 2.0 / (r * r);
	double tmp;
	if (r <= 2.15e-95) {
		tmp = t_1;
	} else if (r <= 4000000000.0) {
		tmp = t_1 + (-1.5 + ((r * r) * t_0));
	} else if (r <= 9.2e+234) {
		tmp = -1.5 + (r * (r * t_0));
	} else {
		tmp = -0.375 * (r * (w * (r * w)));
	}
	return tmp;
}
def code(v, w, r):
	t_0 = -0.25 * (w * w)
	t_1 = 2.0 / (r * r)
	tmp = 0
	if r <= 2.15e-95:
		tmp = t_1
	elif r <= 4000000000.0:
		tmp = t_1 + (-1.5 + ((r * r) * t_0))
	elif r <= 9.2e+234:
		tmp = -1.5 + (r * (r * t_0))
	else:
		tmp = -0.375 * (r * (w * (r * w)))
	return tmp
function code(v, w, r)
	t_0 = Float64(-0.25 * Float64(w * w))
	t_1 = Float64(2.0 / Float64(r * r))
	tmp = 0.0
	if (r <= 2.15e-95)
		tmp = t_1;
	elseif (r <= 4000000000.0)
		tmp = Float64(t_1 + Float64(-1.5 + Float64(Float64(r * r) * t_0)));
	elseif (r <= 9.2e+234)
		tmp = Float64(-1.5 + Float64(r * Float64(r * t_0)));
	else
		tmp = Float64(-0.375 * Float64(r * Float64(w * Float64(r * w))));
	end
	return tmp
end
function tmp_2 = code(v, w, r)
	t_0 = -0.25 * (w * w);
	t_1 = 2.0 / (r * r);
	tmp = 0.0;
	if (r <= 2.15e-95)
		tmp = t_1;
	elseif (r <= 4000000000.0)
		tmp = t_1 + (-1.5 + ((r * r) * t_0));
	elseif (r <= 9.2e+234)
		tmp = -1.5 + (r * (r * t_0));
	else
		tmp = -0.375 * (r * (w * (r * w)));
	end
	tmp_2 = tmp;
end
code[v_, w_, r_] := Block[{t$95$0 = N[(-0.25 * N[(w * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[r, 2.15e-95], t$95$1, If[LessEqual[r, 4000000000.0], N[(t$95$1 + N[(-1.5 + N[(N[(r * r), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[r, 9.2e+234], N[(-1.5 + N[(r * N[(r * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.375 * N[(r * N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := -0.25 \cdot \left(w \cdot w\right)\\
t_1 := \frac{2}{r \cdot r}\\
\mathbf{if}\;r \leq 2.15 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;r \leq 4000000000:\\
\;\;\;\;t\_1 + \left(-1.5 + \left(r \cdot r\right) \cdot t\_0\right)\\

\mathbf{elif}\;r \leq 9.2 \cdot 10^{+234}:\\
\;\;\;\;-1.5 + r \cdot \left(r \cdot t\_0\right)\\

\mathbf{else}:\\
\;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if r < 2.14999999999999999e-95

    1. Initial program 77.2%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified65.8%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in r around 0

      \[\leadsto \color{blue}{\frac{2}{{r}^{2}}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left({r}^{2}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(r \cdot \color{blue}{r}\right)\right) \]
      3. *-lowering-*.f6452.4%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right) \]
    7. Simplified52.4%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r}} \]

    if 2.14999999999999999e-95 < r < 4e9

    1. Initial program 91.7%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified91.6%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in v around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f6485.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    7. Simplified85.4%

      \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot -0.25\right)} + -1.5\right) \]

    if 4e9 < r < 9.2000000000000004e234

    1. Initial program 100.0%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified89.3%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in v around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f6487.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    7. Simplified87.1%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. swap-sqrN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\left(r \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f6495.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    9. Applied egg-rr95.6%

      \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)} + -1.5\right) \]
    10. Taylor expanded in r around inf

      \[\leadsto \color{blue}{{r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)} \]
    11. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({r}^{2}\right), \color{blue}{\left(\frac{-1}{4} \cdot {w}^{2} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(r \cdot r\right), \left(\color{blue}{\frac{-1}{4} \cdot {w}^{2}} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\color{blue}{\frac{-1}{4} \cdot {w}^{2}} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot {w}^{2}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left({w}^{2}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{3}{2} \cdot \frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left(w \cdot w\right)\right), \left(\mathsf{neg}\left(\frac{3}{2} \cdot \color{blue}{\frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{3}{2} \cdot \color{blue}{\frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
      9. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{\frac{3}{2} \cdot 1}{{r}^{2}}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{\frac{3}{2}}{{r}^{2}}\right)\right)\right)\right) \]
      11. distribute-neg-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{\mathsf{neg}\left(\frac{3}{2}\right)}{\color{blue}{{r}^{2}}}\right)\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{\frac{-3}{2}}{{\color{blue}{r}}^{2}}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \color{blue}{\left({r}^{2}\right)}\right)\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \left(r \cdot \color{blue}{r}\right)\right)\right)\right) \]
      15. *-lowering-*.f6487.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right)\right)\right) \]
    12. Simplified87.1%

      \[\leadsto \color{blue}{\left(r \cdot r\right) \cdot \left(-0.25 \cdot \left(w \cdot w\right) + \frac{-1.5}{r \cdot r}\right)} \]
    13. Step-by-step derivation
      1. distribute-rgt-inN/A

        \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \color{blue}{\frac{\frac{-3}{2}}{r \cdot r} \cdot \left(r \cdot r\right)} \]
      2. div-invN/A

        \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \left(\frac{-3}{2} \cdot \frac{1}{r \cdot r}\right) \cdot \left(\color{blue}{r} \cdot r\right) \]
      3. associate-*l*N/A

        \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot \color{blue}{\left(\frac{1}{r \cdot r} \cdot \left(r \cdot r\right)\right)} \]
      4. inv-powN/A

        \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot \left({\left(r \cdot r\right)}^{-1} \cdot \left(\color{blue}{r} \cdot r\right)\right) \]
      5. pow-plusN/A

        \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot {\left(r \cdot r\right)}^{\color{blue}{\left(-1 + 1\right)}} \]
      6. metadata-evalN/A

        \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot {\left(r \cdot r\right)}^{0} \]
      7. metadata-evalN/A

        \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot 1 \]
      8. metadata-evalN/A

        \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right)\right), \color{blue}{\frac{-3}{2}}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(r \cdot r\right) \cdot \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right)\right), \frac{-3}{2}\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\left(r \cdot \left(r \cdot \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right)\right)\right), \frac{-3}{2}\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \left(r \cdot \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right)\right)\right), \frac{-3}{2}\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right)\right)\right), \frac{-3}{2}\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left(\left(w \cdot w\right) \cdot \frac{-1}{4}\right)\right)\right), \frac{-3}{2}\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right)\right), \frac{-3}{2}\right) \]
      16. *-lowering-*.f6495.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right)\right), \frac{-3}{2}\right) \]
    14. Applied egg-rr95.7%

      \[\leadsto \color{blue}{r \cdot \left(r \cdot \left(\left(w \cdot w\right) \cdot -0.25\right)\right) + -1.5} \]

    if 9.2000000000000004e234 < r

    1. Initial program 76.8%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified62.5%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      12. *-lowering-*.f6476.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
    6. Applied egg-rr76.8%

      \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(0.375 + v \cdot -0.25\right)\right) \cdot r}}{v + -1} + -1.5\right) \]
    7. Taylor expanded in r around inf

      \[\leadsto \color{blue}{\frac{{r}^{2} \cdot \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)}{v - 1}} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \color{blue}{\left(v - 1\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(\color{blue}{v} - 1\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{-1}{4} \cdot v\right)\right)\right)\right), \left(v - 1\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right)\right), \left(v - 1\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v - 1\right)\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v + -1\right)\right) \]
      13. +-lowering-+.f6462.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \mathsf{+.f64}\left(v, \color{blue}{-1}\right)\right) \]
    9. Simplified62.5%

      \[\leadsto \color{blue}{\frac{\left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot \left(0.375 + v \cdot -0.25\right)\right)}{v + -1}} \]
    10. Taylor expanded in v around 0

      \[\leadsto \color{blue}{\frac{-3}{8} \cdot \left({r}^{2} \cdot {w}^{2}\right)} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({r}^{2} \cdot {w}^{2}\right) \cdot \color{blue}{\frac{-3}{8}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({r}^{2} \cdot {w}^{2}\right), \color{blue}{\frac{-3}{8}}\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(r \cdot r\right) \cdot {w}^{2}\right), \frac{-3}{8}\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(r \cdot \left(r \cdot {w}^{2}\right)\right), \frac{-3}{8}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(r \cdot {w}^{2}\right)\right), \frac{-3}{8}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left({w}^{2}\right)\right)\right), \frac{-3}{8}\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left(w \cdot w\right)\right)\right), \frac{-3}{8}\right) \]
      8. *-lowering-*.f6476.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \frac{-3}{8}\right) \]
    12. Simplified76.1%

      \[\leadsto \color{blue}{\left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right) \cdot -0.375} \]
    13. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(\left(r \cdot w\right) \cdot w\right)\right), \frac{-3}{8}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\left(r \cdot w\right), w\right)\right), \frac{-3}{8}\right) \]
      3. *-lowering-*.f6487.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), w\right)\right), \frac{-3}{8}\right) \]
    14. Applied egg-rr87.5%

      \[\leadsto \left(r \cdot \color{blue}{\left(\left(r \cdot w\right) \cdot w\right)}\right) \cdot -0.375 \]
  3. Recombined 4 regimes into one program.
  4. Final simplification63.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;r \leq 2.15 \cdot 10^{-95}:\\ \;\;\;\;\frac{2}{r \cdot r}\\ \mathbf{elif}\;r \leq 4000000000:\\ \;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 + \left(r \cdot r\right) \cdot \left(-0.25 \cdot \left(w \cdot w\right)\right)\right)\\ \mathbf{elif}\;r \leq 9.2 \cdot 10^{+234}:\\ \;\;\;\;-1.5 + r \cdot \left(r \cdot \left(-0.25 \cdot \left(w \cdot w\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 71.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 0.0066:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{elif}\;r \leq 4.7 \cdot 10^{+235}:\\ \;\;\;\;-1.5 + r \cdot \left(r \cdot \left(-0.25 \cdot \left(w \cdot w\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (v w r)
 :precision binary64
 (if (<= r 0.0066)
   (+ (/ 2.0 (* r r)) -1.5)
   (if (<= r 4.7e+235)
     (+ -1.5 (* r (* r (* -0.25 (* w w)))))
     (* -0.375 (* r (* w (* r w)))))))
double code(double v, double w, double r) {
	double tmp;
	if (r <= 0.0066) {
		tmp = (2.0 / (r * r)) + -1.5;
	} else if (r <= 4.7e+235) {
		tmp = -1.5 + (r * (r * (-0.25 * (w * w))));
	} else {
		tmp = -0.375 * (r * (w * (r * w)));
	}
	return tmp;
}
real(8) function code(v, w, r)
    real(8), intent (in) :: v
    real(8), intent (in) :: w
    real(8), intent (in) :: r
    real(8) :: tmp
    if (r <= 0.0066d0) then
        tmp = (2.0d0 / (r * r)) + (-1.5d0)
    else if (r <= 4.7d+235) then
        tmp = (-1.5d0) + (r * (r * ((-0.25d0) * (w * w))))
    else
        tmp = (-0.375d0) * (r * (w * (r * w)))
    end if
    code = tmp
end function
public static double code(double v, double w, double r) {
	double tmp;
	if (r <= 0.0066) {
		tmp = (2.0 / (r * r)) + -1.5;
	} else if (r <= 4.7e+235) {
		tmp = -1.5 + (r * (r * (-0.25 * (w * w))));
	} else {
		tmp = -0.375 * (r * (w * (r * w)));
	}
	return tmp;
}
def code(v, w, r):
	tmp = 0
	if r <= 0.0066:
		tmp = (2.0 / (r * r)) + -1.5
	elif r <= 4.7e+235:
		tmp = -1.5 + (r * (r * (-0.25 * (w * w))))
	else:
		tmp = -0.375 * (r * (w * (r * w)))
	return tmp
function code(v, w, r)
	tmp = 0.0
	if (r <= 0.0066)
		tmp = Float64(Float64(2.0 / Float64(r * r)) + -1.5);
	elseif (r <= 4.7e+235)
		tmp = Float64(-1.5 + Float64(r * Float64(r * Float64(-0.25 * Float64(w * w)))));
	else
		tmp = Float64(-0.375 * Float64(r * Float64(w * Float64(r * w))));
	end
	return tmp
end
function tmp_2 = code(v, w, r)
	tmp = 0.0;
	if (r <= 0.0066)
		tmp = (2.0 / (r * r)) + -1.5;
	elseif (r <= 4.7e+235)
		tmp = -1.5 + (r * (r * (-0.25 * (w * w))));
	else
		tmp = -0.375 * (r * (w * (r * w)));
	end
	tmp_2 = tmp;
end
code[v_, w_, r_] := If[LessEqual[r, 0.0066], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision], If[LessEqual[r, 4.7e+235], N[(-1.5 + N[(r * N[(r * N[(-0.25 * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.375 * N[(r * N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;r \leq 0.0066:\\
\;\;\;\;\frac{2}{r \cdot r} + -1.5\\

\mathbf{elif}\;r \leq 4.7 \cdot 10^{+235}:\\
\;\;\;\;-1.5 + r \cdot \left(r \cdot \left(-0.25 \cdot \left(w \cdot w\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if r < 0.0066

    1. Initial program 78.4%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified68.1%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in r around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \color{blue}{\frac{-3}{2}}\right) \]
    6. Step-by-step derivation
      1. Simplified67.3%

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{-1.5} \]

      if 0.0066 < r < 4.6999999999999999e235

      1. Initial program 99.9%

        \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
      2. Step-by-step derivation
        1. associate--l-N/A

          \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
        2. +-commutativeN/A

          \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
        3. associate--l+N/A

          \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
        7. associate--r+N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
        8. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
        10. associate--l+N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
        13. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
      3. Simplified90.2%

        \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in v around inf

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
        10. *-lowering-*.f6484.5%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      7. Simplified84.5%

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
        2. swap-sqrN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\left(r \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
        7. *-lowering-*.f6492.1%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      9. Applied egg-rr92.1%

        \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)} + -1.5\right) \]
      10. Taylor expanded in r around inf

        \[\leadsto \color{blue}{{r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)} \]
      11. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({r}^{2}\right), \color{blue}{\left(\frac{-1}{4} \cdot {w}^{2} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)}\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\left(r \cdot r\right), \left(\color{blue}{\frac{-1}{4} \cdot {w}^{2}} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\color{blue}{\frac{-1}{4} \cdot {w}^{2}} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot {w}^{2}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)}\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left({w}^{2}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{3}{2} \cdot \frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left(w \cdot w\right)\right), \left(\mathsf{neg}\left(\frac{3}{2} \cdot \color{blue}{\frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{3}{2} \cdot \color{blue}{\frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{\frac{3}{2} \cdot 1}{{r}^{2}}\right)\right)\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{\frac{3}{2}}{{r}^{2}}\right)\right)\right)\right) \]
        11. distribute-neg-fracN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{\mathsf{neg}\left(\frac{3}{2}\right)}{\color{blue}{{r}^{2}}}\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{\frac{-3}{2}}{{\color{blue}{r}}^{2}}\right)\right)\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \color{blue}{\left({r}^{2}\right)}\right)\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \left(r \cdot \color{blue}{r}\right)\right)\right)\right) \]
        15. *-lowering-*.f6484.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right)\right)\right) \]
      12. Simplified84.4%

        \[\leadsto \color{blue}{\left(r \cdot r\right) \cdot \left(-0.25 \cdot \left(w \cdot w\right) + \frac{-1.5}{r \cdot r}\right)} \]
      13. Step-by-step derivation
        1. distribute-rgt-inN/A

          \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \color{blue}{\frac{\frac{-3}{2}}{r \cdot r} \cdot \left(r \cdot r\right)} \]
        2. div-invN/A

          \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \left(\frac{-3}{2} \cdot \frac{1}{r \cdot r}\right) \cdot \left(\color{blue}{r} \cdot r\right) \]
        3. associate-*l*N/A

          \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot \color{blue}{\left(\frac{1}{r \cdot r} \cdot \left(r \cdot r\right)\right)} \]
        4. inv-powN/A

          \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot \left({\left(r \cdot r\right)}^{-1} \cdot \left(\color{blue}{r} \cdot r\right)\right) \]
        5. pow-plusN/A

          \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot {\left(r \cdot r\right)}^{\color{blue}{\left(-1 + 1\right)}} \]
        6. metadata-evalN/A

          \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot {\left(r \cdot r\right)}^{0} \]
        7. metadata-evalN/A

          \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \cdot 1 \]
        8. metadata-evalN/A

          \[\leadsto \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right) + \frac{-3}{2} \]
        9. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right) \cdot \left(r \cdot r\right)\right), \color{blue}{\frac{-3}{2}}\right) \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\left(\left(r \cdot r\right) \cdot \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right)\right), \frac{-3}{2}\right) \]
        11. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\left(r \cdot \left(r \cdot \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right)\right)\right), \frac{-3}{2}\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \left(r \cdot \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right)\right)\right), \frac{-3}{2}\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left(\frac{-1}{4} \cdot \left(w \cdot w\right)\right)\right)\right), \frac{-3}{2}\right) \]
        14. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left(\left(w \cdot w\right) \cdot \frac{-1}{4}\right)\right)\right), \frac{-3}{2}\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right)\right), \frac{-3}{2}\right) \]
        16. *-lowering-*.f6492.2%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right)\right), \frac{-3}{2}\right) \]
      14. Applied egg-rr92.2%

        \[\leadsto \color{blue}{r \cdot \left(r \cdot \left(\left(w \cdot w\right) \cdot -0.25\right)\right) + -1.5} \]

      if 4.6999999999999999e235 < r

      1. Initial program 76.8%

        \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
      2. Step-by-step derivation
        1. associate--l-N/A

          \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
        2. +-commutativeN/A

          \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
        3. associate--l+N/A

          \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
        7. associate--r+N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
        8. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
        10. associate--l+N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
        13. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
      3. Simplified62.5%

        \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. associate-*l*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        5. associate-*r*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        12. *-lowering-*.f6476.8%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
      6. Applied egg-rr76.8%

        \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(0.375 + v \cdot -0.25\right)\right) \cdot r}}{v + -1} + -1.5\right) \]
      7. Taylor expanded in r around inf

        \[\leadsto \color{blue}{\frac{{r}^{2} \cdot \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)}{v - 1}} \]
      8. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \color{blue}{\left(v - 1\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(\color{blue}{v} - 1\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
        8. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{-1}{4} \cdot v\right)\right)\right)\right), \left(v - 1\right)\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right)\right), \left(v - 1\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v - 1\right)\right) \]
        11. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v + -1\right)\right) \]
        13. +-lowering-+.f6462.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \mathsf{+.f64}\left(v, \color{blue}{-1}\right)\right) \]
      9. Simplified62.5%

        \[\leadsto \color{blue}{\frac{\left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot \left(0.375 + v \cdot -0.25\right)\right)}{v + -1}} \]
      10. Taylor expanded in v around 0

        \[\leadsto \color{blue}{\frac{-3}{8} \cdot \left({r}^{2} \cdot {w}^{2}\right)} \]
      11. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left({r}^{2} \cdot {w}^{2}\right) \cdot \color{blue}{\frac{-3}{8}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({r}^{2} \cdot {w}^{2}\right), \color{blue}{\frac{-3}{8}}\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\left(r \cdot r\right) \cdot {w}^{2}\right), \frac{-3}{8}\right) \]
        4. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\left(r \cdot \left(r \cdot {w}^{2}\right)\right), \frac{-3}{8}\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(r \cdot {w}^{2}\right)\right), \frac{-3}{8}\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left({w}^{2}\right)\right)\right), \frac{-3}{8}\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left(w \cdot w\right)\right)\right), \frac{-3}{8}\right) \]
        8. *-lowering-*.f6476.1%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \frac{-3}{8}\right) \]
      12. Simplified76.1%

        \[\leadsto \color{blue}{\left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right) \cdot -0.375} \]
      13. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(\left(r \cdot w\right) \cdot w\right)\right), \frac{-3}{8}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\left(r \cdot w\right), w\right)\right), \frac{-3}{8}\right) \]
        3. *-lowering-*.f6487.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), w\right)\right), \frac{-3}{8}\right) \]
      14. Applied egg-rr87.5%

        \[\leadsto \left(r \cdot \color{blue}{\left(\left(r \cdot w\right) \cdot w\right)}\right) \cdot -0.375 \]
    7. Recombined 3 regimes into one program.
    8. Final simplification72.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;r \leq 0.0066:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{elif}\;r \leq 4.7 \cdot 10^{+235}:\\ \;\;\;\;-1.5 + r \cdot \left(r \cdot \left(-0.25 \cdot \left(w \cdot w\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 7: 93.1% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \frac{2}{r \cdot r} + \left(-1.5 + \left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)\right) \end{array} \]
    (FPCore (v w r)
     :precision binary64
     (+ (/ 2.0 (* r r)) (+ -1.5 (* (* r w) (* (* r w) -0.25)))))
    double code(double v, double w, double r) {
    	return (2.0 / (r * r)) + (-1.5 + ((r * w) * ((r * w) * -0.25)));
    }
    
    real(8) function code(v, w, r)
        real(8), intent (in) :: v
        real(8), intent (in) :: w
        real(8), intent (in) :: r
        code = (2.0d0 / (r * r)) + ((-1.5d0) + ((r * w) * ((r * w) * (-0.25d0))))
    end function
    
    public static double code(double v, double w, double r) {
    	return (2.0 / (r * r)) + (-1.5 + ((r * w) * ((r * w) * -0.25)));
    }
    
    def code(v, w, r):
    	return (2.0 / (r * r)) + (-1.5 + ((r * w) * ((r * w) * -0.25)))
    
    function code(v, w, r)
    	return Float64(Float64(2.0 / Float64(r * r)) + Float64(-1.5 + Float64(Float64(r * w) * Float64(Float64(r * w) * -0.25))))
    end
    
    function tmp = code(v, w, r)
    	tmp = (2.0 / (r * r)) + (-1.5 + ((r * w) * ((r * w) * -0.25)));
    end
    
    code[v_, w_, r_] := N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + N[(-1.5 + N[(N[(r * w), $MachinePrecision] * N[(N[(r * w), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \frac{2}{r \cdot r} + \left(-1.5 + \left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 81.8%

      \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
    2. Step-by-step derivation
      1. associate--l-N/A

        \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
      3. associate--l+N/A

        \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
      7. associate--r+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
      10. associate--l+N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in v around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      10. *-lowering-*.f6474.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    7. Simplified74.9%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      2. swap-sqrN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\left(r \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
      7. *-lowering-*.f6493.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
    9. Applied egg-rr93.8%

      \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)} + -1.5\right) \]
    10. Final simplification93.8%

      \[\leadsto \frac{2}{r \cdot r} + \left(-1.5 + \left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)\right) \]
    11. Add Preprocessing

    Alternative 8: 66.4% accurate, 2.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 2.8 \cdot 10^{+71}:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (v w r)
     :precision binary64
     (if (<= r 2.8e+71) (+ (/ 2.0 (* r r)) -1.5) (* -0.375 (* r (* w (* r w))))))
    double code(double v, double w, double r) {
    	double tmp;
    	if (r <= 2.8e+71) {
    		tmp = (2.0 / (r * r)) + -1.5;
    	} else {
    		tmp = -0.375 * (r * (w * (r * w)));
    	}
    	return tmp;
    }
    
    real(8) function code(v, w, r)
        real(8), intent (in) :: v
        real(8), intent (in) :: w
        real(8), intent (in) :: r
        real(8) :: tmp
        if (r <= 2.8d+71) then
            tmp = (2.0d0 / (r * r)) + (-1.5d0)
        else
            tmp = (-0.375d0) * (r * (w * (r * w)))
        end if
        code = tmp
    end function
    
    public static double code(double v, double w, double r) {
    	double tmp;
    	if (r <= 2.8e+71) {
    		tmp = (2.0 / (r * r)) + -1.5;
    	} else {
    		tmp = -0.375 * (r * (w * (r * w)));
    	}
    	return tmp;
    }
    
    def code(v, w, r):
    	tmp = 0
    	if r <= 2.8e+71:
    		tmp = (2.0 / (r * r)) + -1.5
    	else:
    		tmp = -0.375 * (r * (w * (r * w)))
    	return tmp
    
    function code(v, w, r)
    	tmp = 0.0
    	if (r <= 2.8e+71)
    		tmp = Float64(Float64(2.0 / Float64(r * r)) + -1.5);
    	else
    		tmp = Float64(-0.375 * Float64(r * Float64(w * Float64(r * w))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, w, r)
    	tmp = 0.0;
    	if (r <= 2.8e+71)
    		tmp = (2.0 / (r * r)) + -1.5;
    	else
    		tmp = -0.375 * (r * (w * (r * w)));
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, w_, r_] := If[LessEqual[r, 2.8e+71], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision], N[(-0.375 * N[(r * N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;r \leq 2.8 \cdot 10^{+71}:\\
    \;\;\;\;\frac{2}{r \cdot r} + -1.5\\
    
    \mathbf{else}:\\
    \;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if r < 2.80000000000000002e71

      1. Initial program 79.7%

        \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
      2. Step-by-step derivation
        1. associate--l-N/A

          \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
        2. +-commutativeN/A

          \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
        3. associate--l+N/A

          \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
        7. associate--r+N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
        8. sub-negN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
        10. associate--l+N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
        13. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
      3. Simplified70.0%

        \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in r around 0

        \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \color{blue}{\frac{-3}{2}}\right) \]
      6. Step-by-step derivation
        1. Simplified66.5%

          \[\leadsto \frac{2}{r \cdot r} + \color{blue}{-1.5} \]

        if 2.80000000000000002e71 < r

        1. Initial program 92.6%

          \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
        2. Step-by-step derivation
          1. associate--l-N/A

            \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
          2. +-commutativeN/A

            \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
          3. associate--l+N/A

            \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
          4. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
          7. associate--r+N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
          8. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
          9. +-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
          10. associate--l+N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
          13. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
        3. Simplified78.5%

          \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
        4. Add Preprocessing
        5. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          5. associate-*r*N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          12. *-lowering-*.f6492.6%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
        6. Applied egg-rr92.6%

          \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(0.375 + v \cdot -0.25\right)\right) \cdot r}}{v + -1} + -1.5\right) \]
        7. Taylor expanded in r around inf

          \[\leadsto \color{blue}{\frac{{r}^{2} \cdot \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)}{v - 1}} \]
        8. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \color{blue}{\left(v - 1\right)}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(\color{blue}{v} - 1\right)\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
          6. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
          8. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{-1}{4} \cdot v\right)\right)\right)\right), \left(v - 1\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right)\right), \left(v - 1\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v - 1\right)\right) \]
          11. sub-negN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v + -1\right)\right) \]
          13. +-lowering-+.f6466.9%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \mathsf{+.f64}\left(v, \color{blue}{-1}\right)\right) \]
        9. Simplified66.9%

          \[\leadsto \color{blue}{\frac{\left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot \left(0.375 + v \cdot -0.25\right)\right)}{v + -1}} \]
        10. Taylor expanded in v around 0

          \[\leadsto \color{blue}{\frac{-3}{8} \cdot \left({r}^{2} \cdot {w}^{2}\right)} \]
        11. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left({r}^{2} \cdot {w}^{2}\right) \cdot \color{blue}{\frac{-3}{8}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left({r}^{2} \cdot {w}^{2}\right), \color{blue}{\frac{-3}{8}}\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\left(r \cdot r\right) \cdot {w}^{2}\right), \frac{-3}{8}\right) \]
          4. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(\left(r \cdot \left(r \cdot {w}^{2}\right)\right), \frac{-3}{8}\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(r \cdot {w}^{2}\right)\right), \frac{-3}{8}\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left({w}^{2}\right)\right)\right), \frac{-3}{8}\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left(w \cdot w\right)\right)\right), \frac{-3}{8}\right) \]
          8. *-lowering-*.f6469.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \frac{-3}{8}\right) \]
        12. Simplified69.8%

          \[\leadsto \color{blue}{\left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right) \cdot -0.375} \]
        13. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(\left(r \cdot w\right) \cdot w\right)\right), \frac{-3}{8}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\left(r \cdot w\right), w\right)\right), \frac{-3}{8}\right) \]
          3. *-lowering-*.f6473.6%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), w\right)\right), \frac{-3}{8}\right) \]
        14. Applied egg-rr73.6%

          \[\leadsto \left(r \cdot \color{blue}{\left(\left(r \cdot w\right) \cdot w\right)}\right) \cdot -0.375 \]
      7. Recombined 2 regimes into one program.
      8. Final simplification67.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;r \leq 2.8 \cdot 10^{+71}:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 9: 65.6% accurate, 2.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 1.05 \cdot 10^{+71}:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot \left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right)\\ \end{array} \end{array} \]
      (FPCore (v w r)
       :precision binary64
       (if (<= r 1.05e+71) (+ (/ 2.0 (* r r)) -1.5) (* -0.375 (* r (* r (* w w))))))
      double code(double v, double w, double r) {
      	double tmp;
      	if (r <= 1.05e+71) {
      		tmp = (2.0 / (r * r)) + -1.5;
      	} else {
      		tmp = -0.375 * (r * (r * (w * w)));
      	}
      	return tmp;
      }
      
      real(8) function code(v, w, r)
          real(8), intent (in) :: v
          real(8), intent (in) :: w
          real(8), intent (in) :: r
          real(8) :: tmp
          if (r <= 1.05d+71) then
              tmp = (2.0d0 / (r * r)) + (-1.5d0)
          else
              tmp = (-0.375d0) * (r * (r * (w * w)))
          end if
          code = tmp
      end function
      
      public static double code(double v, double w, double r) {
      	double tmp;
      	if (r <= 1.05e+71) {
      		tmp = (2.0 / (r * r)) + -1.5;
      	} else {
      		tmp = -0.375 * (r * (r * (w * w)));
      	}
      	return tmp;
      }
      
      def code(v, w, r):
      	tmp = 0
      	if r <= 1.05e+71:
      		tmp = (2.0 / (r * r)) + -1.5
      	else:
      		tmp = -0.375 * (r * (r * (w * w)))
      	return tmp
      
      function code(v, w, r)
      	tmp = 0.0
      	if (r <= 1.05e+71)
      		tmp = Float64(Float64(2.0 / Float64(r * r)) + -1.5);
      	else
      		tmp = Float64(-0.375 * Float64(r * Float64(r * Float64(w * w))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(v, w, r)
      	tmp = 0.0;
      	if (r <= 1.05e+71)
      		tmp = (2.0 / (r * r)) + -1.5;
      	else
      		tmp = -0.375 * (r * (r * (w * w)));
      	end
      	tmp_2 = tmp;
      end
      
      code[v_, w_, r_] := If[LessEqual[r, 1.05e+71], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision], N[(-0.375 * N[(r * N[(r * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;r \leq 1.05 \cdot 10^{+71}:\\
      \;\;\;\;\frac{2}{r \cdot r} + -1.5\\
      
      \mathbf{else}:\\
      \;\;\;\;-0.375 \cdot \left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if r < 1.04999999999999995e71

        1. Initial program 79.7%

          \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
        2. Step-by-step derivation
          1. associate--l-N/A

            \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
          2. +-commutativeN/A

            \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
          3. associate--l+N/A

            \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
          4. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
          7. associate--r+N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
          8. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
          9. +-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
          10. associate--l+N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
          13. metadata-evalN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
        3. Simplified70.0%

          \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in r around 0

          \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \color{blue}{\frac{-3}{2}}\right) \]
        6. Step-by-step derivation
          1. Simplified66.5%

            \[\leadsto \frac{2}{r \cdot r} + \color{blue}{-1.5} \]

          if 1.04999999999999995e71 < r

          1. Initial program 92.6%

            \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
          2. Step-by-step derivation
            1. associate--l-N/A

              \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
            2. +-commutativeN/A

              \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
            3. associate--l+N/A

              \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
            4. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
            7. associate--r+N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
            8. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
            9. +-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
            10. associate--l+N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
            13. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
          3. Simplified78.5%

            \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(r \cdot \left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right)\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right) \cdot r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(\frac{3}{8} + v \cdot \frac{-1}{4}\right) \cdot \left(w \cdot w\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(\left(w \cdot w\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            5. associate-*r*N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(w \cdot w\right) \cdot r\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(r \cdot \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(w \cdot w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{3}{8} + v \cdot \frac{-1}{4}\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            11. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
            12. *-lowering-*.f6492.6%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right), r\right), \mathsf{+.f64}\left(v, -1\right)\right), \frac{-3}{2}\right)\right) \]
          6. Applied egg-rr92.6%

            \[\leadsto \frac{2}{r \cdot r} + \left(\frac{\color{blue}{\left(\left(r \cdot \left(w \cdot w\right)\right) \cdot \left(0.375 + v \cdot -0.25\right)\right) \cdot r}}{v + -1} + -1.5\right) \]
          7. Taylor expanded in r around inf

            \[\leadsto \color{blue}{\frac{{r}^{2} \cdot \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)}{v - 1}} \]
          8. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \color{blue}{\left(v - 1\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(\color{blue}{v} - 1\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
            6. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \left(\frac{3}{8} + \frac{-1}{4} \cdot v\right)\right)\right), \left(v - 1\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{-1}{4} \cdot v\right)\right)\right)\right), \left(v - 1\right)\right) \]
            9. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right)\right)\right), \left(v - 1\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v - 1\right)\right) \]
            11. sub-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \left(v + -1\right)\right) \]
            13. +-lowering-+.f6466.9%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right)\right)\right), \mathsf{+.f64}\left(v, \color{blue}{-1}\right)\right) \]
          9. Simplified66.9%

            \[\leadsto \color{blue}{\frac{\left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot \left(0.375 + v \cdot -0.25\right)\right)}{v + -1}} \]
          10. Taylor expanded in v around 0

            \[\leadsto \color{blue}{\frac{-3}{8} \cdot \left({r}^{2} \cdot {w}^{2}\right)} \]
          11. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left({r}^{2} \cdot {w}^{2}\right) \cdot \color{blue}{\frac{-3}{8}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left({r}^{2} \cdot {w}^{2}\right), \color{blue}{\frac{-3}{8}}\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\left(\left(r \cdot r\right) \cdot {w}^{2}\right), \frac{-3}{8}\right) \]
            4. associate-*l*N/A

              \[\leadsto \mathsf{*.f64}\left(\left(r \cdot \left(r \cdot {w}^{2}\right)\right), \frac{-3}{8}\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \left(r \cdot {w}^{2}\right)\right), \frac{-3}{8}\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left({w}^{2}\right)\right)\right), \frac{-3}{8}\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \left(w \cdot w\right)\right)\right), \frac{-3}{8}\right) \]
            8. *-lowering-*.f6469.8%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \frac{-3}{8}\right) \]
          12. Simplified69.8%

            \[\leadsto \color{blue}{\left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right) \cdot -0.375} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification67.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;r \leq 1.05 \cdot 10^{+71}:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot \left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 10: 64.7% accurate, 2.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 9 \cdot 10^{+70}:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{else}:\\ \;\;\;\;\left(r \cdot r\right) \cdot \left(-0.25 \cdot \left(w \cdot w\right)\right)\\ \end{array} \end{array} \]
        (FPCore (v w r)
         :precision binary64
         (if (<= r 9e+70) (+ (/ 2.0 (* r r)) -1.5) (* (* r r) (* -0.25 (* w w)))))
        double code(double v, double w, double r) {
        	double tmp;
        	if (r <= 9e+70) {
        		tmp = (2.0 / (r * r)) + -1.5;
        	} else {
        		tmp = (r * r) * (-0.25 * (w * w));
        	}
        	return tmp;
        }
        
        real(8) function code(v, w, r)
            real(8), intent (in) :: v
            real(8), intent (in) :: w
            real(8), intent (in) :: r
            real(8) :: tmp
            if (r <= 9d+70) then
                tmp = (2.0d0 / (r * r)) + (-1.5d0)
            else
                tmp = (r * r) * ((-0.25d0) * (w * w))
            end if
            code = tmp
        end function
        
        public static double code(double v, double w, double r) {
        	double tmp;
        	if (r <= 9e+70) {
        		tmp = (2.0 / (r * r)) + -1.5;
        	} else {
        		tmp = (r * r) * (-0.25 * (w * w));
        	}
        	return tmp;
        }
        
        def code(v, w, r):
        	tmp = 0
        	if r <= 9e+70:
        		tmp = (2.0 / (r * r)) + -1.5
        	else:
        		tmp = (r * r) * (-0.25 * (w * w))
        	return tmp
        
        function code(v, w, r)
        	tmp = 0.0
        	if (r <= 9e+70)
        		tmp = Float64(Float64(2.0 / Float64(r * r)) + -1.5);
        	else
        		tmp = Float64(Float64(r * r) * Float64(-0.25 * Float64(w * w)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(v, w, r)
        	tmp = 0.0;
        	if (r <= 9e+70)
        		tmp = (2.0 / (r * r)) + -1.5;
        	else
        		tmp = (r * r) * (-0.25 * (w * w));
        	end
        	tmp_2 = tmp;
        end
        
        code[v_, w_, r_] := If[LessEqual[r, 9e+70], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision], N[(N[(r * r), $MachinePrecision] * N[(-0.25 * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;r \leq 9 \cdot 10^{+70}:\\
        \;\;\;\;\frac{2}{r \cdot r} + -1.5\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(r \cdot r\right) \cdot \left(-0.25 \cdot \left(w \cdot w\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if r < 8.9999999999999999e70

          1. Initial program 79.7%

            \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
          2. Step-by-step derivation
            1. associate--l-N/A

              \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
            2. +-commutativeN/A

              \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
            3. associate--l+N/A

              \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
            4. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
            7. associate--r+N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
            8. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
            9. +-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
            10. associate--l+N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
            13. metadata-evalN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
          3. Simplified70.0%

            \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
          4. Add Preprocessing
          5. Taylor expanded in r around 0

            \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \color{blue}{\frac{-3}{2}}\right) \]
          6. Step-by-step derivation
            1. Simplified66.5%

              \[\leadsto \frac{2}{r \cdot r} + \color{blue}{-1.5} \]

            if 8.9999999999999999e70 < r

            1. Initial program 92.6%

              \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
            2. Step-by-step derivation
              1. associate--l-N/A

                \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
              2. +-commutativeN/A

                \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
              3. associate--l+N/A

                \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
              4. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
              7. associate--r+N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
              8. sub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
              9. +-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
              10. associate--l+N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
              11. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
              13. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
            3. Simplified78.5%

              \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in v around inf

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
              2. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              9. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              10. *-lowering-*.f6478.4%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
            7. Simplified78.4%

              \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot -0.25\right)} + -1.5\right) \]
            8. Taylor expanded in r around inf

              \[\leadsto \color{blue}{\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)} \]
            9. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left({r}^{2} \cdot {w}^{2}\right) \cdot \color{blue}{\frac{-1}{4}} \]
              2. associate-*l*N/A

                \[\leadsto {r}^{2} \cdot \color{blue}{\left({w}^{2} \cdot \frac{-1}{4}\right)} \]
              3. *-commutativeN/A

                \[\leadsto {r}^{2} \cdot \left(\frac{-1}{4} \cdot \color{blue}{{w}^{2}}\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left({r}^{2}\right), \color{blue}{\left(\frac{-1}{4} \cdot {w}^{2}\right)}\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\left(r \cdot r\right), \left(\color{blue}{\frac{-1}{4}} \cdot {w}^{2}\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\color{blue}{\frac{-1}{4}} \cdot {w}^{2}\right)\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \color{blue}{\frac{-1}{4}}\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \color{blue}{\frac{-1}{4}}\right)\right) \]
              9. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right) \]
              10. *-lowering-*.f6466.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right) \]
            10. Simplified66.8%

              \[\leadsto \color{blue}{\left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot -0.25\right)} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification66.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;r \leq 9 \cdot 10^{+70}:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{else}:\\ \;\;\;\;\left(r \cdot r\right) \cdot \left(-0.25 \cdot \left(w \cdot w\right)\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 11: 50.5% accurate, 2.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 0.0066:\\ \;\;\;\;\frac{2}{r \cdot r}\\ \mathbf{else}:\\ \;\;\;\;-1.5\\ \end{array} \end{array} \]
          (FPCore (v w r) :precision binary64 (if (<= r 0.0066) (/ 2.0 (* r r)) -1.5))
          double code(double v, double w, double r) {
          	double tmp;
          	if (r <= 0.0066) {
          		tmp = 2.0 / (r * r);
          	} else {
          		tmp = -1.5;
          	}
          	return tmp;
          }
          
          real(8) function code(v, w, r)
              real(8), intent (in) :: v
              real(8), intent (in) :: w
              real(8), intent (in) :: r
              real(8) :: tmp
              if (r <= 0.0066d0) then
                  tmp = 2.0d0 / (r * r)
              else
                  tmp = -1.5d0
              end if
              code = tmp
          end function
          
          public static double code(double v, double w, double r) {
          	double tmp;
          	if (r <= 0.0066) {
          		tmp = 2.0 / (r * r);
          	} else {
          		tmp = -1.5;
          	}
          	return tmp;
          }
          
          def code(v, w, r):
          	tmp = 0
          	if r <= 0.0066:
          		tmp = 2.0 / (r * r)
          	else:
          		tmp = -1.5
          	return tmp
          
          function code(v, w, r)
          	tmp = 0.0
          	if (r <= 0.0066)
          		tmp = Float64(2.0 / Float64(r * r));
          	else
          		tmp = -1.5;
          	end
          	return tmp
          end
          
          function tmp_2 = code(v, w, r)
          	tmp = 0.0;
          	if (r <= 0.0066)
          		tmp = 2.0 / (r * r);
          	else
          		tmp = -1.5;
          	end
          	tmp_2 = tmp;
          end
          
          code[v_, w_, r_] := If[LessEqual[r, 0.0066], N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision], -1.5]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;r \leq 0.0066:\\
          \;\;\;\;\frac{2}{r \cdot r}\\
          
          \mathbf{else}:\\
          \;\;\;\;-1.5\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if r < 0.0066

            1. Initial program 78.4%

              \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
            2. Step-by-step derivation
              1. associate--l-N/A

                \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
              2. +-commutativeN/A

                \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
              3. associate--l+N/A

                \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
              4. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
              7. associate--r+N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
              8. sub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
              9. +-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
              10. associate--l+N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
              11. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
              13. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
            3. Simplified68.1%

              \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in r around 0

              \[\leadsto \color{blue}{\frac{2}{{r}^{2}}} \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left({r}^{2}\right)}\right) \]
              2. unpow2N/A

                \[\leadsto \mathsf{/.f64}\left(2, \left(r \cdot \color{blue}{r}\right)\right) \]
              3. *-lowering-*.f6453.9%

                \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right) \]
            7. Simplified53.9%

              \[\leadsto \color{blue}{\frac{2}{r \cdot r}} \]

            if 0.0066 < r

            1. Initial program 94.4%

              \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
            2. Step-by-step derivation
              1. associate--l-N/A

                \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
              2. +-commutativeN/A

                \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
              3. associate--l+N/A

                \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
              4. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
              7. associate--r+N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
              8. sub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
              9. +-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
              10. associate--l+N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
              11. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
              13. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
            3. Simplified83.6%

              \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in v around inf

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
              2. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              9. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              10. *-lowering-*.f6479.2%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
            7. Simplified79.2%

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
              2. swap-sqrN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
              3. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\left(r \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              7. *-lowering-*.f6489.5%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
            9. Applied egg-rr89.5%

              \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)} + -1.5\right) \]
            10. Taylor expanded in r around inf

              \[\leadsto \color{blue}{{r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)} \]
            11. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left({r}^{2}\right), \color{blue}{\left(\frac{-1}{4} \cdot {w}^{2} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)}\right) \]
              2. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\left(r \cdot r\right), \left(\color{blue}{\frac{-1}{4} \cdot {w}^{2}} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\color{blue}{\frac{-1}{4} \cdot {w}^{2}} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right) \]
              4. sub-negN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot {w}^{2}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)}\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left({w}^{2}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{3}{2} \cdot \frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left(w \cdot w\right)\right), \left(\mathsf{neg}\left(\frac{3}{2} \cdot \color{blue}{\frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{3}{2} \cdot \color{blue}{\frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
              9. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{\frac{3}{2} \cdot 1}{{r}^{2}}\right)\right)\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{\frac{3}{2}}{{r}^{2}}\right)\right)\right)\right) \]
              11. distribute-neg-fracN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{\mathsf{neg}\left(\frac{3}{2}\right)}{\color{blue}{{r}^{2}}}\right)\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{\frac{-3}{2}}{{\color{blue}{r}}^{2}}\right)\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \color{blue}{\left({r}^{2}\right)}\right)\right)\right) \]
              14. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \left(r \cdot \color{blue}{r}\right)\right)\right)\right) \]
              15. *-lowering-*.f6479.2%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right)\right)\right) \]
            12. Simplified79.2%

              \[\leadsto \color{blue}{\left(r \cdot r\right) \cdot \left(-0.25 \cdot \left(w \cdot w\right) + \frac{-1.5}{r \cdot r}\right)} \]
            13. Taylor expanded in r around 0

              \[\leadsto \color{blue}{\frac{-3}{2}} \]
            14. Step-by-step derivation
              1. Simplified30.4%

                \[\leadsto \color{blue}{-1.5} \]
            15. Recombined 2 regimes into one program.
            16. Add Preprocessing

            Alternative 12: 57.5% accurate, 4.1× speedup?

            \[\begin{array}{l} \\ \frac{2}{r \cdot r} + -1.5 \end{array} \]
            (FPCore (v w r) :precision binary64 (+ (/ 2.0 (* r r)) -1.5))
            double code(double v, double w, double r) {
            	return (2.0 / (r * r)) + -1.5;
            }
            
            real(8) function code(v, w, r)
                real(8), intent (in) :: v
                real(8), intent (in) :: w
                real(8), intent (in) :: r
                code = (2.0d0 / (r * r)) + (-1.5d0)
            end function
            
            public static double code(double v, double w, double r) {
            	return (2.0 / (r * r)) + -1.5;
            }
            
            def code(v, w, r):
            	return (2.0 / (r * r)) + -1.5
            
            function code(v, w, r)
            	return Float64(Float64(2.0 / Float64(r * r)) + -1.5)
            end
            
            function tmp = code(v, w, r)
            	tmp = (2.0 / (r * r)) + -1.5;
            end
            
            code[v_, w_, r_] := N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \frac{2}{r \cdot r} + -1.5
            \end{array}
            
            Derivation
            1. Initial program 81.8%

              \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
            2. Step-by-step derivation
              1. associate--l-N/A

                \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
              2. +-commutativeN/A

                \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
              3. associate--l+N/A

                \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
              4. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
              7. associate--r+N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
              8. sub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
              9. +-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
              10. associate--l+N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
              11. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
              13. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
            3. Simplified71.4%

              \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
            4. Add Preprocessing
            5. Taylor expanded in r around 0

              \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \color{blue}{\frac{-3}{2}}\right) \]
            6. Step-by-step derivation
              1. Simplified59.5%

                \[\leadsto \frac{2}{r \cdot r} + \color{blue}{-1.5} \]
              2. Add Preprocessing

              Alternative 13: 14.0% accurate, 29.0× speedup?

              \[\begin{array}{l} \\ -1.5 \end{array} \]
              (FPCore (v w r) :precision binary64 -1.5)
              double code(double v, double w, double r) {
              	return -1.5;
              }
              
              real(8) function code(v, w, r)
                  real(8), intent (in) :: v
                  real(8), intent (in) :: w
                  real(8), intent (in) :: r
                  code = -1.5d0
              end function
              
              public static double code(double v, double w, double r) {
              	return -1.5;
              }
              
              def code(v, w, r):
              	return -1.5
              
              function code(v, w, r)
              	return -1.5
              end
              
              function tmp = code(v, w, r)
              	tmp = -1.5;
              end
              
              code[v_, w_, r_] := -1.5
              
              \begin{array}{l}
              
              \\
              -1.5
              \end{array}
              
              Derivation
              1. Initial program 81.8%

                \[\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5 \]
              2. Step-by-step derivation
                1. associate--l-N/A

                  \[\leadsto \left(3 + \frac{2}{r \cdot r}\right) - \color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)} \]
                2. +-commutativeN/A

                  \[\leadsto \left(\frac{2}{r \cdot r} + 3\right) - \left(\color{blue}{\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}} + \frac{9}{2}\right) \]
                3. associate--l+N/A

                  \[\leadsto \frac{2}{r \cdot r} + \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)} \]
                4. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\left(\frac{2}{r \cdot r}\right), \color{blue}{\left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)}\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \left(r \cdot r\right)\right), \left(\color{blue}{3} - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(3 - \left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v} + \frac{9}{2}\right)\right)\right) \]
                7. associate--r+N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 - \frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - \color{blue}{\frac{9}{2}}\right)\right) \]
                8. sub-negN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(3 + \left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right)\right) - \frac{9}{2}\right)\right) \]
                9. +-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + 3\right) - \frac{9}{2}\right)\right) \]
                10. associate--l+N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \color{blue}{\left(3 - \frac{9}{2}\right)}\right)\right) \]
                11. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \frac{-3}{2}\right)\right) \]
                12. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\frac{-9}{2} + \color{blue}{3}\right)\right)\right) \]
                13. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \left(\left(\mathsf{neg}\left(\frac{\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right)\right) + \left(\left(\mathsf{neg}\left(\frac{9}{2}\right)\right) + 3\right)\right)\right) \]
              3. Simplified71.4%

                \[\leadsto \color{blue}{\frac{2}{r \cdot r} + \left(\frac{\left(r \cdot r\right) \cdot \left(\left(0.375 + v \cdot -0.25\right) \cdot \left(w \cdot w\right)\right)}{v + -1} + -1.5\right)} \]
              4. Add Preprocessing
              5. Taylor expanded in v around inf

                \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)}, \frac{-3}{2}\right)\right) \]
              6. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left({r}^{2} \cdot {w}^{2}\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
                2. associate-*l*N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left({r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({r}^{2}\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
                5. unpow2N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2}\right)\right), \frac{-3}{2}\right)\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left({w}^{2} \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left({w}^{2}\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
                9. unpow2N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\left(w \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
                10. *-lowering-*.f6474.9%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              7. Simplified74.9%

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
                2. swap-sqrN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right) \cdot \frac{-1}{4}\right), \frac{-3}{2}\right)\right) \]
                3. associate-*l*N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\left(\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(r \cdot w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \left(\left(r \cdot w\right) \cdot \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\left(r \cdot w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
                7. *-lowering-*.f6493.8%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), \frac{-1}{4}\right)\right), \frac{-3}{2}\right)\right) \]
              9. Applied egg-rr93.8%

                \[\leadsto \frac{2}{r \cdot r} + \left(\color{blue}{\left(r \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot -0.25\right)} + -1.5\right) \]
              10. Taylor expanded in r around inf

                \[\leadsto \color{blue}{{r}^{2} \cdot \left(\frac{-1}{4} \cdot {w}^{2} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)} \]
              11. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left({r}^{2}\right), \color{blue}{\left(\frac{-1}{4} \cdot {w}^{2} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(r \cdot r\right), \left(\color{blue}{\frac{-1}{4} \cdot {w}^{2}} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\color{blue}{\frac{-1}{4} \cdot {w}^{2}} - \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right) \]
                4. sub-negN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\frac{-1}{4} \cdot {w}^{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\left(\frac{-1}{4} \cdot {w}^{2}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)}\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left({w}^{2}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{3}{2} \cdot \frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
                7. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left(w \cdot w\right)\right), \left(\mathsf{neg}\left(\frac{3}{2} \cdot \color{blue}{\frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{3}{2} \cdot \color{blue}{\frac{1}{{r}^{2}}}\right)\right)\right)\right) \]
                9. associate-*r/N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{\frac{3}{2} \cdot 1}{{r}^{2}}\right)\right)\right)\right) \]
                10. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\mathsf{neg}\left(\frac{\frac{3}{2}}{{r}^{2}}\right)\right)\right)\right) \]
                11. distribute-neg-fracN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{\mathsf{neg}\left(\frac{3}{2}\right)}{\color{blue}{{r}^{2}}}\right)\right)\right) \]
                12. metadata-evalN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \left(\frac{\frac{-3}{2}}{{\color{blue}{r}}^{2}}\right)\right)\right) \]
                13. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \color{blue}{\left({r}^{2}\right)}\right)\right)\right) \]
                14. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \left(r \cdot \color{blue}{r}\right)\right)\right)\right) \]
                15. *-lowering-*.f6445.7%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(w, w\right)\right), \mathsf{/.f64}\left(\frac{-3}{2}, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right)\right)\right) \]
              12. Simplified45.7%

                \[\leadsto \color{blue}{\left(r \cdot r\right) \cdot \left(-0.25 \cdot \left(w \cdot w\right) + \frac{-1.5}{r \cdot r}\right)} \]
              13. Taylor expanded in r around 0

                \[\leadsto \color{blue}{\frac{-3}{2}} \]
              14. Step-by-step derivation
                1. Simplified17.9%

                  \[\leadsto \color{blue}{-1.5} \]
                2. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2024149 
                (FPCore (v w r)
                  :name "Rosa's TurbineBenchmark"
                  :precision binary64
                  (- (- (+ 3.0 (/ 2.0 (* r r))) (/ (* (* 0.125 (- 3.0 (* 2.0 v))) (* (* (* w w) r) r)) (- 1.0 v))) 4.5))