Jmat.Real.erfi, branch x less than or equal to 0.5

Percentage Accurate: 99.8% → 99.8%
Time: 13.3s
Alternatives: 14
Speedup: 8.3×

Specification

?
\[x \leq 0.5\]
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\\ t_1 := \left(t\_0 \cdot \left|x\right|\right) \cdot \left|x\right|\\ \left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot t\_0\right) + \frac{1}{5} \cdot t\_1\right) + \frac{1}{21} \cdot \left(\left(t\_1 \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* (* (fabs x) (fabs x)) (fabs x)))
        (t_1 (* (* t_0 (fabs x)) (fabs x))))
   (fabs
    (*
     (/ 1.0 (sqrt PI))
     (+
      (+ (+ (* 2.0 (fabs x)) (* (/ 2.0 3.0) t_0)) (* (/ 1.0 5.0) t_1))
      (* (/ 1.0 21.0) (* (* t_1 (fabs x)) (fabs x))))))))
double code(double x) {
	double t_0 = (fabs(x) * fabs(x)) * fabs(x);
	double t_1 = (t_0 * fabs(x)) * fabs(x);
	return fabs(((1.0 / sqrt(((double) M_PI))) * ((((2.0 * fabs(x)) + ((2.0 / 3.0) * t_0)) + ((1.0 / 5.0) * t_1)) + ((1.0 / 21.0) * ((t_1 * fabs(x)) * fabs(x))))));
}
public static double code(double x) {
	double t_0 = (Math.abs(x) * Math.abs(x)) * Math.abs(x);
	double t_1 = (t_0 * Math.abs(x)) * Math.abs(x);
	return Math.abs(((1.0 / Math.sqrt(Math.PI)) * ((((2.0 * Math.abs(x)) + ((2.0 / 3.0) * t_0)) + ((1.0 / 5.0) * t_1)) + ((1.0 / 21.0) * ((t_1 * Math.abs(x)) * Math.abs(x))))));
}
def code(x):
	t_0 = (math.fabs(x) * math.fabs(x)) * math.fabs(x)
	t_1 = (t_0 * math.fabs(x)) * math.fabs(x)
	return math.fabs(((1.0 / math.sqrt(math.pi)) * ((((2.0 * math.fabs(x)) + ((2.0 / 3.0) * t_0)) + ((1.0 / 5.0) * t_1)) + ((1.0 / 21.0) * ((t_1 * math.fabs(x)) * math.fabs(x))))))
function code(x)
	t_0 = Float64(Float64(abs(x) * abs(x)) * abs(x))
	t_1 = Float64(Float64(t_0 * abs(x)) * abs(x))
	return abs(Float64(Float64(1.0 / sqrt(pi)) * Float64(Float64(Float64(Float64(2.0 * abs(x)) + Float64(Float64(2.0 / 3.0) * t_0)) + Float64(Float64(1.0 / 5.0) * t_1)) + Float64(Float64(1.0 / 21.0) * Float64(Float64(t_1 * abs(x)) * abs(x))))))
end
function tmp = code(x)
	t_0 = (abs(x) * abs(x)) * abs(x);
	t_1 = (t_0 * abs(x)) * abs(x);
	tmp = abs(((1.0 / sqrt(pi)) * ((((2.0 * abs(x)) + ((2.0 / 3.0) * t_0)) + ((1.0 / 5.0) * t_1)) + ((1.0 / 21.0) * ((t_1 * abs(x)) * abs(x))))));
