Rosa's TurbineBenchmark

Percentage Accurate: 84.5% → 99.4%
Time: 15.6s
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: 99.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;v \leq 0.6:\\
\;\;\;\;\left(\left(3 + \frac{2}{r \cdot r}\right) + \frac{\left(r \cdot w\right) \cdot \left(r \cdot \left(w \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right) - 4.5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if v < -1.65e81 or 0.599999999999999978 < v

    1. Initial program 82.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. Add Preprocessing
    3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e81 < v < 0.599999999999999978

    1. Initial program 85.1%

      \[\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 \left(w \cdot r\right)\right) \cdot r\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      2. 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(w \cdot \left(\left(w \cdot r\right) \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(w, \left(\left(w \cdot r\right) \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      4. *-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(w, \mathsf{*.f64}\left(\left(w \cdot r\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      5. *-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(w, \mathsf{*.f64}\left(\left(r \cdot w\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      6. *-lowering-*.f6496.6%

        \[\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(w, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
    4. Applied egg-rr96.6%

      \[\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(w \cdot \left(\left(r \cdot w\right) \cdot r\right)\right)}}{1 - v}\right) - 4.5 \]
    5. Step-by-step derivation
      1. associate-*r*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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot r\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      2. *-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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      3. associate-*r*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(\left(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot r\right) \cdot \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      4. *-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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot r\right), \left(r \cdot w\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(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      6. *-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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      7. cancel-sign-sub-invN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + \left(\mathsf{neg}\left(2\right)\right) \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      8. metadata-evalN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + -2 \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      9. *-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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      10. distribute-lft-inN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot 3 + \frac{1}{8} \cdot \left(v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      11. metadata-evalN/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(\mathsf{*.f64}\left(\left(\frac{3}{8} + \frac{1}{8} \cdot \left(v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      12. +-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{1}{8} \cdot \left(v \cdot -2\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      13. *-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(\left(v \cdot -2\right) \cdot \frac{1}{8}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      14. 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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \left(-2 \cdot \frac{1}{8}\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      15. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      16. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \left(\mathsf{neg}\left(\frac{1}{4}\right)\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      17. *-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \left(\mathsf{neg}\left(\frac{1}{4}\right)\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      18. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      19. *-lowering-*.f6499.9%

        \[\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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), w\right), r\right), \mathsf{*.f64}\left(r, w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
    6. Applied egg-rr99.9%

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

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

Alternative 2: 93.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{2}{r \cdot r}\\ t_1 := 0.375 + v \cdot -0.25\\ \mathbf{if}\;r \leq 8.5 \cdot 10^{-71}:\\ \;\;\;\;t\_0 - \left(1.5 + \left(w \cdot 0.25\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right)\\ \mathbf{elif}\;r \leq 2 \cdot 10^{+115}:\\ \;\;\;\;\left(\left(3 + t\_0\right) - \left(r \cdot t\_1\right) \cdot \frac{r \cdot \left(w \cdot w\right)}{1 - v}\right) - 4.5\\ \mathbf{else}:\\ \;\;\;\;\left(3 + \frac{\left(r \cdot w\right) \cdot \left(r \cdot \left(w \cdot t\_1\right)\right)}{v + -1}\right) - 4.5\\ \end{array} \end{array} \]
(FPCore (v w r)
 :precision binary64
 (let* ((t_0 (/ 2.0 (* r r))) (t_1 (+ 0.375 (* v -0.25))))
   (if (<= r 8.5e-71)
     (- t_0 (+ 1.5 (* (* w 0.25) (* r (* r w)))))
     (if (<= r 2e+115)
       (- (- (+ 3.0 t_0) (* (* r t_1) (/ (* r (* w w)) (- 1.0 v)))) 4.5)
       (- (+ 3.0 (/ (* (* r w) (* r (* w t_1))) (+ v -1.0))) 4.5)))))
double code(double v, double w, double r) {
	double t_0 = 2.0 / (r * r);
	double t_1 = 0.375 + (v * -0.25);
	double tmp;
	if (r <= 8.5e-71) {
		tmp = t_0 - (1.5 + ((w * 0.25) * (r * (r * w))));
	} else if (r <= 2e+115) {
		tmp = ((3.0 + t_0) - ((r * t_1) * ((r * (w * w)) / (1.0 - v)))) - 4.5;
	} else {
		tmp = (3.0 + (((r * w) * (r * (w * t_1))) / (v + -1.0))) - 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) :: t_1
    real(8) :: tmp
    t_0 = 2.0d0 / (r * r)
    t_1 = 0.375d0 + (v * (-0.25d0))
    if (r <= 8.5d-71) then
        tmp = t_0 - (1.5d0 + ((w * 0.25d0) * (r * (r * w))))
    else if (r <= 2d+115) then
        tmp = ((3.0d0 + t_0) - ((r * t_1) * ((r * (w * w)) / (1.0d0 - v)))) - 4.5d0
    else
        tmp = (3.0d0 + (((r * w) * (r * (w * t_1))) / (v + (-1.0d0)))) - 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 t_1 = 0.375 + (v * -0.25);
	double tmp;
	if (r <= 8.5e-71) {
		tmp = t_0 - (1.5 + ((w * 0.25) * (r * (r * w))));
	} else if (r <= 2e+115) {
		tmp = ((3.0 + t_0) - ((r * t_1) * ((r * (w * w)) / (1.0 - v)))) - 4.5;
	} else {
		tmp = (3.0 + (((r * w) * (r * (w * t_1))) / (v + -1.0))) - 4.5;
	}
	return tmp;
}
def code(v, w, r):
	t_0 = 2.0 / (r * r)
	t_1 = 0.375 + (v * -0.25)
	tmp = 0
	if r <= 8.5e-71:
		tmp = t_0 - (1.5 + ((w * 0.25) * (r * (r * w))))
	elif r <= 2e+115:
		tmp = ((3.0 + t_0) - ((r * t_1) * ((r * (w * w)) / (1.0 - v)))) - 4.5
	else:
		tmp = (3.0 + (((r * w) * (r * (w * t_1))) / (v + -1.0))) - 4.5
	return tmp
function code(v, w, r)
	t_0 = Float64(2.0 / Float64(r * r))
	t_1 = Float64(0.375 + Float64(v * -0.25))
	tmp = 0.0
	if (r <= 8.5e-71)
		tmp = Float64(t_0 - Float64(1.5 + Float64(Float64(w * 0.25) * Float64(r * Float64(r * w)))));
	elseif (r <= 2e+115)
		tmp = Float64(Float64(Float64(3.0 + t_0) - Float64(Float64(r * t_1) * Float64(Float64(r * Float64(w * w)) / Float64(1.0 - v)))) - 4.5);
	else
		tmp = Float64(Float64(3.0 + Float64(Float64(Float64(r * w) * Float64(r * Float64(w * t_1))) / Float64(v + -1.0))) - 4.5);
	end
	return tmp
end
function tmp_2 = code(v, w, r)
	t_0 = 2.0 / (r * r);
	t_1 = 0.375 + (v * -0.25);
	tmp = 0.0;
	if (r <= 8.5e-71)
		tmp = t_0 - (1.5 + ((w * 0.25) * (r * (r * w))));
	elseif (r <= 2e+115)
		tmp = ((3.0 + t_0) - ((r * t_1) * ((r * (w * w)) / (1.0 - v)))) - 4.5;
	else
		tmp = (3.0 + (((r * w) * (r * (w * t_1))) / (v + -1.0))) - 4.5;
	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[(0.375 + N[(v * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[r, 8.5e-71], N[(t$95$0 - N[(1.5 + N[(N[(w * 0.25), $MachinePrecision] * N[(r * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[r, 2e+115], N[(N[(N[(3.0 + t$95$0), $MachinePrecision] - N[(N[(r * t$95$1), $MachinePrecision] * N[(N[(r * N[(w * w), $MachinePrecision]), $MachinePrecision] / N[(1.0 - v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision], N[(N[(3.0 + N[(N[(N[(r * w), $MachinePrecision] * N[(r * N[(w * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(v + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;r \leq 2 \cdot 10^{+115}:\\
\;\;\;\;\left(\left(3 + t\_0\right) - \left(r \cdot t\_1\right) \cdot \frac{r \cdot \left(w \cdot w\right)}{1 - v}\right) - 4.5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if r < 8.49999999999999988e-71

    1. Initial program 80.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. Add Preprocessing
    3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2}{r \cdot r} - \left(1.5 + \left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot 0.25\right)\right)} \]
    6. 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(\frac{3}{2}, \left(\left(r \cdot r\right) \cdot \left(w \cdot \color{blue}{\left(w \cdot \frac{1}{4}\right)}\right)\right)\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(\frac{3}{2}, \left(\left(\left(r \cdot r\right) \cdot w\right) \cdot \color{blue}{\left(w \cdot \frac{1}{4}\right)}\right)\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(\frac{3}{2}, \left(\left(r \cdot \left(r \cdot w\right)\right) \cdot \left(\color{blue}{w} \cdot \frac{1}{4}\right)\right)\right)\right) \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

    if 8.49999999999999988e-71 < r < 2e115

    1. Initial program 95.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. 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 \left(w \cdot r\right)\right) \cdot r\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      2. 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(w \cdot \left(\left(w \cdot r\right) \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(w, \left(\left(w \cdot r\right) \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      4. *-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(w, \mathsf{*.f64}\left(\left(w \cdot r\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      5. *-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(w, \mathsf{*.f64}\left(\left(r \cdot w\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      6. *-lowering-*.f6495.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(w, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
    4. Applied egg-rr95.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(w \cdot \left(\left(r \cdot w\right) \cdot r\right)\right)}}{1 - v}\right) - 4.5 \]
    5. 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), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \frac{w \cdot \left(\left(r \cdot w\right) \cdot r\right)}{1 - v}\right)\right), \frac{9}{2}\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(w \cdot \left(\left(r \cdot w\right) \cdot r\right)\right) \cdot \frac{1}{1 - v}\right)\right)\right), \frac{9}{2}\right) \]
      3. *-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), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(\left(r \cdot w\right) \cdot r\right) \cdot w\right) \cdot \frac{1}{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), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(r \cdot \left(r \cdot w\right)\right) \cdot w\right) \cdot \frac{1}{1 - v}\right)\right)\right), \frac{9}{2}\right) \]
      5. associate-*r*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), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(r \cdot \left(\left(r \cdot w\right) \cdot w\right)\right) \cdot \frac{1}{1 - v}\right)\right)\right), \frac{9}{2}\right) \]
      6. associate-*r*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), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right) \cdot \frac{1}{1 - v}\right)\right)\right), \frac{9}{2}\right) \]
      7. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(3, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, r\right)\right)\right), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \frac{r \cdot \left(r \cdot \left(w \cdot w\right)\right)}{1 - v}\right)\right), \frac{9}{2}\right) \]
      8. 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), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(r \cdot \frac{r \cdot \left(w \cdot w\right)}{1 - v}\right)\right)\right), \frac{9}{2}\right) \]
      9. associate-*r*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), \left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot r\right) \cdot \frac{r \cdot \left(w \cdot w\right)}{1 - v}\right)\right), \frac{9}{2}\right) \]
      10. *-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(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot r\right), \left(\frac{r \cdot \left(w \cdot w\right)}{1 - v}\right)\right)\right), \frac{9}{2}\right) \]
    6. Applied egg-rr99.6%

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

    if 2e115 < r

    1. Initial program 87.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. 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 \left(w \cdot r\right)\right) \cdot r\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      2. 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(w \cdot \left(\left(w \cdot r\right) \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(w, \left(\left(w \cdot r\right) \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      4. *-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(w, \mathsf{*.f64}\left(\left(w \cdot r\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      5. *-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(w, \mathsf{*.f64}\left(\left(r \cdot w\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      6. *-lowering-*.f6493.1%

        \[\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(w, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
    4. Applied egg-rr93.1%

      \[\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(w \cdot \left(\left(r \cdot w\right) \cdot r\right)\right)}}{1 - v}\right) - 4.5 \]
    5. Step-by-step derivation
      1. associate-*r*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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot r\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      2. *-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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      3. associate-*r*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(\left(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot r\right) \cdot \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      4. *-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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot r\right), \left(r \cdot w\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(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      6. *-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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      7. cancel-sign-sub-invN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + \left(\mathsf{neg}\left(2\right)\right) \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      8. metadata-evalN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + -2 \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      9. *-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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      10. distribute-lft-inN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot 3 + \frac{1}{8} \cdot \left(v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      11. metadata-evalN/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(\mathsf{*.f64}\left(\left(\frac{3}{8} + \frac{1}{8} \cdot \left(v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      12. +-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{1}{8} \cdot \left(v \cdot -2\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      13. *-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(\left(v \cdot -2\right) \cdot \frac{1}{8}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      14. 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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \left(-2 \cdot \frac{1}{8}\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      15. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      16. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \left(\mathsf{neg}\left(\frac{1}{4}\right)\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      17. *-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \left(\mathsf{neg}\left(\frac{1}{4}\right)\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      18. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      19. *-lowering-*.f6497.6%

        \[\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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), w\right), r\right), \mathsf{*.f64}\left(r, w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
    6. Applied egg-rr97.6%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{3}, \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), w\right), r\right), \mathsf{*.f64}\left(r, w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
    8. Step-by-step derivation
      1. Simplified97.6%

        \[\leadsto \left(\color{blue}{3} - \frac{\left(\left(\left(0.375 + v \cdot -0.25\right) \cdot w\right) \cdot r\right) \cdot \left(r \cdot w\right)}{1 - v}\right) - 4.5 \]
    9. Recombined 3 regimes into one program.
    10. Final simplification95.3%

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

    Alternative 3: 93.5% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 2.9 \cdot 10^{+25}:\\ \;\;\;\;\frac{2}{r \cdot r} - \left(1.5 + \left(w \cdot 0.25\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(3 + \frac{\left(r \cdot w\right) \cdot \left(r \cdot \left(w \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right) - 4.5\\ \end{array} \end{array} \]
    (FPCore (v w r)
     :precision binary64
     (if (<= r 2.9e+25)
       (- (/ 2.0 (* r r)) (+ 1.5 (* (* w 0.25) (* r (* r w)))))
       (-
        (+ 3.0 (/ (* (* r w) (* r (* w (+ 0.375 (* v -0.25))))) (+ v -1.0)))
        4.5)))
    double code(double v, double w, double r) {
    	double tmp;
    	if (r <= 2.9e+25) {
    		tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
    	} else {
    		tmp = (3.0 + (((r * w) * (r * (w * (0.375 + (v * -0.25))))) / (v + -1.0))) - 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) :: tmp
        if (r <= 2.9d+25) then
            tmp = (2.0d0 / (r * r)) - (1.5d0 + ((w * 0.25d0) * (r * (r * w))))
        else
            tmp = (3.0d0 + (((r * w) * (r * (w * (0.375d0 + (v * (-0.25d0)))))) / (v + (-1.0d0)))) - 4.5d0
        end if
        code = tmp
    end function
    
    public static double code(double v, double w, double r) {
    	double tmp;
    	if (r <= 2.9e+25) {
    		tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
    	} else {
    		tmp = (3.0 + (((r * w) * (r * (w * (0.375 + (v * -0.25))))) / (v + -1.0))) - 4.5;
    	}
    	return tmp;
    }
    
    def code(v, w, r):
    	tmp = 0
    	if r <= 2.9e+25:
    		tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))))
    	else:
    		tmp = (3.0 + (((r * w) * (r * (w * (0.375 + (v * -0.25))))) / (v + -1.0))) - 4.5
    	return tmp
    
    function code(v, w, r)
    	tmp = 0.0
    	if (r <= 2.9e+25)
    		tmp = Float64(Float64(2.0 / Float64(r * r)) - Float64(1.5 + Float64(Float64(w * 0.25) * Float64(r * Float64(r * w)))));
    	else
    		tmp = Float64(Float64(3.0 + Float64(Float64(Float64(r * w) * Float64(r * Float64(w * Float64(0.375 + Float64(v * -0.25))))) / Float64(v + -1.0))) - 4.5);
    	end
    	return tmp
    end
    
    function tmp_2 = code(v, w, r)
    	tmp = 0.0;
    	if (r <= 2.9e+25)
    		tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
    	else
    		tmp = (3.0 + (((r * w) * (r * (w * (0.375 + (v * -0.25))))) / (v + -1.0))) - 4.5;
    	end
    	tmp_2 = tmp;
    end
    
    code[v_, w_, r_] := If[LessEqual[r, 2.9e+25], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] - N[(1.5 + N[(N[(w * 0.25), $MachinePrecision] * N[(r * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(3.0 + N[(N[(N[(r * w), $MachinePrecision] * N[(r * N[(w * N[(0.375 + N[(v * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(v + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;r \leq 2.9 \cdot 10^{+25}:\\
    \;\;\;\;\frac{2}{r \cdot r} - \left(1.5 + \left(w \cdot 0.25\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(3 + \frac{\left(r \cdot w\right) \cdot \left(r \cdot \left(w \cdot \left(0.375 + v \cdot -0.25\right)\right)\right)}{v + -1}\right) - 4.5\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if r < 2.8999999999999999e25

      1. Initial program 82.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. Add Preprocessing
      3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{2}{r \cdot r} - \left(1.5 + \left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot 0.25\right)\right)} \]
      6. 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(\frac{3}{2}, \left(\left(r \cdot r\right) \cdot \left(w \cdot \color{blue}{\left(w \cdot \frac{1}{4}\right)}\right)\right)\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(\frac{3}{2}, \left(\left(\left(r \cdot r\right) \cdot w\right) \cdot \color{blue}{\left(w \cdot \frac{1}{4}\right)}\right)\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(\frac{3}{2}, \left(\left(r \cdot \left(r \cdot w\right)\right) \cdot \left(\color{blue}{w} \cdot \frac{1}{4}\right)\right)\right)\right) \]
        4. *-commutativeN/A

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

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

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

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

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

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

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

      if 2.8999999999999999e25 < r

      1. Initial program 90.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. 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 \left(w \cdot r\right)\right) \cdot r\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        2. 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(w \cdot \left(\left(w \cdot r\right) \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(w, \left(\left(w \cdot r\right) \cdot r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        4. *-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(w, \mathsf{*.f64}\left(\left(w \cdot r\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        5. *-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(w, \mathsf{*.f64}\left(\left(r \cdot w\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        6. *-lowering-*.f6495.1%

          \[\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(w, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, w\right), r\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      4. Applied egg-rr95.1%

        \[\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(w \cdot \left(\left(r \cdot w\right) \cdot r\right)\right)}}{1 - v}\right) - 4.5 \]
      5. Step-by-step derivation
        1. associate-*r*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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot \left(\left(r \cdot w\right) \cdot r\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        2. *-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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        3. associate-*r*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(\left(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot r\right) \cdot \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        4. *-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(\left(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right) \cdot r\right), \left(r \cdot w\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(\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        6. *-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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        7. cancel-sign-sub-invN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + \left(\mathsf{neg}\left(2\right)\right) \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        8. metadata-evalN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + -2 \cdot v\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        9. *-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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot \left(3 + v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        10. distribute-lft-inN/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(\mathsf{*.f64}\left(\left(\frac{1}{8} \cdot 3 + \frac{1}{8} \cdot \left(v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        11. metadata-evalN/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(\mathsf{*.f64}\left(\left(\frac{3}{8} + \frac{1}{8} \cdot \left(v \cdot -2\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        12. +-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{1}{8} \cdot \left(v \cdot -2\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        13. *-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(\left(v \cdot -2\right) \cdot \frac{1}{8}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        14. 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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \left(-2 \cdot \frac{1}{8}\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        15. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \frac{-1}{4}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        16. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \left(v \cdot \left(\mathsf{neg}\left(\frac{1}{4}\right)\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        17. *-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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \left(\mathsf{neg}\left(\frac{1}{4}\right)\right)\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        18. metadata-evalN/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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), w\right), r\right), \left(r \cdot w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
        19. *-lowering-*.f6498.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(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(v, \frac{-1}{4}\right)\right), w\right), r\right), \mathsf{*.f64}\left(r, w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      6. Applied egg-rr98.3%

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\color{blue}{3}, \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), w\right), r\right), \mathsf{*.f64}\left(r, w\right)\right), \mathsf{\_.f64}\left(1, v\right)\right)\right), \frac{9}{2}\right) \]
      8. Step-by-step derivation
        1. Simplified98.3%

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

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

      Alternative 4: 93.6% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 7.5:\\ \;\;\;\;\frac{2}{r \cdot r} - \left(1.5 + \left(w \cdot 0.25\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(3 + \left(0.375 + v \cdot -0.25\right) \cdot \frac{r \cdot \left(r \cdot \left(w \cdot w\right)\right)}{v + -1}\right) - 4.5\\ \end{array} \end{array} \]
      (FPCore (v w r)
       :precision binary64
       (if (<= r 7.5)
         (- (/ 2.0 (* r r)) (+ 1.5 (* (* w 0.25) (* r (* r w)))))
         (-
          (+ 3.0 (* (+ 0.375 (* v -0.25)) (/ (* r (* r (* w w))) (+ v -1.0))))
          4.5)))
      double code(double v, double w, double r) {
      	double tmp;
      	if (r <= 7.5) {
      		tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
      	} else {
      		tmp = (3.0 + ((0.375 + (v * -0.25)) * ((r * (r * (w * w))) / (v + -1.0)))) - 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) :: tmp
          if (r <= 7.5d0) then
              tmp = (2.0d0 / (r * r)) - (1.5d0 + ((w * 0.25d0) * (r * (r * w))))
          else
              tmp = (3.0d0 + ((0.375d0 + (v * (-0.25d0))) * ((r * (r * (w * w))) / (v + (-1.0d0))))) - 4.5d0
          end if
          code = tmp
      end function
      
      public static double code(double v, double w, double r) {
      	double tmp;
      	if (r <= 7.5) {
      		tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
      	} else {
      		tmp = (3.0 + ((0.375 + (v * -0.25)) * ((r * (r * (w * w))) / (v + -1.0)))) - 4.5;
      	}
      	return tmp;
      }
      
      def code(v, w, r):
      	tmp = 0
      	if r <= 7.5:
      		tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))))
      	else:
      		tmp = (3.0 + ((0.375 + (v * -0.25)) * ((r * (r * (w * w))) / (v + -1.0)))) - 4.5
      	return tmp
      
      function code(v, w, r)
      	tmp = 0.0
      	if (r <= 7.5)
      		tmp = Float64(Float64(2.0 / Float64(r * r)) - Float64(1.5 + Float64(Float64(w * 0.25) * Float64(r * Float64(r * w)))));
      	else
      		tmp = Float64(Float64(3.0 + Float64(Float64(0.375 + Float64(v * -0.25)) * Float64(Float64(r * Float64(r * Float64(w * w))) / Float64(v + -1.0)))) - 4.5);
      	end
      	return tmp
      end
      
      function tmp_2 = code(v, w, r)
      	tmp = 0.0;
      	if (r <= 7.5)
      		tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
      	else
      		tmp = (3.0 + ((0.375 + (v * -0.25)) * ((r * (r * (w * w))) / (v + -1.0)))) - 4.5;
      	end
      	tmp_2 = tmp;
      end
      
      code[v_, w_, r_] := If[LessEqual[r, 7.5], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] - N[(1.5 + N[(N[(w * 0.25), $MachinePrecision] * N[(r * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(3.0 + N[(N[(0.375 + N[(v * -0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(r * N[(r * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(v + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;r \leq 7.5:\\
      \;\;\;\;\frac{2}{r \cdot r} - \left(1.5 + \left(w \cdot 0.25\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(3 + \left(0.375 + v \cdot -0.25\right) \cdot \frac{r \cdot \left(r \cdot \left(w \cdot w\right)\right)}{v + -1}\right) - 4.5\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if r < 7.5

        1. Initial program 82.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. Add Preprocessing
        3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{2}{r \cdot r} - \left(1.5 + \left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot 0.25\right)\right)} \]
        6. 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(\frac{3}{2}, \left(\left(r \cdot r\right) \cdot \left(w \cdot \color{blue}{\left(w \cdot \frac{1}{4}\right)}\right)\right)\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(\frac{3}{2}, \left(\left(\left(r \cdot r\right) \cdot w\right) \cdot \color{blue}{\left(w \cdot \frac{1}{4}\right)}\right)\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(\frac{3}{2}, \left(\left(r \cdot \left(r \cdot w\right)\right) \cdot \left(\color{blue}{w} \cdot \frac{1}{4}\right)\right)\right)\right) \]
          4. *-commutativeN/A

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

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

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

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

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

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

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

        if 7.5 < r

        1. Initial program 88.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. 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), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \frac{\left(\left(w \cdot w\right) \cdot r\right) \cdot r}{1 - v}\right)\right), \frac{9}{2}\right) \]
          2. *-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), \left(\frac{\left(\left(w \cdot w\right) \cdot r\right) \cdot r}{1 - v} \cdot \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\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(\left(\frac{\left(\left(w \cdot w\right) \cdot r\right) \cdot r}{1 - v}\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
          4. /-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(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
          5. *-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(\left(r \cdot \left(\left(w \cdot w\right) \cdot r\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
          6. *-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(r, \left(\left(w \cdot w\right) \cdot r\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
          7. *-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(r, \left(r \cdot \left(w \cdot w\right)\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
          8. *-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(r, \mathsf{*.f64}\left(r, \left(w \cdot w\right)\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
          9. *-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
          10. --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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
          11. sub-negN/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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \left(\frac{1}{8} \cdot \left(3 + \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          12. distribute-lft-inN/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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \left(\frac{1}{8} \cdot 3 + \frac{1}{8} \cdot \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          13. +-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\left(\frac{1}{8} \cdot 3\right), \left(\frac{1}{8} \cdot \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          14. metadata-evalN/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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{1}{8} \cdot \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          15. *-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          16. *-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \left(\mathsf{neg}\left(v \cdot 2\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          17. distribute-rgt-neg-inN/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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \left(v \cdot \left(\mathsf{neg}\left(2\right)\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          18. *-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(v, \left(\mathsf{neg}\left(2\right)\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          19. metadata-eval93.1%

            \[\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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(v, -2\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
        4. Applied egg-rr93.1%

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

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

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

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

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

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

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

            \[\leadsto \left(3 - \frac{r \cdot \left(r \cdot \left(w \cdot w\right)\right)}{1 - v} \cdot \left(0.375 + \color{blue}{v \cdot -0.25}\right)\right) - 4.5 \]
        7. Recombined 2 regimes into one program.
        8. Final simplification93.7%

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

        Alternative 5: 89.5% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 150000000:\\ \;\;\;\;\frac{2}{r \cdot r} - \left(1.5 + w \cdot \left(\left(w \cdot 0.25\right) \cdot \left(r \cdot r\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-1.5 + r \cdot \left(-0.25 \cdot \left(r \cdot \left(w \cdot w\right)\right)\right)\\ \end{array} \end{array} \]
        (FPCore (v w r)
         :precision binary64
         (if (<= r 150000000.0)
           (- (/ 2.0 (* r r)) (+ 1.5 (* w (* (* w 0.25) (* r r)))))
           (+ -1.5 (* r (* -0.25 (* r (* w w)))))))
        double code(double v, double w, double r) {
        	double tmp;
        	if (r <= 150000000.0) {
        		tmp = (2.0 / (r * r)) - (1.5 + (w * ((w * 0.25) * (r * r))));
        	} else {
        		tmp = -1.5 + (r * (-0.25 * (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 <= 150000000.0d0) then
                tmp = (2.0d0 / (r * r)) - (1.5d0 + (w * ((w * 0.25d0) * (r * r))))
            else
                tmp = (-1.5d0) + (r * ((-0.25d0) * (r * (w * w))))
            end if
            code = tmp
        end function
        
        public static double code(double v, double w, double r) {
        	double tmp;
        	if (r <= 150000000.0) {
        		tmp = (2.0 / (r * r)) - (1.5 + (w * ((w * 0.25) * (r * r))));
        	} else {
        		tmp = -1.5 + (r * (-0.25 * (r * (w * w))));
        	}
        	return tmp;
        }
        
        def code(v, w, r):
        	tmp = 0
        	if r <= 150000000.0:
        		tmp = (2.0 / (r * r)) - (1.5 + (w * ((w * 0.25) * (r * r))))
        	else:
        		tmp = -1.5 + (r * (-0.25 * (r * (w * w))))
        	return tmp
        
        function code(v, w, r)
        	tmp = 0.0
        	if (r <= 150000000.0)
        		tmp = Float64(Float64(2.0 / Float64(r * r)) - Float64(1.5 + Float64(w * Float64(Float64(w * 0.25) * Float64(r * r)))));
        	else
        		tmp = Float64(-1.5 + Float64(r * Float64(-0.25 * Float64(r * Float64(w * w)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(v, w, r)
        	tmp = 0.0;
        	if (r <= 150000000.0)
        		tmp = (2.0 / (r * r)) - (1.5 + (w * ((w * 0.25) * (r * r))));
        	else
        		tmp = -1.5 + (r * (-0.25 * (r * (w * w))));
        	end
        	tmp_2 = tmp;
        end
        
        code[v_, w_, r_] := If[LessEqual[r, 150000000.0], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] - N[(1.5 + N[(w * N[(N[(w * 0.25), $MachinePrecision] * N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.5 + N[(r * N[(-0.25 * N[(r * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;r \leq 150000000:\\
        \;\;\;\;\frac{2}{r \cdot r} - \left(1.5 + w \cdot \left(\left(w \cdot 0.25\right) \cdot \left(r \cdot r\right)\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;-1.5 + r \cdot \left(-0.25 \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.5e8

          1. Initial program 82.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. Add Preprocessing
          3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{2}{r \cdot r} - \left(1.5 + \left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot 0.25\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(\frac{3}{2}, \left(\left(\left(w \cdot w\right) \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(r \cdot r\right)}\right)\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(\frac{3}{2}, \left(\left(w \cdot \left(w \cdot \frac{1}{4}\right)\right) \cdot \left(\color{blue}{r} \cdot r\right)\right)\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(\frac{3}{2}, \left(w \cdot \color{blue}{\left(\left(w \cdot \frac{1}{4}\right) \cdot \left(r \cdot r\right)\right)}\right)\right)\right) \]
            4. *-lowering-*.f64N/A

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

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

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

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

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

          if 1.5e8 < r

          1. Initial program 88.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. Add Preprocessing
          3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{-1 \cdot \left({r}^{2} \cdot \left(\frac{1}{4} \cdot {w}^{2} + \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)} \]
          7. Step-by-step derivation
            1. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(\frac{1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)\right) + \frac{-3}{2} \]
            10. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 93.4% accurate, 1.7× speedup?

        \[\begin{array}{l} \\ \frac{\frac{2}{r}}{r} - \left(1.5 + \left(r \cdot \left(w \cdot 0.25\right)\right) \cdot \left(r \cdot w\right)\right) \end{array} \]
        (FPCore (v w r)
         :precision binary64
         (- (/ (/ 2.0 r) r) (+ 1.5 (* (* r (* w 0.25)) (* r w)))))
        double code(double v, double w, double r) {
        	return ((2.0 / r) / r) - (1.5 + ((r * (w * 0.25)) * (r * w)));
        }
        
        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 * 0.25d0)) * (r * w)))
        end function
        
        public static double code(double v, double w, double r) {
        	return ((2.0 / r) / r) - (1.5 + ((r * (w * 0.25)) * (r * w)));
        }
        
        def code(v, w, r):
        	return ((2.0 / r) / r) - (1.5 + ((r * (w * 0.25)) * (r * w)))
        
        function code(v, w, r)
        	return Float64(Float64(Float64(2.0 / r) / r) - Float64(1.5 + Float64(Float64(r * Float64(w * 0.25)) * Float64(r * w))))
        end
        
        function tmp = code(v, w, r)
        	tmp = ((2.0 / r) / r) - (1.5 + ((r * (w * 0.25)) * (r * w)));
        end
        
        code[v_, w_, r_] := N[(N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision] - N[(1.5 + N[(N[(r * N[(w * 0.25), $MachinePrecision]), $MachinePrecision] * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{\frac{2}{r}}{r} - \left(1.5 + \left(r \cdot \left(w \cdot 0.25\right)\right) \cdot \left(r \cdot w\right)\right)
        \end{array}
        
        Derivation
        1. Initial program 84.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. Add Preprocessing
        3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 91.9% accurate, 1.7× speedup?

        \[\begin{array}{l} \\ \frac{2}{r \cdot r} - \left(1.5 + \left(w \cdot 0.25\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right) \end{array} \]
        (FPCore (v w r)
         :precision binary64
         (- (/ 2.0 (* r r)) (+ 1.5 (* (* w 0.25) (* r (* r w))))))
        double code(double v, double w, double r) {
        	return (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
        }
        
        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 + ((w * 0.25d0) * (r * (r * w))))
        end function
        
        public static double code(double v, double w, double r) {
        	return (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
        }
        
        def code(v, w, r):
        	return (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))))
        
        function code(v, w, r)
        	return Float64(Float64(2.0 / Float64(r * r)) - Float64(1.5 + Float64(Float64(w * 0.25) * Float64(r * Float64(r * w)))))
        end
        
        function tmp = code(v, w, r)
        	tmp = (2.0 / (r * r)) - (1.5 + ((w * 0.25) * (r * (r * w))));
        end
        
        code[v_, w_, r_] := N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] - N[(1.5 + N[(N[(w * 0.25), $MachinePrecision] * N[(r * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{2}{r \cdot r} - \left(1.5 + \left(w \cdot 0.25\right) \cdot \left(r \cdot \left(r \cdot w\right)\right)\right)
        \end{array}
        
        Derivation
        1. Initial program 84.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. Add Preprocessing
        3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{2}{r \cdot r} - \left(1.5 + \left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot 0.25\right)\right)} \]
        6. 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(\frac{3}{2}, \left(\left(r \cdot r\right) \cdot \left(w \cdot \color{blue}{\left(w \cdot \frac{1}{4}\right)}\right)\right)\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(\frac{3}{2}, \left(\left(\left(r \cdot r\right) \cdot w\right) \cdot \color{blue}{\left(w \cdot \frac{1}{4}\right)}\right)\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(\frac{3}{2}, \left(\left(r \cdot \left(r \cdot w\right)\right) \cdot \left(\color{blue}{w} \cdot \frac{1}{4}\right)\right)\right)\right) \]
          4. *-commutativeN/A

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

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

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

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

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

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

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

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

        Alternative 8: 72.2% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 3.3:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{else}:\\ \;\;\;\;-1.5 + r \cdot \left(-0.25 \cdot \left(r \cdot \left(w \cdot w\right)\right)\right)\\ \end{array} \end{array} \]
        (FPCore (v w r)
         :precision binary64
         (if (<= r 3.3)
           (+ (/ 2.0 (* r r)) -1.5)
           (+ -1.5 (* r (* -0.25 (* r (* w w)))))))
        double code(double v, double w, double r) {
        	double tmp;
        	if (r <= 3.3) {
        		tmp = (2.0 / (r * r)) + -1.5;
        	} else {
        		tmp = -1.5 + (r * (-0.25 * (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 <= 3.3d0) then
                tmp = (2.0d0 / (r * r)) + (-1.5d0)
            else
                tmp = (-1.5d0) + (r * ((-0.25d0) * (r * (w * w))))
            end if
            code = tmp
        end function
        
        public static double code(double v, double w, double r) {
        	double tmp;
        	if (r <= 3.3) {
        		tmp = (2.0 / (r * r)) + -1.5;
        	} else {
        		tmp = -1.5 + (r * (-0.25 * (r * (w * w))));
        	}
        	return tmp;
        }
        
        def code(v, w, r):
        	tmp = 0
        	if r <= 3.3:
        		tmp = (2.0 / (r * r)) + -1.5
        	else:
        		tmp = -1.5 + (r * (-0.25 * (r * (w * w))))
        	return tmp
        
        function code(v, w, r)
        	tmp = 0.0
        	if (r <= 3.3)
        		tmp = Float64(Float64(2.0 / Float64(r * r)) + -1.5);
        	else
        		tmp = Float64(-1.5 + Float64(r * Float64(-0.25 * Float64(r * Float64(w * w)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(v, w, r)
        	tmp = 0.0;
        	if (r <= 3.3)
        		tmp = (2.0 / (r * r)) + -1.5;
        	else
        		tmp = -1.5 + (r * (-0.25 * (r * (w * w))));
        	end
        	tmp_2 = tmp;
        end
        
        code[v_, w_, r_] := If[LessEqual[r, 3.3], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision], N[(-1.5 + N[(r * N[(-0.25 * N[(r * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;r \leq 3.3:\\
        \;\;\;\;\frac{2}{r \cdot r} + -1.5\\
        
        \mathbf{else}:\\
        \;\;\;\;-1.5 + r \cdot \left(-0.25 \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 < 3.2999999999999998

          1. Initial program 82.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. Add Preprocessing
          3. Taylor expanded in w around 0

            \[\leadsto \color{blue}{2 \cdot \frac{1}{{r}^{2}} - \frac{3}{2}} \]
          4. Step-by-step derivation
            1. sub-negN/A

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

              \[\leadsto 2 \cdot \frac{1}{{r}^{2}} + \frac{-3}{2} \]
            3. +-commutativeN/A

              \[\leadsto \frac{-3}{2} + \color{blue}{2 \cdot \frac{1}{{r}^{2}}} \]
            4. +-lowering-+.f64N/A

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\frac{-3}{2}, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right)\right) \]
          5. Simplified70.3%

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

          if 3.2999999999999998 < r

          1. Initial program 88.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. Add Preprocessing
          3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{-1 \cdot \left({r}^{2} \cdot \left(\frac{1}{4} \cdot {w}^{2} + \frac{3}{2} \cdot \frac{1}{{r}^{2}}\right)\right)} \]
          7. Step-by-step derivation
            1. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{neg}\left(\frac{1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)\right) + \frac{-3}{2} \]
            10. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 69.9% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 6.4:\\ \;\;\;\;\frac{2}{r \cdot r} + -1.5\\ \mathbf{else}:\\ \;\;\;\;-1.5 + \left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot -0.375\right)\\ \end{array} \end{array} \]
        (FPCore (v w r)
         :precision binary64
         (if (<= r 6.4)
           (+ (/ 2.0 (* r r)) -1.5)
           (+ -1.5 (* (* r r) (* (* w w) -0.375)))))
        double code(double v, double w, double r) {
        	double tmp;
        	if (r <= 6.4) {
        		tmp = (2.0 / (r * r)) + -1.5;
        	} else {
        		tmp = -1.5 + ((r * r) * ((w * 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) :: tmp
            if (r <= 6.4d0) then
                tmp = (2.0d0 / (r * r)) + (-1.5d0)
            else
                tmp = (-1.5d0) + ((r * r) * ((w * w) * (-0.375d0)))
            end if
            code = tmp
        end function
        
        public static double code(double v, double w, double r) {
        	double tmp;
        	if (r <= 6.4) {
        		tmp = (2.0 / (r * r)) + -1.5;
        	} else {
        		tmp = -1.5 + ((r * r) * ((w * w) * -0.375));
        	}
        	return tmp;
        }
        
        def code(v, w, r):
        	tmp = 0
        	if r <= 6.4:
        		tmp = (2.0 / (r * r)) + -1.5
        	else:
        		tmp = -1.5 + ((r * r) * ((w * w) * -0.375))
        	return tmp
        
        function code(v, w, r)
        	tmp = 0.0
        	if (r <= 6.4)
        		tmp = Float64(Float64(2.0 / Float64(r * r)) + -1.5);
        	else
        		tmp = Float64(-1.5 + Float64(Float64(r * r) * Float64(Float64(w * w) * -0.375)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(v, w, r)
        	tmp = 0.0;
        	if (r <= 6.4)
        		tmp = (2.0 / (r * r)) + -1.5;
        	else
        		tmp = -1.5 + ((r * r) * ((w * w) * -0.375));
        	end
        	tmp_2 = tmp;
        end
        
        code[v_, w_, r_] := If[LessEqual[r, 6.4], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision], N[(-1.5 + N[(N[(r * r), $MachinePrecision] * N[(N[(w * w), $MachinePrecision] * -0.375), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;r \leq 6.4:\\
        \;\;\;\;\frac{2}{r \cdot r} + -1.5\\
        
        \mathbf{else}:\\
        \;\;\;\;-1.5 + \left(r \cdot r\right) \cdot \left(\left(w \cdot w\right) \cdot -0.375\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if r < 6.4000000000000004

          1. Initial program 82.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. Add Preprocessing
          3. Taylor expanded in w around 0

            \[\leadsto \color{blue}{2 \cdot \frac{1}{{r}^{2}} - \frac{3}{2}} \]
          4. Step-by-step derivation
            1. sub-negN/A

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

              \[\leadsto 2 \cdot \frac{1}{{r}^{2}} + \frac{-3}{2} \]
            3. +-commutativeN/A

              \[\leadsto \frac{-3}{2} + \color{blue}{2 \cdot \frac{1}{{r}^{2}}} \]
            4. +-lowering-+.f64N/A

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\frac{-3}{2}, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right)\right) \]
          5. Simplified70.3%

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

          if 6.4000000000000004 < r

          1. Initial program 88.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. 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), \left(\left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right) \cdot \frac{\left(\left(w \cdot w\right) \cdot r\right) \cdot r}{1 - v}\right)\right), \frac{9}{2}\right) \]
            2. *-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), \left(\frac{\left(\left(w \cdot w\right) \cdot r\right) \cdot r}{1 - v} \cdot \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\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(\left(\frac{\left(\left(w \cdot w\right) \cdot r\right) \cdot r}{1 - v}\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
            4. /-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(\left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
            5. *-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(\left(r \cdot \left(\left(w \cdot w\right) \cdot r\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
            6. *-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(r, \left(\left(w \cdot w\right) \cdot r\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
            7. *-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(r, \left(r \cdot \left(w \cdot w\right)\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
            8. *-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(r, \mathsf{*.f64}\left(r, \left(w \cdot w\right)\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
            9. *-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \left(1 - v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
            10. --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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \left(\frac{1}{8} \cdot \left(3 - 2 \cdot v\right)\right)\right)\right), \frac{9}{2}\right) \]
            11. sub-negN/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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \left(\frac{1}{8} \cdot \left(3 + \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
            12. distribute-lft-inN/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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \left(\frac{1}{8} \cdot 3 + \frac{1}{8} \cdot \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
            13. +-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\left(\frac{1}{8} \cdot 3\right), \left(\frac{1}{8} \cdot \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
            14. metadata-evalN/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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \left(\frac{1}{8} \cdot \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
            15. *-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \left(\mathsf{neg}\left(2 \cdot v\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
            16. *-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \left(\mathsf{neg}\left(v \cdot 2\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
            17. distribute-rgt-neg-inN/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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \left(v \cdot \left(\mathsf{neg}\left(2\right)\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
            18. *-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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(v, \left(\mathsf{neg}\left(2\right)\right)\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
            19. metadata-eval93.1%

              \[\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(r, \mathsf{*.f64}\left(r, \mathsf{*.f64}\left(w, w\right)\right)\right), \mathsf{\_.f64}\left(1, v\right)\right), \mathsf{+.f64}\left(\frac{3}{8}, \mathsf{*.f64}\left(\frac{1}{8}, \mathsf{*.f64}\left(v, -2\right)\right)\right)\right)\right), \frac{9}{2}\right) \]
          4. Applied egg-rr93.1%

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

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

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

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

                \[\leadsto \mathsf{neg}\left(\left(\frac{3}{2} + \frac{3}{8} \cdot \left({r}^{2} \cdot {w}^{2}\right)\right)\right) \]
              2. distribute-neg-inN/A

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

                \[\leadsto \frac{-3}{2} + \left(\mathsf{neg}\left(\color{blue}{\frac{3}{8} \cdot \left({r}^{2} \cdot {w}^{2}\right)}\right)\right) \]
              4. distribute-lft-neg-inN/A

                \[\leadsto \frac{-3}{2} + \left(\mathsf{neg}\left(\frac{3}{8}\right)\right) \cdot \color{blue}{\left({r}^{2} \cdot {w}^{2}\right)} \]
              5. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 10: 64.9% accurate, 2.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 5 \cdot 10^{+97}:\\ \;\;\;\;\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 5e+97) (+ (/ 2.0 (* r r)) -1.5) (* (* r r) (* -0.25 (* w w)))))
          double code(double v, double w, double r) {
          	double tmp;
          	if (r <= 5e+97) {
          		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 <= 5d+97) 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 <= 5e+97) {
          		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 <= 5e+97:
          		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 <= 5e+97)
          		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 <= 5e+97)
          		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, 5e+97], 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 5 \cdot 10^{+97}:\\
          \;\;\;\;\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 < 4.99999999999999999e97

            1. Initial program 83.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. Taylor expanded in w around 0

              \[\leadsto \color{blue}{2 \cdot \frac{1}{{r}^{2}} - \frac{3}{2}} \]
            4. Step-by-step derivation
              1. sub-negN/A

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

                \[\leadsto 2 \cdot \frac{1}{{r}^{2}} + \frac{-3}{2} \]
              3. +-commutativeN/A

                \[\leadsto \frac{-3}{2} + \color{blue}{2 \cdot \frac{1}{{r}^{2}}} \]
              4. +-lowering-+.f64N/A

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\frac{-3}{2}, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(r, \color{blue}{r}\right)\right)\right) \]
            5. Simplified68.6%

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

            if 4.99999999999999999e97 < r

            1. Initial program 87.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. Add Preprocessing
            3. Taylor expanded in v around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{-1}{4} \cdot \left({r}^{2} \cdot {w}^{2}\right)} \]
            7. 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. *-lowering-*.f64N/A

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), \left(\color{blue}{{w}^{2}} \cdot \frac{-1}{4}\right)\right) \]
              6. *-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) \]
              7. 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) \]
              8. *-lowering-*.f6471.3%

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;r \leq 5 \cdot 10^{+97}:\\ \;\;\;\;\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} \]
          5. Add Preprocessing

          Alternative 11: 50.9% accurate, 2.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;r \leq 1.15:\\ \;\;\;\;\frac{2}{r \cdot r}\\ \mathbf{else}:\\ \;\;\;\;-1.5\\ \end{array} \end{array} \]
          (FPCore (v w r) :precision binary64 (if (<= r 1.15) (/ 2.0 (* r r)) -1.5))
          double code(double v, double w, double r) {
          	double tmp;
          	if (r <= 1.15) {
          		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 <= 1.15d0) 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 <= 1.15) {
          		tmp = 2.0 / (r * r);
          	} else {
          		tmp = -1.5;
          	}
          	return tmp;
          }
          
          def code(v, w, r):
          	tmp = 0
          	if r <= 1.15:
          		tmp = 2.0 / (r * r)
          	else:
          		tmp = -1.5
          	return tmp
          
          function code(v, w, r)
          	tmp = 0.0
          	if (r <= 1.15)
          		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 <= 1.15)
          		tmp = 2.0 / (r * r);
          	else
          		tmp = -1.5;
          	end
          	tmp_2 = tmp;
          end
          
          code[v_, w_, r_] := If[LessEqual[r, 1.15], N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision], -1.5]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;r \leq 1.15:\\
          \;\;\;\;\frac{2}{r \cdot r}\\
          
          \mathbf{else}:\\
          \;\;\;\;-1.5\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if r < 1.1499999999999999

            1. Initial program 82.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. Add Preprocessing
            3. Taylor expanded in r around 0

              \[\leadsto \color{blue}{\frac{2}{{r}^{2}}} \]
            4. 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-*.f6456.7%

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

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

            if 1.1499999999999999 < r

            1. Initial program 88.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. Add Preprocessing
            3. Taylor expanded in r around 0

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), 3\right)\right), r\right), r\right), \frac{9}{2}\right) \]
            5. Simplified21.7%

              \[\leadsto \color{blue}{\frac{\frac{2 + \left(r \cdot r\right) \cdot 3}{r}}{r}} - 4.5 \]
            6. Taylor expanded in r around inf

              \[\leadsto \color{blue}{\frac{-3}{2}} \]
            7. Step-by-step derivation
              1. Simplified25.3%

                \[\leadsto \color{blue}{-1.5} \]
            8. Recombined 2 regimes into one program.
            9. Add Preprocessing

            Alternative 12: 57.7% 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 84.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. Add Preprocessing
            3. Taylor expanded in w around 0

              \[\leadsto \color{blue}{2 \cdot \frac{1}{{r}^{2}} - \frac{3}{2}} \]
            4. Step-by-step derivation
              1. sub-negN/A

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

                \[\leadsto 2 \cdot \frac{1}{{r}^{2}} + \frac{-3}{2} \]
              3. +-commutativeN/A

                \[\leadsto \frac{-3}{2} + \color{blue}{2 \cdot \frac{1}{{r}^{2}}} \]
              4. +-lowering-+.f64N/A

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

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

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

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

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

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

              \[\leadsto \color{blue}{-1.5 + \frac{2}{r \cdot r}} \]
            6. Final simplification59.4%

              \[\leadsto \frac{2}{r \cdot r} + -1.5 \]
            7. Add Preprocessing

            Alternative 13: 14.2% 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 84.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. Add Preprocessing
            3. Taylor expanded in r around 0

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(r, r\right), 3\right)\right), r\right), r\right), \frac{9}{2}\right) \]
            5. Simplified55.6%

              \[\leadsto \color{blue}{\frac{\frac{2 + \left(r \cdot r\right) \cdot 3}{r}}{r}} - 4.5 \]
            6. Taylor expanded in r around inf

              \[\leadsto \color{blue}{\frac{-3}{2}} \]
            7. Step-by-step derivation
              1. Simplified16.6%

                \[\leadsto \color{blue}{-1.5} \]
              2. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2024192 
              (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))