end
code[x_] := Block[{t$95$0 = N[(N[(N[Abs[x], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 * N[Abs[x], $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]}, N[Abs[N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(2.0 * N[Abs[x], $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / 3.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / 5.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / 21.0), $MachinePrecision] * N[(N[(t$95$1 * N[Abs[x], $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\\
t_1 := \left(t\_0 \cdot \left|x\right|\right) \cdot \left|x\right|\\
\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot t\_0\right) + \frac{1}{5} \cdot t\_1\right) + \frac{1}{21} \cdot \left(\left(t\_1 \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|
\end{array}
\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 14 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: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\\ t_1 := \left(t\_0 \cdot \left|x\right|\right) \cdot \left|x\right|\\ \left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot t\_0\right) + \frac{1}{5} \cdot t\_1\right) + \frac{1}{21} \cdot \left(\left(t\_1 \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* (* (fabs x) (fabs x)) (fabs x)))
        (t_1 (* (* t_0 (fabs x)) (fabs x))))
   (fabs
    (*
     (/ 1.0 (sqrt PI))
     (+
      (+ (+ (* 2.0 (fabs x)) (* (/ 2.0 3.0) t_0)) (* (/ 1.0 5.0) t_1))
      (* (/ 1.0 21.0) (* (* t_1 (fabs x)) (fabs x))))))))
double code(double x) {
	double t_0 = (fabs(x) * fabs(x)) * fabs(x);
	double t_1 = (t_0 * fabs(x)) * fabs(x);
	return fabs(((1.0 / sqrt(((double) M_PI))) * ((((2.0 * fabs(x)) + ((2.0 / 3.0) * t_0)) + ((1.0 / 5.0) * t_1)) + ((1.0 / 21.0) * ((t_1 * fabs(x)) * fabs(x))))));
}
public static double code(double x) {
	double t_0 = (Math.abs(x) * Math.abs(x)) * Math.abs(x);
	double t_1 = (t_0 * Math.abs(x)) * Math.abs(x);
	return Math.abs(((1.0 / Math.sqrt(Math.PI)) * ((((2.0 * Math.abs(x)) + ((2.0 / 3.0) * t_0)) + ((1.0 / 5.0) * t_1)) + ((1.0 / 21.0) * ((t_1 * Math.abs(x)) * Math.abs(x))))));
}
def code(x):
	t_0 = (math.fabs(x) * math.fabs(x)) * math.fabs(x)
	t_1 = (t_0 * math.fabs(x)) * math.fabs(x)
	return math.fabs(((1.0 / math.sqrt(math.pi)) * ((((2.0 * math.fabs(x)) + ((2.0 / 3.0) * t_0)) + ((1.0 / 5.0) * t_1)) + ((1.0 / 21.0) * ((t_1 * math.fabs(x)) * math.fabs(x))))))
function code(x)
	t_0 = Float64(Float64(abs(x) * abs(x)) * abs(x))
	t_1 = Float64(Float64(t_0 * abs(x)) * abs(x))
	return abs(Float64(Float64(1.0 / sqrt(pi)) * Float64(Float64(Float64(Float64(2.0 * abs(x)) + Float64(Float64(2.0 / 3.0) * t_0)) + Float64(Float64(1.0 / 5.0) * t_1)) + Float64(Float64(1.0 / 21.0) * Float64(Float64(t_1 * abs(x)) * abs(x))))))
end
function tmp = code(x)
	t_0 = (abs(x) * abs(x)) * abs(x);
	t_1 = (t_0 * abs(x)) * abs(x);
	tmp = abs(((1.0 / sqrt(pi)) * ((((2.0 * abs(x)) + ((2.0 / 3.0) * t_0)) + ((1.0 / 5.0) * t_1)) + ((1.0 / 21.0) * ((t_1 * abs(x)) * abs(x))))));
end
code[x_] := Block[{t$95$0 = N[(N[(N[Abs[x], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 * N[Abs[x], $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]}, N[Abs[N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(2.0 * N[Abs[x], $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / 3.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / 5.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / 21.0), $MachinePrecision] * N[(N[(t$95$1 * N[Abs[x], $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\\
t_1 := \left(t\_0 \cdot \left|x\right|\right) \cdot \left|x\right|\\
\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot t\_0\right) + \frac{1}{5} \cdot t\_1\right) + \frac{1}{21} \cdot \left(\left(t\_1 \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|
\end{array}
\end{array}

Alternative 1: 99.8% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + x \cdot \left(x \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right| \end{array} \]
(FPCore (x)
 :precision binary64
 (fabs
  (*
   (fabs x)
   (/
    (+
     2.0
     (*
      (* x x)
      (+
       0.6666666666666666
       (* (* x x) (+ 0.2 (* x (* x 0.047619047619047616)))))))
    (sqrt PI)))))
double code(double x) {
	return fabs((fabs(x) * ((2.0 + ((x * x) * (0.6666666666666666 + ((x * x) * (0.2 + (x * (x * 0.047619047619047616))))))) / sqrt(((double) M_PI)))));
}
public static double code(double x) {
	return Math.abs((Math.abs(x) * ((2.0 + ((x * x) * (0.6666666666666666 + ((x * x) * (0.2 + (x * (x * 0.047619047619047616))))))) / Math.sqrt(Math.PI))));
}
def code(x):
	return math.fabs((math.fabs(x) * ((2.0 + ((x * x) * (0.6666666666666666 + ((x * x) * (0.2 + (x * (x * 0.047619047619047616))))))) / math.sqrt(math.pi))))
function code(x)
	return abs(Float64(abs(x) * Float64(Float64(2.0 + Float64(Float64(x * x) * Float64(0.6666666666666666 + Float64(Float64(x * x) * Float64(0.2 + Float64(x * Float64(x * 0.047619047619047616))))))) / sqrt(pi))))
end
function tmp = code(x)
	tmp = abs((abs(x) * ((2.0 + ((x * x) * (0.6666666666666666 + ((x * x) * (0.2 + (x * (x * 0.047619047619047616))))))) / sqrt(pi))));
end
code[x_] := N[Abs[N[(N[Abs[x], $MachinePrecision] * N[(N[(2.0 + N[(N[(x * x), $MachinePrecision] * N[(0.6666666666666666 + N[(N[(x * x), $MachinePrecision] * N[(0.2 + N[(x * N[(x * 0.047619047619047616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + x \cdot \left(x \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right|
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
  2. Simplified99.9%

    \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{5}, \left(x \cdot \left(x \cdot \frac{1}{21}\right)\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{5}, \left(\left(x \cdot \frac{1}{21}\right) \cdot x\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{5}, \mathsf{*.f64}\left(\left(x \cdot \frac{1}{21}\right), x\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    4. *-lowering-*.f6499.9%

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{5}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{21}\right), x\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
  5. Applied egg-rr99.9%

    \[\leadsto \left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \color{blue}{\left(x \cdot 0.047619047619047616\right) \cdot x}\right)\right)}{\sqrt{\pi}}\right| \]
  6. Final simplification99.9%

    \[\leadsto \left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + x \cdot \left(x \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right| \]
  7. Add Preprocessing

Alternative 2: 99.3% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 5:\\ \;\;\;\;\left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot 0.2\right)\right)}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|x \cdot \left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\pi}}\right) \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right|\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= (fabs x) 5.0)
   (fabs
    (*
     x
     (/ (+ 2.0 (* (* x x) (+ 0.6666666666666666 (* x (* x 0.2))))) (sqrt PI))))
   (fabs
    (*
     x
     (* (* (* x x) (/ x (sqrt PI))) (* 0.047619047619047616 (* x (* x x))))))))
double code(double x) {
	double tmp;
	if (fabs(x) <= 5.0) {
		tmp = fabs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * 0.2))))) / sqrt(((double) M_PI)))));
	} else {
		tmp = fabs((x * (((x * x) * (x / sqrt(((double) M_PI)))) * (0.047619047619047616 * (x * (x * x))))));
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (Math.abs(x) <= 5.0) {
		tmp = Math.abs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * 0.2))))) / Math.sqrt(Math.PI))));
	} else {
		tmp = Math.abs((x * (((x * x) * (x / Math.sqrt(Math.PI))) * (0.047619047619047616 * (x * (x * x))))));
	}
	return tmp;
}
def code(x):
	tmp = 0
	if math.fabs(x) <= 5.0:
		tmp = math.fabs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * 0.2))))) / math.sqrt(math.pi))))
	else:
		tmp = math.fabs((x * (((x * x) * (x / math.sqrt(math.pi))) * (0.047619047619047616 * (x * (x * x))))))
	return tmp
function code(x)
	tmp = 0.0
	if (abs(x) <= 5.0)
		tmp = abs(Float64(x * Float64(Float64(2.0 + Float64(Float64(x * x) * Float64(0.6666666666666666 + Float64(x * Float64(x * 0.2))))) / sqrt(pi))));
	else
		tmp = abs(Float64(x * Float64(Float64(Float64(x * x) * Float64(x / sqrt(pi))) * Float64(0.047619047619047616 * Float64(x * Float64(x * x))))));
	end
	return tmp
end
function tmp_2 = code(x)
	tmp = 0.0;
	if (abs(x) <= 5.0)
		tmp = abs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * 0.2))))) / sqrt(pi))));
	else
		tmp = abs((x * (((x * x) * (x / sqrt(pi))) * (0.047619047619047616 * (x * (x * x))))));
	end
	tmp_2 = tmp;
end
code[x_] := If[LessEqual[N[Abs[x], $MachinePrecision], 5.0], N[Abs[N[(x * N[(N[(2.0 + N[(N[(x * x), $MachinePrecision] * N[(0.6666666666666666 + N[(x * N[(x * 0.2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(N[(N[(x * x), $MachinePrecision] * N[(x / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.047619047619047616 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\left|x\right| \leq 5:\\
\;\;\;\;\left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot 0.2\right)\right)}{\sqrt{\pi}}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|x \cdot \left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\pi}}\right) \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 x) < 5

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{5} \cdot x\right)}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{5}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. *-lowering-*.f6499.1%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{5}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    8. Simplified99.1%

      \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \color{blue}{\left(x \cdot 0.2\right)}\right)}{\sqrt{\pi}} \cdot x\right| \]

    if 5 < (fabs.f64 x)

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \color{blue}{\left(\frac{1}{21} \cdot \left({x}^{6} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)}\right)\right) \]
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\frac{1}{21} \cdot {x}^{6}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{6} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{\left(2 \cdot 3\right)} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{3} \cdot {x}^{3}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      5. cube-prodN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({\left(x \cdot x\right)}^{3} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({\left({x}^{2}\right)}^{3} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      7. cube-unmultN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot {x}^{\left(2 \cdot 2\right)}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot {x}^{4}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left({x}^{4} \cdot \frac{1}{21}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{4}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{\left(2 \cdot 2\right)}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      13. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      14. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot {x}^{2}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      17. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left({x}^{2} \cdot \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right) \]
      18. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot \left({x}^{2} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right)\right) \]
    6. Simplified98.1%

      \[\leadsto \left|\left|x\right| \cdot \color{blue}{\left(\left(x \cdot \left(x \cdot 0.047619047619047616\right)\right) \cdot \left(\sqrt{\frac{1}{\pi}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}\right| \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right), x\right)\right) \]
    8. Applied egg-rr98.2%

      \[\leadsto \color{blue}{\left|\left(\left(\left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot {\pi}^{-0.5}\right) \cdot x\right|} \]
    9. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right)\right), x\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right) \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot {\mathsf{PI}\left(\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      7. pow-flipN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \frac{1}{{\mathsf{PI}\left(\right)}^{\frac{1}{2}}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \frac{1}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      9. div-invN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot x\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      13. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      14. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      15. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{21}\right)\right), x\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), x\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{21}, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), x\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), x\right)\right) \]
      19. *-lowering-*.f6498.2%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), x\right)\right) \]
    10. Applied egg-rr98.2%

      \[\leadsto \left|\color{blue}{\left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\pi}}\right) \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)} \cdot x\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 5:\\ \;\;\;\;\left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot 0.2\right)\right)}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|x \cdot \left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\pi}}\right) \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 99.2% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 0.2:\\ \;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|x \cdot \left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\pi}}\right) \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right|\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= (fabs x) 0.2)
   (fabs (* x (/ (+ 2.0 (* x (* x 0.6666666666666666))) (sqrt PI))))
   (fabs
    (*
     x
     (* (* (* x x) (/ x (sqrt PI))) (* 0.047619047619047616 (* x (* x x))))))))
double code(double x) {
	double tmp;
	if (fabs(x) <= 0.2) {
		tmp = fabs((x * ((2.0 + (x * (x * 0.6666666666666666))) / sqrt(((double) M_PI)))));
	} else {
		tmp = fabs((x * (((x * x) * (x / sqrt(((double) M_PI)))) * (0.047619047619047616 * (x * (x * x))))));
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (Math.abs(x) <= 0.2) {
		tmp = Math.abs((x * ((2.0 + (x * (x * 0.6666666666666666))) / Math.sqrt(Math.PI))));
	} else {
		tmp = Math.abs((x * (((x * x) * (x / Math.sqrt(Math.PI))) * (0.047619047619047616 * (x * (x * x))))));
	}
	return tmp;
}
def code(x):
	tmp = 0
	if math.fabs(x) <= 0.2:
		tmp = math.fabs((x * ((2.0 + (x * (x * 0.6666666666666666))) / math.sqrt(math.pi))))
	else:
		tmp = math.fabs((x * (((x * x) * (x / math.sqrt(math.pi))) * (0.047619047619047616 * (x * (x * x))))))
	return tmp
function code(x)
	tmp = 0.0
	if (abs(x) <= 0.2)
		tmp = abs(Float64(x * Float64(Float64(2.0 + Float64(x * Float64(x * 0.6666666666666666))) / sqrt(pi))));
	else
		tmp = abs(Float64(x * Float64(Float64(Float64(x * x) * Float64(x / sqrt(pi))) * Float64(0.047619047619047616 * Float64(x * Float64(x * x))))));
	end
	return tmp
end
function tmp_2 = code(x)
	tmp = 0.0;
	if (abs(x) <= 0.2)
		tmp = abs((x * ((2.0 + (x * (x * 0.6666666666666666))) / sqrt(pi))));
	else
		tmp = abs((x * (((x * x) * (x / sqrt(pi))) * (0.047619047619047616 * (x * (x * x))))));
	end
	tmp_2 = tmp;
end
code[x_] := If[LessEqual[N[Abs[x], $MachinePrecision], 0.2], N[Abs[N[(x * N[(N[(2.0 + N[(x * N[(x * 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(N[(N[(x * x), $MachinePrecision] * N[(x / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.047619047619047616 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\left|x\right| \leq 0.2:\\
\;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|x \cdot \left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\pi}}\right) \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 x) < 0.20000000000000001

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + {x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + {x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{4} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({x}^{2}\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(x \cdot x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left({x}^{2} \cdot \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      19. *-lowering-*.f6499.6%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    8. Simplified99.6%

      \[\leadsto \left|\frac{\color{blue}{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot 0.2\right)}}{\sqrt{\pi}} \cdot x\right| \]
    9. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + \frac{2}{3} \cdot {x}^{2}\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot \left(x \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{2}{3} \cdot x\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \left(\frac{2}{3} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(\frac{2}{3} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(x \cdot \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. *-lowering-*.f6499.1%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    11. Simplified99.1%

      \[\leadsto \left|\frac{\color{blue}{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}}{\sqrt{\pi}} \cdot x\right| \]

    if 0.20000000000000001 < (fabs.f64 x)

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \color{blue}{\left(\frac{1}{21} \cdot \left({x}^{6} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)}\right)\right) \]
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\frac{1}{21} \cdot {x}^{6}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{6} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{\left(2 \cdot 3\right)} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{3} \cdot {x}^{3}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      5. cube-prodN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({\left(x \cdot x\right)}^{3} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({\left({x}^{2}\right)}^{3} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      7. cube-unmultN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot {x}^{\left(2 \cdot 2\right)}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot {x}^{4}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left({x}^{4} \cdot \frac{1}{21}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{4}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{\left(2 \cdot 2\right)}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      13. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      14. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot {x}^{2}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      17. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left({x}^{2} \cdot \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right) \]
      18. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot \left({x}^{2} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right)\right) \]
    6. Simplified97.1%

      \[\leadsto \left|\left|x\right| \cdot \color{blue}{\left(\left(x \cdot \left(x \cdot 0.047619047619047616\right)\right) \cdot \left(\sqrt{\frac{1}{\pi}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}\right| \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right), x\right)\right) \]
    8. Applied egg-rr97.1%

      \[\leadsto \color{blue}{\left|\left(\left(\left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot {\pi}^{-0.5}\right) \cdot x\right|} \]
    9. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right)\right), x\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right) \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot {\mathsf{PI}\left(\right)}^{\frac{-1}{2}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot {\mathsf{PI}\left(\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      7. pow-flipN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \frac{1}{{\mathsf{PI}\left(\right)}^{\frac{1}{2}}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \frac{1}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      9. div-invN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot x\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      13. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      14. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right), x\right)\right) \]
      15. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{21}\right)\right), x\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), x\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{21}, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), x\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), x\right)\right) \]
      19. *-lowering-*.f6497.2%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), x\right)\right) \]
    10. Applied egg-rr97.2%

      \[\leadsto \left|\color{blue}{\left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\pi}}\right) \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)} \cdot x\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 0.2:\\ \;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|x \cdot \left(\left(\left(x \cdot x\right) \cdot \frac{x}{\sqrt{\pi}}\right) \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.2% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot x\right)\\ \mathbf{if}\;\left|x\right| \leq 0.2:\\ \;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t\_0 \cdot \left(\frac{x}{\sqrt{\pi}} \cdot \left(0.047619047619047616 \cdot t\_0\right)\right)\right|\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* x (* x x))))
   (if (<= (fabs x) 0.2)
     (fabs (* x (/ (+ 2.0 (* x (* x 0.6666666666666666))) (sqrt PI))))
     (fabs (* t_0 (* (/ x (sqrt PI)) (* 0.047619047619047616 t_0)))))))
double code(double x) {
	double t_0 = x * (x * x);
	double tmp;
	if (fabs(x) <= 0.2) {
		tmp = fabs((x * ((2.0 + (x * (x * 0.6666666666666666))) / sqrt(((double) M_PI)))));
	} else {
		tmp = fabs((t_0 * ((x / sqrt(((double) M_PI))) * (0.047619047619047616 * t_0))));
	}
	return tmp;
}
public static double code(double x) {
	double t_0 = x * (x * x);
	double tmp;
	if (Math.abs(x) <= 0.2) {
		tmp = Math.abs((x * ((2.0 + (x * (x * 0.6666666666666666))) / Math.sqrt(Math.PI))));
	} else {
		tmp = Math.abs((t_0 * ((x / Math.sqrt(Math.PI)) * (0.047619047619047616 * t_0))));
	}
	return tmp;
}
def code(x):
	t_0 = x * (x * x)
	tmp = 0
	if math.fabs(x) <= 0.2:
		tmp = math.fabs((x * ((2.0 + (x * (x * 0.6666666666666666))) / math.sqrt(math.pi))))
	else:
		tmp = math.fabs((t_0 * ((x / math.sqrt(math.pi)) * (0.047619047619047616 * t_0))))
	return tmp
function code(x)
	t_0 = Float64(x * Float64(x * x))
	tmp = 0.0
	if (abs(x) <= 0.2)
		tmp = abs(Float64(x * Float64(Float64(2.0 + Float64(x * Float64(x * 0.6666666666666666))) / sqrt(pi))));
	else
		tmp = abs(Float64(t_0 * Float64(Float64(x / sqrt(pi)) * Float64(0.047619047619047616 * t_0))));
	end
	return tmp
end
function tmp_2 = code(x)
	t_0 = x * (x * x);
	tmp = 0.0;
	if (abs(x) <= 0.2)
		tmp = abs((x * ((2.0 + (x * (x * 0.6666666666666666))) / sqrt(pi))));
	else
		tmp = abs((t_0 * ((x / sqrt(pi)) * (0.047619047619047616 * t_0))));
	end
	tmp_2 = tmp;
end
code[x_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[x], $MachinePrecision], 0.2], N[Abs[N[(x * N[(N[(2.0 + N[(x * N[(x * 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$0 * N[(N[(x / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(0.047619047619047616 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;\left|x\right| \leq 0.2:\\
\;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|t\_0 \cdot \left(\frac{x}{\sqrt{\pi}} \cdot \left(0.047619047619047616 \cdot t\_0\right)\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 x) < 0.20000000000000001

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + {x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + {x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{4} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({x}^{2}\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(x \cdot x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left({x}^{2} \cdot \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      19. *-lowering-*.f6499.6%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    8. Simplified99.6%

      \[\leadsto \left|\frac{\color{blue}{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot 0.2\right)}}{\sqrt{\pi}} \cdot x\right| \]
    9. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + \frac{2}{3} \cdot {x}^{2}\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot \left(x \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{2}{3} \cdot x\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \left(\frac{2}{3} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(\frac{2}{3} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(x \cdot \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. *-lowering-*.f6499.1%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    11. Simplified99.1%

      \[\leadsto \left|\frac{\color{blue}{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}}{\sqrt{\pi}} \cdot x\right| \]

    if 0.20000000000000001 < (fabs.f64 x)

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \color{blue}{\left(\frac{1}{21} \cdot \left({x}^{6} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)}\right)\right) \]
    5. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\frac{1}{21} \cdot {x}^{6}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{6} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{\left(2 \cdot 3\right)} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{3} \cdot {x}^{3}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      5. cube-prodN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({\left(x \cdot x\right)}^{3} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({\left({x}^{2}\right)}^{3} \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      7. cube-unmultN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot {x}^{\left(2 \cdot 2\right)}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left(\left({x}^{2} \cdot {x}^{4}\right) \cdot \frac{1}{21}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left({x}^{4} \cdot \frac{1}{21}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{4}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{\left(2 \cdot 2\right)}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      13. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      14. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot {x}^{2}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left(\left({x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left(\left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      17. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left({x}^{2} \cdot \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right) \]
      18. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \left({x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot \left({x}^{2} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right)\right) \]
    6. Simplified97.1%

      \[\leadsto \left|\left|x\right| \cdot \color{blue}{\left(\left(x \cdot \left(x \cdot 0.047619047619047616\right)\right) \cdot \left(\sqrt{\frac{1}{\pi}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}\right| \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot \left(x \cdot \frac{1}{21}\right)\right) \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right), x\right)\right) \]
    8. Applied egg-rr97.1%

      \[\leadsto \color{blue}{\left|\left(\left(\left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot {\pi}^{-0.5}\right) \cdot x\right|} \]
    9. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left({\mathsf{PI}\left(\right)}^{\frac{-1}{2}} \cdot x\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right) \cdot \left({\mathsf{PI}\left(\right)}^{\frac{-1}{2}} \cdot x\right)\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left({\mathsf{PI}\left(\right)}^{\frac{-1}{2}} \cdot x\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(x \cdot \left(x \cdot x\right)\right), \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left({\mathsf{PI}\left(\right)}^{\frac{-1}{2}} \cdot x\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot x\right)\right), \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left({\mathsf{PI}\left(\right)}^{\frac{-1}{2}} \cdot x\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left({\mathsf{PI}\left(\right)}^{\frac{-1}{2}} \cdot x\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left({\mathsf{PI}\left(\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot x\right)\right)\right)\right) \]
      8. pow-flipN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left(\frac{1}{{\mathsf{PI}\left(\right)}^{\frac{1}{2}}} \cdot x\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \left(\frac{1}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right)\right)\right) \]
      10. associate-/r/N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \frac{1}{\frac{\sqrt{\mathsf{PI}\left(\right)}}{x}}\right)\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right) \cdot \frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{21}\right)\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{21}\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{21}, \left(x \cdot \left(x \cdot x\right)\right)\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(x, \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
      19. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
      20. PI-lowering-PI.f6497.1%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{21}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right) \]
    10. Applied egg-rr97.1%

      \[\leadsto \left|\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \frac{x}{\sqrt{\pi}}\right)}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 0.2:\\ \;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\frac{x}{\sqrt{\pi}} \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 93.6% accurate, 5.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 0.2:\\ \;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|x \cdot \frac{x \cdot \left(0.2 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{\sqrt{\pi}}\right|\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= (fabs x) 0.2)
   (fabs (* x (/ (+ 2.0 (* x (* x 0.6666666666666666))) (sqrt PI))))
   (fabs (* x (/ (* x (* 0.2 (* x (* x x)))) (sqrt PI))))))
double code(double x) {
	double tmp;
	if (fabs(x) <= 0.2) {
		tmp = fabs((x * ((2.0 + (x * (x * 0.6666666666666666))) / sqrt(((double) M_PI)))));
	} else {
		tmp = fabs((x * ((x * (0.2 * (x * (x * x)))) / sqrt(((double) M_PI)))));
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (Math.abs(x) <= 0.2) {
		tmp = Math.abs((x * ((2.0 + (x * (x * 0.6666666666666666))) / Math.sqrt(Math.PI))));
	} else {
		tmp = Math.abs((x * ((x * (0.2 * (x * (x * x)))) / Math.sqrt(Math.PI))));
	}
	return tmp;
}
def code(x):
	tmp = 0
	if math.fabs(x) <= 0.2:
		tmp = math.fabs((x * ((2.0 + (x * (x * 0.6666666666666666))) / math.sqrt(math.pi))))
	else:
		tmp = math.fabs((x * ((x * (0.2 * (x * (x * x)))) / math.sqrt(math.pi))))
	return tmp
function code(x)
	tmp = 0.0
	if (abs(x) <= 0.2)
		tmp = abs(Float64(x * Float64(Float64(2.0 + Float64(x * Float64(x * 0.6666666666666666))) / sqrt(pi))));
	else
		tmp = abs(Float64(x * Float64(Float64(x * Float64(0.2 * Float64(x * Float64(x * x)))) / sqrt(pi))));
	end
	return tmp
end
function tmp_2 = code(x)
	tmp = 0.0;
	if (abs(x) <= 0.2)
		tmp = abs((x * ((2.0 + (x * (x * 0.6666666666666666))) / sqrt(pi))));
	else
		tmp = abs((x * ((x * (0.2 * (x * (x * x)))) / sqrt(pi))));
	end
	tmp_2 = tmp;
end
code[x_] := If[LessEqual[N[Abs[x], $MachinePrecision], 0.2], N[Abs[N[(x * N[(N[(2.0 + N[(x * N[(x * 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(N[(x * N[(0.2 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\left|x\right| \leq 0.2:\\
\;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|x \cdot \frac{x \cdot \left(0.2 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{\sqrt{\pi}}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 x) < 0.20000000000000001

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + {x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + {x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{4} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({x}^{2}\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(x \cdot x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left({x}^{2} \cdot \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      19. *-lowering-*.f6499.6%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    8. Simplified99.6%

      \[\leadsto \left|\frac{\color{blue}{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot 0.2\right)}}{\sqrt{\pi}} \cdot x\right| \]
    9. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + \frac{2}{3} \cdot {x}^{2}\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot \left(x \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{2}{3} \cdot x\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \left(\frac{2}{3} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(\frac{2}{3} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(x \cdot \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. *-lowering-*.f6499.1%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    11. Simplified99.1%

      \[\leadsto \left|\frac{\color{blue}{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}}{\sqrt{\pi}} \cdot x\right| \]

    if 0.20000000000000001 < (fabs.f64 x)

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + {x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + {x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{4} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({x}^{2}\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(x \cdot x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left({x}^{2} \cdot \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      19. *-lowering-*.f6482.7%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    8. Simplified82.7%

      \[\leadsto \left|\frac{\color{blue}{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot 0.2\right)}}{\sqrt{\pi}} \cdot x\right| \]
    9. Taylor expanded in x around inf

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \color{blue}{\left(\frac{1}{5} \cdot {x}^{4}\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    10. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. unpow2N/A

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(x \cdot \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2} \cdot \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. *-lowering-*.f6482.6%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    11. Simplified82.6%

      \[\leadsto \left|\frac{2 + \color{blue}{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.2\right)\right)}}{\sqrt{\pi}} \cdot x\right| \]
    12. Taylor expanded in x around inf

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{1}{5} \cdot {x}^{4}\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    13. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot \left(x \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right) \cdot x\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(x \cdot \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{5} \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. unpow3N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{5} \cdot {x}^{3}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{5}, \left({x}^{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. cube-multN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{5}, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{5}, \left(x \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{5}, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{5}, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      16. *-lowering-*.f6482.6%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{5}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    14. Simplified82.6%

      \[\leadsto \left|\frac{\color{blue}{x \cdot \left(0.2 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}}{\sqrt{\pi}} \cdot x\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 0.2:\\ \;\;\;\;\left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|x \cdot \frac{x \cdot \left(0.2 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{\sqrt{\pi}}\right|\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 89.2% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 0.2:\\ \;\;\;\;\left|x \cdot \frac{2}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|x \cdot \left(\left(x \cdot x\right) \cdot 0.6666666666666666\right)\right|}{\sqrt{\pi}}\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= (fabs x) 0.2)
   (fabs (* x (/ 2.0 (sqrt PI))))
   (/ (fabs (* x (* (* x x) 0.6666666666666666))) (sqrt PI))))
double code(double x) {
	double tmp;
	if (fabs(x) <= 0.2) {
		tmp = fabs((x * (2.0 / sqrt(((double) M_PI)))));
	} else {
		tmp = fabs((x * ((x * x) * 0.6666666666666666))) / sqrt(((double) M_PI));
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (Math.abs(x) <= 0.2) {
		tmp = Math.abs((x * (2.0 / Math.sqrt(Math.PI))));
	} else {
		tmp = Math.abs((x * ((x * x) * 0.6666666666666666))) / Math.sqrt(Math.PI);
	}
	return tmp;
}
def code(x):
	tmp = 0
	if math.fabs(x) <= 0.2:
		tmp = math.fabs((x * (2.0 / math.sqrt(math.pi))))
	else:
		tmp = math.fabs((x * ((x * x) * 0.6666666666666666))) / math.sqrt(math.pi)
	return tmp
function code(x)
	tmp = 0.0
	if (abs(x) <= 0.2)
		tmp = abs(Float64(x * Float64(2.0 / sqrt(pi))));
	else
		tmp = Float64(abs(Float64(x * Float64(Float64(x * x) * 0.6666666666666666))) / sqrt(pi));
	end
	return tmp
end
function tmp_2 = code(x)
	tmp = 0.0;
	if (abs(x) <= 0.2)
		tmp = abs((x * (2.0 / sqrt(pi))));
	else
		tmp = abs((x * ((x * x) * 0.6666666666666666))) / sqrt(pi);
	end
	tmp_2 = tmp;
end
code[x_] := If[LessEqual[N[Abs[x], $MachinePrecision], 0.2], N[Abs[N[(x * N[(2.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Abs[N[(x * N[(N[(x * x), $MachinePrecision] * 0.6666666666666666), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\left|x\right| \leq 0.2:\\
\;\;\;\;\left|x \cdot \frac{2}{\sqrt{\pi}}\right|\\

\mathbf{else}:\\
\;\;\;\;\frac{\left|x \cdot \left(\left(x \cdot x\right) \cdot 0.6666666666666666\right)\right|}{\sqrt{\pi}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 x) < 0.20000000000000001

    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{2}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. Simplified98.3%

        \[\leadsto \left|\frac{\color{blue}{2}}{\sqrt{\pi}} \cdot x\right| \]

      if 0.20000000000000001 < (fabs.f64 x)

      1. Initial program 99.8%

        \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
      2. Simplified99.9%

        \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
      3. Add Preprocessing
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
        2. fabs-mulN/A

          \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
        3. fabs-fabsN/A

          \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
        4. mul-fabsN/A

          \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
        5. fabs-lowering-fabs.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
      5. Applied egg-rr99.9%

        \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
      6. Taylor expanded in x around 0

        \[\leadsto \mathsf{fabs.f64}\left(\color{blue}{\left(x \cdot \left(\frac{2}{3} \cdot \left({x}^{2} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right) + 2 \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)}\right) \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(x \cdot \left(2 \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}} + \frac{2}{3} \cdot \left({x}^{2} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
        2. distribute-lft-inN/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(x \cdot \left(2 \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right) + x \cdot \left(\frac{2}{3} \cdot \left({x}^{2} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
        3. associate-*r*N/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(\left(x \cdot 2\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}} + x \cdot \left(\frac{2}{3} \cdot \left({x}^{2} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
        4. *-commutativeN/A

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

          \[\leadsto \mathsf{fabs.f64}\left(\left(\left(2 \cdot x\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}} + x \cdot \left(\left(\frac{2}{3} \cdot {x}^{2}\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
        6. associate-*r*N/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(\left(2 \cdot x\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}} + \left(x \cdot \left(\frac{2}{3} \cdot {x}^{2}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right) \]
        7. distribute-rgt-outN/A

          \[\leadsto \mathsf{fabs.f64}\left(\left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(2 \cdot x + x \cdot \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right), \left(2 \cdot x + x \cdot \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right) \]
        9. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\mathsf{PI}\left(\right)}\right)\right), \left(2 \cdot x + x \cdot \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI}\left(\right)\right)\right), \left(2 \cdot x + x \cdot \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right) \]
        11. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI.f64}\left(\right)\right)\right), \left(2 \cdot x + x \cdot \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right) \]
        12. *-commutativeN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI.f64}\left(\right)\right)\right), \left(x \cdot 2 + x \cdot \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right) \]
        13. distribute-lft-outN/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI.f64}\left(\right)\right)\right), \left(x \cdot \left(2 + \frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{*.f64}\left(x, \left(2 + \frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right) \]
        15. +-lowering-+.f64N/A

          \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right)\right)\right) \]
      8. Simplified67.9%

        \[\leadsto \left|\color{blue}{\sqrt{\frac{1}{\pi}} \cdot \left(x \cdot \left(2 + \left(x \cdot x\right) \cdot 0.6666666666666666\right)\right)}\right| \]
      9. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left|\left(x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right| \]
        2. sqrt-divN/A

          \[\leadsto \left|\left(x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right) \cdot \frac{\sqrt{1}}{\sqrt{\mathsf{PI}\left(\right)}}\right| \]
        3. metadata-evalN/A

          \[\leadsto \left|\left(x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right) \cdot \frac{1}{\sqrt{\mathsf{PI}\left(\right)}}\right| \]
        4. un-div-invN/A

          \[\leadsto \left|\frac{x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \]
        5. fabs-divN/A

          \[\leadsto \frac{\left|x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right|}{\color{blue}{\left|\sqrt{\mathsf{PI}\left(\right)}\right|}} \]
        6. rem-sqrt-squareN/A

          \[\leadsto \frac{\left|x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right|}{\sqrt{\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}}} \]
        7. add-sqr-sqrtN/A

          \[\leadsto \frac{\left|x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right|}{\sqrt{\mathsf{PI}\left(\right)}} \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left|x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right|\right), \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)}\right)}\right) \]
        9. fabs-lowering-fabs.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\left(x \cdot \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right)\right), \left(\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \left(2 + \left(x \cdot x\right) \cdot \frac{2}{3}\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(2, \left(\left(x \cdot x\right) \cdot \frac{2}{3}\right)\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right) \]
        12. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot \left(x \cdot x\right)\right)\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{2}{3}, \left(x \cdot x\right)\right)\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, x\right)\right)\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right) \]
        15. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, x\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right) \]
        16. PI-lowering-PI.f6467.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, x\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
      10. Applied egg-rr67.9%

        \[\leadsto \color{blue}{\frac{\left|x \cdot \left(2 + 0.6666666666666666 \cdot \left(x \cdot x\right)\right)\right|}{\sqrt{\pi}}} \]
      11. Taylor expanded in x around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\color{blue}{\left(\frac{2}{3} \cdot {x}^{3}\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
      12. Step-by-step derivation
        1. unpow3N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\left(\frac{2}{3} \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\left(\frac{2}{3} \cdot \left({x}^{2} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
        3. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\left(\left(\frac{2}{3} \cdot {x}^{2}\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\left(x \cdot \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{2}{3} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{2} \cdot \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
        9. *-lowering-*.f6467.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{fabs.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right) \]
      13. Simplified67.9%

        \[\leadsto \frac{\left|\color{blue}{x \cdot \left(\left(x \cdot x\right) \cdot 0.6666666666666666\right)}\right|}{\sqrt{\pi}} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification89.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 0.2:\\ \;\;\;\;\left|x \cdot \frac{2}{\sqrt{\pi}}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|x \cdot \left(\left(x \cdot x\right) \cdot 0.6666666666666666\right)\right|}{\sqrt{\pi}}\\ \end{array} \]
    10. Add Preprocessing

    Alternative 7: 99.8% accurate, 8.3× speedup?

    \[\begin{array}{l} \\ \left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right| \end{array} \]
    (FPCore (x)
     :precision binary64
     (fabs
      (*
       x
       (/
        (+
         2.0
         (*
          (* x x)
          (+
           0.6666666666666666
           (* x (* x (+ 0.2 (* (* x x) 0.047619047619047616)))))))
        (sqrt PI)))))
    double code(double x) {
    	return fabs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * (0.2 + ((x * x) * 0.047619047619047616))))))) / sqrt(((double) M_PI)))));
    }
    
    public static double code(double x) {
    	return Math.abs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * (0.2 + ((x * x) * 0.047619047619047616))))))) / Math.sqrt(Math.PI))));
    }
    
    def code(x):
    	return math.fabs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * (0.2 + ((x * x) * 0.047619047619047616))))))) / math.sqrt(math.pi))))
    
    function code(x)
    	return abs(Float64(x * Float64(Float64(2.0 + Float64(Float64(x * x) * Float64(0.6666666666666666 + Float64(x * Float64(x * Float64(0.2 + Float64(Float64(x * x) * 0.047619047619047616))))))) / sqrt(pi))))
    end
    
    function tmp = code(x)
    	tmp = abs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * (0.2 + ((x * x) * 0.047619047619047616))))))) / sqrt(pi))));
    end
    
    code[x_] := N[Abs[N[(x * N[(N[(2.0 + N[(N[(x * x), $MachinePrecision] * N[(0.6666666666666666 + N[(x * N[(x * N[(0.2 + N[(N[(x * x), $MachinePrecision] * 0.047619047619047616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right|
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Final simplification99.9%

      \[\leadsto \left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right| \]
    7. Add Preprocessing

    Alternative 8: 99.4% accurate, 8.3× speedup?

    \[\begin{array}{l} \\ \left|\left(2 + x \cdot \left(x \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + x \cdot \left(x \cdot 0.047619047619047616\right)\right)\right)\right)\right) \cdot \frac{x}{\sqrt{\pi}}\right| \end{array} \]
    (FPCore (x)
     :precision binary64
     (fabs
      (*
       (+
        2.0
        (*
         x
         (*
          x
          (+
           0.6666666666666666
           (* (* x x) (+ 0.2 (* x (* x 0.047619047619047616))))))))
       (/ x (sqrt PI)))))
    double code(double x) {
    	return fabs(((2.0 + (x * (x * (0.6666666666666666 + ((x * x) * (0.2 + (x * (x * 0.047619047619047616)))))))) * (x / sqrt(((double) M_PI)))));
    }
    
    public static double code(double x) {
    	return Math.abs(((2.0 + (x * (x * (0.6666666666666666 + ((x * x) * (0.2 + (x * (x * 0.047619047619047616)))))))) * (x / Math.sqrt(Math.PI))));
    }
    
    def code(x):
    	return math.fabs(((2.0 + (x * (x * (0.6666666666666666 + ((x * x) * (0.2 + (x * (x * 0.047619047619047616)))))))) * (x / math.sqrt(math.pi))))
    
    function code(x)
    	return abs(Float64(Float64(2.0 + Float64(x * Float64(x * Float64(0.6666666666666666 + Float64(Float64(x * x) * Float64(0.2 + Float64(x * Float64(x * 0.047619047619047616)))))))) * Float64(x / sqrt(pi))))
    end
    
    function tmp = code(x)
    	tmp = abs(((2.0 + (x * (x * (0.6666666666666666 + ((x * x) * (0.2 + (x * (x * 0.047619047619047616)))))))) * (x / sqrt(pi))));
    end
    
    code[x_] := N[Abs[N[(N[(2.0 + N[(x * N[(x * N[(0.6666666666666666 + N[(N[(x * x), $MachinePrecision] * N[(0.2 + N[(x * N[(x * 0.047619047619047616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|\left(2 + x \cdot \left(x \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + x \cdot \left(x \cdot 0.047619047619047616\right)\right)\right)\right)\right) \cdot \frac{x}{\sqrt{\pi}}\right|
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{\left(2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + x \cdot \left(x \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right)\right) \cdot x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\left(2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + x \cdot \left(x \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right)\right) \cdot \frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + x \cdot \left(x \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right)\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
    7. Applied egg-rr99.4%

      \[\leadsto \left|\color{blue}{\left(2 + x \cdot \left(x \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)\right) \cdot \frac{x}{\sqrt{\pi}}}\right| \]
    8. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{5}, \left(x \cdot \left(x \cdot \frac{1}{21}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{5}, \left(\left(x \cdot \frac{1}{21}\right) \cdot x\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{5}, \mathsf{*.f64}\left(\left(x \cdot \frac{1}{21}\right), x\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f6499.4%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{5}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \frac{1}{21}\right), x\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    9. Applied egg-rr99.4%

      \[\leadsto \left|\left(2 + x \cdot \left(x \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \color{blue}{\left(x \cdot 0.047619047619047616\right) \cdot x}\right)\right)\right)\right) \cdot \frac{x}{\sqrt{\pi}}\right| \]
    10. Final simplification99.4%

      \[\leadsto \left|\left(2 + x \cdot \left(x \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + x \cdot \left(x \cdot 0.047619047619047616\right)\right)\right)\right)\right) \cdot \frac{x}{\sqrt{\pi}}\right| \]
    11. Add Preprocessing

    Alternative 9: 99.2% accurate, 8.4× speedup?

    \[\begin{array}{l} \\ \left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right| \end{array} \]
    (FPCore (x)
     :precision binary64
     (fabs
      (*
       x
       (/
        (+
         2.0
         (*
          (* x x)
          (+ 0.6666666666666666 (* x (* x (* (* x x) 0.047619047619047616))))))
        (sqrt PI)))))
    double code(double x) {
    	return fabs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * ((x * x) * 0.047619047619047616)))))) / sqrt(((double) M_PI)))));
    }
    
    public static double code(double x) {
    	return Math.abs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * ((x * x) * 0.047619047619047616)))))) / Math.sqrt(Math.PI))));
    }
    
    def code(x):
    	return math.fabs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * ((x * x) * 0.047619047619047616)))))) / math.sqrt(math.pi))))
    
    function code(x)
    	return abs(Float64(x * Float64(Float64(2.0 + Float64(Float64(x * x) * Float64(0.6666666666666666 + Float64(x * Float64(x * Float64(Float64(x * x) * 0.047619047619047616)))))) / sqrt(pi))))
    end
    
    function tmp = code(x)
    	tmp = abs((x * ((2.0 + ((x * x) * (0.6666666666666666 + (x * (x * ((x * x) * 0.047619047619047616)))))) / sqrt(pi))));
    end
    
    code[x_] := N[Abs[N[(x * N[(N[(2.0 + N[(N[(x * x), $MachinePrecision] * N[(0.6666666666666666 + N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.047619047619047616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right|
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around inf

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{21} \cdot {x}^{3}\right)}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. unpow3N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \left(\frac{1}{21} \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \left(\frac{1}{21} \cdot \left({x}^{2} \cdot x\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot x\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \left(x \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2} \cdot \frac{1}{21}\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{21}\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{21}\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. *-lowering-*.f6498.5%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{21}\right)\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    8. Simplified98.5%

      \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \color{blue}{\left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}\right)}{\sqrt{\pi}} \cdot x\right| \]
    9. Final simplification98.5%

      \[\leadsto \left|x \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}}\right| \]
    10. Add Preprocessing

    Alternative 10: 98.9% accurate, 8.4× speedup?

    \[\begin{array}{l} \\ \left|x \cdot \frac{2 + \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)}{\sqrt{\pi}}\right| \end{array} \]
    (FPCore (x)
     :precision binary64
     (fabs
      (*
       x
       (/
        (+ 2.0 (* (* x (* (* x x) 0.047619047619047616)) (* x (* x x))))
        (sqrt PI)))))
    double code(double x) {
    	return fabs((x * ((2.0 + ((x * ((x * x) * 0.047619047619047616)) * (x * (x * x)))) / sqrt(((double) M_PI)))));
    }
    
    public static double code(double x) {
    	return Math.abs((x * ((2.0 + ((x * ((x * x) * 0.047619047619047616)) * (x * (x * x)))) / Math.sqrt(Math.PI))));
    }
    
    def code(x):
    	return math.fabs((x * ((2.0 + ((x * ((x * x) * 0.047619047619047616)) * (x * (x * x)))) / math.sqrt(math.pi))))
    
    function code(x)
    	return abs(Float64(x * Float64(Float64(2.0 + Float64(Float64(x * Float64(Float64(x * x) * 0.047619047619047616)) * Float64(x * Float64(x * x)))) / sqrt(pi))))
    end
    
    function tmp = code(x)
    	tmp = abs((x * ((2.0 + ((x * ((x * x) * 0.047619047619047616)) * (x * (x * x)))) / sqrt(pi))));
    end
    
    code[x_] := N[Abs[N[(x * N[(N[(2.0 + N[(N[(x * N[(N[(x * x), $MachinePrecision] * 0.047619047619047616), $MachinePrecision]), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|x \cdot \frac{2 + \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)}{\sqrt{\pi}}\right|
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \color{blue}{\left(\frac{1}{21} \cdot {x}^{6}\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{6} \cdot \frac{1}{21}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{\left(2 \cdot 3\right)} \cdot \frac{1}{21}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      3. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left({x}^{3} \cdot {x}^{3}\right) \cdot \frac{1}{21}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      4. cube-prodN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({\left(x \cdot x\right)}^{3} \cdot \frac{1}{21}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({\left({x}^{2}\right)}^{3} \cdot \frac{1}{21}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      6. cube-unmultN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left({x}^{2} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right) \cdot \frac{1}{21}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      7. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left({x}^{2} \cdot {x}^{\left(2 \cdot 2\right)}\right) \cdot \frac{1}{21}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left({x}^{2} \cdot {x}^{4}\right) \cdot \frac{1}{21}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left({x}^{4} \cdot \frac{1}{21}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{4}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{\left(2 \cdot 2\right)}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      12. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{21} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      13. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(x \cdot x\right) \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      16. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \left(x \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(x \cdot \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2} \cdot \left(\frac{1}{21} \cdot {x}^{2}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\left(\frac{1}{21} \cdot {x}^{2}\right) \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      20. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{21} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      21. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{21} \cdot {x}^{\left(2 \cdot 2\right)}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{21} \cdot {x}^{4}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      23. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{21}, \left({x}^{4}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      24. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{21}, \left({x}^{\left(2 \cdot 2\right)}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      25. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{fabs.f64}\left(x\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{21}, \left({x}^{2} \cdot {x}^{2}\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    6. Simplified98.0%

      \[\leadsto \left|\left|x\right| \cdot \frac{2 + \color{blue}{x \cdot \left(x \cdot \left(0.047619047619047616 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}}{\sqrt{\pi}}\right| \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + x \cdot \left(x \cdot \left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + x \cdot \left(x \cdot \left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + x \cdot \left(x \cdot \left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + x \cdot \left(x \cdot \left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + x \cdot \left(x \cdot \left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + x \cdot \left(x \cdot \left(\frac{1}{21} \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    8. Applied egg-rr98.0%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    9. Final simplification98.0%

      \[\leadsto \left|x \cdot \frac{2 + \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.047619047619047616\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)}{\sqrt{\pi}}\right| \]
    10. Add Preprocessing

    Alternative 11: 93.3% accurate, 8.6× speedup?

    \[\begin{array}{l} \\ \left|x \cdot \frac{2 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.2\right)\right)}{\sqrt{\pi}}\right| \end{array} \]
    (FPCore (x)
     :precision binary64
     (fabs (* x (/ (+ 2.0 (* x (* x (* (* x x) 0.2)))) (sqrt PI)))))
    double code(double x) {
    	return fabs((x * ((2.0 + (x * (x * ((x * x) * 0.2)))) / sqrt(((double) M_PI)))));
    }
    
    public static double code(double x) {
    	return Math.abs((x * ((2.0 + (x * (x * ((x * x) * 0.2)))) / Math.sqrt(Math.PI))));
    }
    
    def code(x):
    	return math.fabs((x * ((2.0 + (x * (x * ((x * x) * 0.2)))) / math.sqrt(math.pi))))
    
    function code(x)
    	return abs(Float64(x * Float64(Float64(2.0 + Float64(x * Float64(x * Float64(Float64(x * x) * 0.2)))) / sqrt(pi))))
    end
    
    function tmp = code(x)
    	tmp = abs((x * ((2.0 + (x * (x * ((x * x) * 0.2)))) / sqrt(pi))));
    end
    
    code[x_] := N[Abs[N[(x * N[(N[(2.0 + N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|x \cdot \frac{2 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.2\right)\right)}{\sqrt{\pi}}\right|
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + {x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + {x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{4} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({x}^{2}\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(x \cdot x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left({x}^{2} \cdot \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      19. *-lowering-*.f6494.4%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    8. Simplified94.4%

      \[\leadsto \left|\frac{\color{blue}{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot 0.2\right)}}{\sqrt{\pi}} \cdot x\right| \]
    9. Taylor expanded in x around inf

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \color{blue}{\left(\frac{1}{5} \cdot {x}^{4}\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    10. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. unpow2N/A

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(x \cdot \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2} \cdot \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. *-lowering-*.f6493.5%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    11. Simplified93.5%

      \[\leadsto \left|\frac{2 + \color{blue}{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.2\right)\right)}}{\sqrt{\pi}} \cdot x\right| \]
    12. Final simplification93.5%

      \[\leadsto \left|x \cdot \frac{2 + x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.2\right)\right)}{\sqrt{\pi}}\right| \]
    13. Add Preprocessing

    Alternative 12: 89.5% accurate, 8.8× speedup?

    \[\begin{array}{l} \\ \left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right| \end{array} \]
    (FPCore (x)
     :precision binary64
     (fabs (* x (/ (+ 2.0 (* x (* x 0.6666666666666666))) (sqrt PI)))))
    double code(double x) {
    	return fabs((x * ((2.0 + (x * (x * 0.6666666666666666))) / sqrt(((double) M_PI)))));
    }
    
    public static double code(double x) {
    	return Math.abs((x * ((2.0 + (x * (x * 0.6666666666666666))) / Math.sqrt(Math.PI))));
    }
    
    def code(x):
    	return math.fabs((x * ((2.0 + (x * (x * 0.6666666666666666))) / math.sqrt(math.pi))))
    
    function code(x)
    	return abs(Float64(x * Float64(Float64(2.0 + Float64(x * Float64(x * 0.6666666666666666))) / sqrt(pi))))
    end
    
    function tmp = code(x)
    	tmp = abs((x * ((2.0 + (x * (x * 0.6666666666666666))) / sqrt(pi))));
    end
    
    code[x_] := N[Abs[N[(x * N[(N[(2.0 + N[(x * N[(x * 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right|
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + {x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + {x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{4} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot {x}^{\left(2 \cdot 2\right)} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      8. pow-sqrN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{1}{5} \cdot \left({x}^{2} \cdot {x}^{2}\right) + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{1}{5} \cdot {x}^{2}\right) \cdot {x}^{2} + \frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{1}{5} \cdot {x}^{2} + \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left({x}^{2} \cdot \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left({x}^{2}\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(x \cdot x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(\frac{2}{3} + \frac{1}{5} \cdot {x}^{2}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      15. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left(\frac{1}{5} \cdot {x}^{2}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \left({x}^{2} \cdot \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      19. *-lowering-*.f6494.4%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{2}{3}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{5}\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    8. Simplified94.4%

      \[\leadsto \left|\frac{\color{blue}{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot 0.2\right)}}{\sqrt{\pi}} \cdot x\right| \]
    9. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 + \frac{2}{3} \cdot {x}^{2}\right)}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    10. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot {x}^{2}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{2}{3} \cdot \left(x \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\left(\frac{2}{3} \cdot x\right) \cdot x\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \left(\frac{2}{3} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(\frac{2}{3} \cdot x\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(x \cdot \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
      7. *-lowering-*.f6489.6%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{2}{3}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    11. Simplified89.6%

      \[\leadsto \left|\frac{\color{blue}{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}}{\sqrt{\pi}} \cdot x\right| \]
    12. Final simplification89.6%

      \[\leadsto \left|x \cdot \frac{2 + x \cdot \left(x \cdot 0.6666666666666666\right)}{\sqrt{\pi}}\right| \]
    13. Add Preprocessing

    Alternative 13: 89.0% accurate, 8.8× speedup?

    \[\begin{array}{l} \\ \left|\frac{x}{\sqrt{\pi}} \cdot \left(2 + x \cdot \left(x \cdot 0.6666666666666666\right)\right)\right| \end{array} \]
    (FPCore (x)
     :precision binary64
     (fabs (* (/ x (sqrt PI)) (+ 2.0 (* x (* x 0.6666666666666666))))))
    double code(double x) {
    	return fabs(((x / sqrt(((double) M_PI))) * (2.0 + (x * (x * 0.6666666666666666)))));
    }
    
    public static double code(double x) {
    	return Math.abs(((x / Math.sqrt(Math.PI)) * (2.0 + (x * (x * 0.6666666666666666)))));
    }
    
    def code(x):
    	return math.fabs(((x / math.sqrt(math.pi)) * (2.0 + (x * (x * 0.6666666666666666)))))
    
    function code(x)
    	return abs(Float64(Float64(x / sqrt(pi)) * Float64(2.0 + Float64(x * Float64(x * 0.6666666666666666)))))
    end
    
    function tmp = code(x)
    	tmp = abs(((x / sqrt(pi)) * (2.0 + (x * (x * 0.6666666666666666)))));
    end
    
    code[x_] := N[Abs[N[(N[(x / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(x * N[(x * 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|\frac{x}{\sqrt{\pi}} \cdot \left(2 + x \cdot \left(x \cdot 0.6666666666666666\right)\right)\right|
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{\left(2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + x \cdot \left(x \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right)\right) \cdot x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\left(2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + x \cdot \left(x \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right)\right) \cdot \frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + x \cdot \left(x \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)\right)\right), \left(\frac{x}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
    7. Applied egg-rr99.4%

      \[\leadsto \left|\color{blue}{\left(2 + x \cdot \left(x \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)\right) \cdot \frac{x}{\sqrt{\pi}}}\right| \]
    8. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{2}{3} \cdot x\right)}\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \left(x \cdot \frac{2}{3}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f6489.1%

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{2}{3}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
    10. Simplified89.1%

      \[\leadsto \left|\left(2 + x \cdot \color{blue}{\left(x \cdot 0.6666666666666666\right)}\right) \cdot \frac{x}{\sqrt{\pi}}\right| \]
    11. Final simplification89.1%

      \[\leadsto \left|\frac{x}{\sqrt{\pi}} \cdot \left(2 + x \cdot \left(x \cdot 0.6666666666666666\right)\right)\right| \]
    12. Add Preprocessing

    Alternative 14: 68.3% accurate, 9.0× speedup?

    \[\begin{array}{l} \\ \left|x \cdot \frac{2}{\sqrt{\pi}}\right| \end{array} \]
    (FPCore (x) :precision binary64 (fabs (* x (/ 2.0 (sqrt PI)))))
    double code(double x) {
    	return fabs((x * (2.0 / sqrt(((double) M_PI)))));
    }
    
    public static double code(double x) {
    	return Math.abs((x * (2.0 / Math.sqrt(Math.PI))));
    }
    
    def code(x):
    	return math.fabs((x * (2.0 / math.sqrt(math.pi))))
    
    function code(x)
    	return abs(Float64(x * Float64(2.0 / sqrt(pi))))
    end
    
    function tmp = code(x)
    	tmp = abs((x * (2.0 / sqrt(pi))));
    end
    
    code[x_] := N[Abs[N[(x * N[(2.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|x \cdot \frac{2}{\sqrt{\pi}}\right|
    \end{array}
    
    Derivation
    1. Initial program 99.8%

      \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right| \]
    2. Simplified99.9%

      \[\leadsto \color{blue}{\left|\left|x\right| \cdot \frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + \left(x \cdot x\right) \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)}{\sqrt{\pi}}\right|} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right| \]
      2. fabs-mulN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \color{blue}{\left|\left|x\right|\right|} \]
      3. fabs-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \cdot \left|x\right| \]
      4. mul-fabsN/A

        \[\leadsto \left|\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right| \]
      5. fabs-lowering-fabs.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}} \cdot x\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 + \left(x \cdot x\right) \cdot \left(\frac{2}{3} + \left(x \cdot x\right) \cdot \left(\frac{1}{5} + \left(x \cdot x\right) \cdot \frac{1}{21}\right)\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right), x\right)\right) \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\left|\frac{2 + \left(x \cdot x\right) \cdot \left(0.6666666666666666 + x \cdot \left(x \cdot \left(0.2 + \left(x \cdot x\right) \cdot 0.047619047619047616\right)\right)\right)}{\sqrt{\pi}} \cdot x\right|} \]
    6. Taylor expanded in x around 0

      \[\leadsto \mathsf{fabs.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{2}, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), x\right)\right) \]
    7. Step-by-step derivation
      1. Simplified70.4%

        \[\leadsto \left|\frac{\color{blue}{2}}{\sqrt{\pi}} \cdot x\right| \]
      2. Final simplification70.4%

        \[\leadsto \left|x \cdot \frac{2}{\sqrt{\pi}}\right| \]
      3. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2024138 
      (FPCore (x)
        :name "Jmat.Real.erfi, branch x less than or equal to 0.5"
        :precision binary64
        :pre (<= x 0.5)
        (fabs (* (/ 1.0 (sqrt PI)) (+ (+ (+ (* 2.0 (fabs x)) (* (/ 2.0 3.0) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1.0 5.0) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1.0 21.0) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)))))))