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

Percentage Accurate: 99.8% → 99.8%
Time: 15.2s
Alternatives: 11
Speedup: 2.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 11 alternatives:

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

Initial Program: 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, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left|x\right| \cdot \left(\left|x\right| \cdot \left|x\right|\right)\\ t_1 := \left|x\right| \cdot \left(\left|x\right| \cdot t\_0\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|x\right| \cdot \left(\left|x\right| \cdot t\_1\right)\right)\right)\right| \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* (fabs x) (* (fabs x) (fabs x))))
        (t_1 (* (fabs x) (* (fabs x) t_0))))
   (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) (* (fabs x) (* (fabs x) t_1))))))))
double code(double x) {
	double t_0 = fabs(x) * (fabs(x) * fabs(x));
	double t_1 = fabs(x) * (fabs(x) * t_0);
	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) * (fabs(x) * (fabs(x) * t_1))))));
}
public static double code(double x) {
	double t_0 = Math.abs(x) * (Math.abs(x) * Math.abs(x));
	double t_1 = Math.abs(x) * (Math.abs(x) * t_0);
	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) * (Math.abs(x) * (Math.abs(x) * t_1))))));
}
def code(x):
	t_0 = math.fabs(x) * (math.fabs(x) * math.fabs(x))
	t_1 = math.fabs(x) * (math.fabs(x) * t_0)
	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) * (math.fabs(x) * (math.fabs(x) * t_1))))))
function code(x)
	t_0 = Float64(abs(x) * Float64(abs(x) * abs(x)))
	t_1 = Float64(abs(x) * Float64(abs(x) * t_0))
	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(abs(x) * Float64(abs(x) * t_1))))))
end
function tmp = code(x)
	t_0 = abs(x) * (abs(x) * abs(x));
	t_1 = abs(x) * (abs(x) * t_0);
	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) * (abs(x) * (abs(x) * t_1))))));
end
code[x_] := Block[{t$95$0 = N[(N[Abs[x], $MachinePrecision] * N[(N[Abs[x], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[x], $MachinePrecision] * N[(N[Abs[x], $MachinePrecision] * t$95$0), $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[Abs[x], $MachinePrecision] * N[(N[Abs[x], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left|x\right| \cdot \left(\left|x\right| \cdot \left|x\right|\right)\\
t_1 := \left|x\right| \cdot \left(\left|x\right| \cdot t\_0\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|x\right| \cdot \left(\left|x\right| \cdot t\_1\right)\right)\right)\right|
\end{array}
\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. Add Preprocessing
  3. Final simplification99.8%

    \[\leadsto \left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left|x\right|\right)\right)\right) + \frac{1}{5} \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left|x\right|\right)\right)\right)\right)\right) + \frac{1}{21} \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left|x\right|\right)\right)\right)\right)\right)\right)\right)\right| \]
  4. Add Preprocessing

Alternative 2: 99.8% accurate, 2.3× speedup?

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

\\
\left|\left|x\right| \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), \mathsf{fma}\left(x, x \cdot 0.6666666666666666, 2\right)\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. Add Preprocessing
  3. Applied egg-rr99.4%

    \[\leadsto \left|\color{blue}{\frac{\mathsf{fma}\left(\left|x\right|, \mathsf{fma}\left(0.2, x \cdot \left(x \cdot \left(x \cdot x\right)\right), 0.047619047619047616 \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), \left|x\right| \cdot \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}}\right| \]
  4. Applied egg-rr99.6%

    \[\leadsto \left|\color{blue}{\frac{\frac{1}{\sqrt{\pi}}}{\frac{1}{\left|x\right| \cdot \mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(0.047619047619047616 \cdot \left(x \cdot x\right), x, x \cdot 0.2\right), \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}}}\right| \]
  5. Applied egg-rr99.8%

    \[\leadsto \left|\color{blue}{\left(\frac{1}{\sqrt{\pi}} \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), \mathsf{fma}\left(x, x \cdot 0.6666666666666666, 2\right)\right)\right) \cdot \left|x\right|}\right| \]
  6. Final simplification99.8%

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

Alternative 3: 99.8% accurate, 2.3× speedup?

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

\\
\left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(\left(x \cdot x\right) \cdot 0.047619047619047616, x, x \cdot 0.2\right), \mathsf{fma}\left(0.6666666666666666, x \cdot x, 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. Add Preprocessing
  3. Applied egg-rr99.4%

    \[\leadsto \left|\color{blue}{\frac{\mathsf{fma}\left(\left|x\right|, \mathsf{fma}\left(0.2, x \cdot \left(x \cdot \left(x \cdot x\right)\right), 0.047619047619047616 \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), \left|x\right| \cdot \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}}\right| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\color{blue}{\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(0.047619047619047616 \cdot \left(x \cdot x\right), x, x \cdot 0.2\right), \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}}\right| \]
  5. Final simplification99.8%

    \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(\left(x \cdot x\right) \cdot 0.047619047619047616, x, x \cdot 0.2\right), \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}\right| \]
  6. Add Preprocessing

Alternative 4: 99.4% accurate, 2.5× speedup?

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

\\
\left|\mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), \mathsf{fma}\left(x \cdot x, 0.6666666666666666, 2\right)\right) \cdot \left|\frac{x}{\sqrt{\pi}}\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. Add Preprocessing
  3. Applied egg-rr99.4%

    \[\leadsto \left|\color{blue}{\frac{\mathsf{fma}\left(\left|x\right|, \mathsf{fma}\left(0.2, x \cdot \left(x \cdot \left(x \cdot x\right)\right), 0.047619047619047616 \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), \left|x\right| \cdot \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}}\right| \]
  4. Applied egg-rr99.8%

    \[\leadsto \left|\color{blue}{\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(0.047619047619047616 \cdot \left(x \cdot x\right), x, x \cdot 0.2\right), \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}}\right| \]
  5. Applied egg-rr99.4%

    \[\leadsto \left|\color{blue}{\mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), \mathsf{fma}\left(x \cdot x, 0.6666666666666666, 2\right)\right) \cdot \left|\frac{x}{\sqrt{\pi}}\right|}\right| \]
  6. Add Preprocessing

Alternative 5: 99.0% accurate, 2.7× speedup?

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

\\
\left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(\left(x \cdot x\right) \cdot 0.047619047619047616, x, x \cdot 0.2\right), 2\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. Add Preprocessing
  3. Applied egg-rr99.4%

    \[\leadsto \left|\color{blue}{\frac{\mathsf{fma}\left(\left|x\right|, \mathsf{fma}\left(0.2, x \cdot \left(x \cdot \left(x \cdot x\right)\right), 0.047619047619047616 \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), \left|x\right| \cdot \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}}\right| \]
  4. Applied egg-rr99.8%

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

    \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(\frac{1}{21} \cdot \left(x \cdot x\right), x, x \cdot \frac{1}{5}\right), \color{blue}{2}\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \]
  6. Step-by-step derivation
    1. Simplified98.6%

      \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(0.047619047619047616 \cdot \left(x \cdot x\right), x, x \cdot 0.2\right), \color{blue}{2}\right)}{\sqrt{\pi}}\right| \]
    2. Final simplification98.6%

      \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(\left(x \cdot x\right) \cdot 0.047619047619047616, x, x \cdot 0.2\right), 2\right)}{\sqrt{\pi}}\right| \]
    3. Add Preprocessing

    Alternative 6: 98.5% accurate, 2.9× speedup?

    \[\begin{array}{l} \\ \left|\frac{\left|x\right| \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), 2\right)}{\sqrt{\pi}}\right| \end{array} \]
    (FPCore (x)
     :precision binary64
     (fabs
      (/
       (*
        (fabs x)
        (fma x (* (* x x) (* x (fma x (* x 0.047619047619047616) 0.2))) 2.0))
       (sqrt PI))))
    double code(double x) {
    	return fabs(((fabs(x) * fma(x, ((x * x) * (x * fma(x, (x * 0.047619047619047616), 0.2))), 2.0)) / sqrt(((double) M_PI))));
    }
    
    function code(x)
    	return abs(Float64(Float64(abs(x) * fma(x, Float64(Float64(x * x) * Float64(x * fma(x, Float64(x * 0.047619047619047616), 0.2))), 2.0)) / sqrt(pi)))
    end
    
    code[x_] := N[Abs[N[(N[(N[Abs[x], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.047619047619047616), $MachinePrecision] + 0.2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left|\frac{\left|x\right| \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), 2\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. Add Preprocessing
    3. Applied egg-rr99.4%

      \[\leadsto \left|\color{blue}{\frac{\mathsf{fma}\left(\left|x\right|, \mathsf{fma}\left(0.2, x \cdot \left(x \cdot \left(x \cdot x\right)\right), 0.047619047619047616 \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), \left|x\right| \cdot \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}}\right| \]
    4. Applied egg-rr99.8%

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

      \[\leadsto \left|\frac{1}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\left|x\right| \cdot \mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(\frac{1}{21} \cdot \left(x \cdot x\right), x, x \cdot \frac{1}{5}\right), \color{blue}{2}\right)\right)\right| \]
    6. Step-by-step derivation
      1. Simplified98.5%

        \[\leadsto \left|\frac{1}{\sqrt{\pi}} \cdot \left(\left|x\right| \cdot \mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(0.047619047619047616 \cdot \left(x \cdot x\right), x, x \cdot 0.2\right), \color{blue}{2}\right)\right)\right| \]
      2. Applied egg-rr98.1%

        \[\leadsto \left|\color{blue}{\frac{\left|x\right| \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), 2\right)}{\sqrt{\pi}}}\right| \]
      3. Add Preprocessing

      Alternative 7: 98.5% accurate, 2.9× speedup?

      \[\begin{array}{l} \\ \left|\left|\frac{x}{\sqrt{\pi}}\right| \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), 2\right)\right| \end{array} \]
      (FPCore (x)
       :precision binary64
       (fabs
        (*
         (fabs (/ x (sqrt PI)))
         (fma x (* (* x x) (* x (fma x (* x 0.047619047619047616) 0.2))) 2.0))))
      double code(double x) {
      	return fabs((fabs((x / sqrt(((double) M_PI)))) * fma(x, ((x * x) * (x * fma(x, (x * 0.047619047619047616), 0.2))), 2.0)));
      }
      
      function code(x)
      	return abs(Float64(abs(Float64(x / sqrt(pi))) * fma(x, Float64(Float64(x * x) * Float64(x * fma(x, Float64(x * 0.047619047619047616), 0.2))), 2.0)))
      end
      
      code[x_] := N[Abs[N[(N[Abs[N[(x / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.047619047619047616), $MachinePrecision] + 0.2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \left|\left|\frac{x}{\sqrt{\pi}}\right| \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), 2\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. Add Preprocessing
      3. Applied egg-rr99.4%

        \[\leadsto \left|\color{blue}{\frac{\mathsf{fma}\left(\left|x\right|, \mathsf{fma}\left(0.2, x \cdot \left(x \cdot \left(x \cdot x\right)\right), 0.047619047619047616 \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), \left|x\right| \cdot \mathsf{fma}\left(0.6666666666666666, x \cdot x, 2\right)\right)}{\sqrt{\pi}}}\right| \]
      4. Applied egg-rr99.8%

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

        \[\leadsto \left|\frac{1}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\left|x\right| \cdot \mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(\frac{1}{21} \cdot \left(x \cdot x\right), x, x \cdot \frac{1}{5}\right), \color{blue}{2}\right)\right)\right| \]
      6. Step-by-step derivation
        1. Simplified98.5%

          \[\leadsto \left|\frac{1}{\sqrt{\pi}} \cdot \left(\left|x\right| \cdot \mathsf{fma}\left(x \cdot \left(x \cdot x\right), \mathsf{fma}\left(0.047619047619047616 \cdot \left(x \cdot x\right), x, x \cdot 0.2\right), \color{blue}{2}\right)\right)\right| \]
        2. Applied egg-rr98.1%

          \[\leadsto \left|\color{blue}{\mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), 2\right) \cdot \left|\frac{x}{\sqrt{\pi}}\right|}\right| \]
        3. Final simplification98.1%

          \[\leadsto \left|\left|\frac{x}{\sqrt{\pi}}\right| \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot 0.047619047619047616, 0.2\right)\right), 2\right)\right| \]
        4. Add Preprocessing

        Alternative 8: 93.7% accurate, 3.5× speedup?

        \[\begin{array}{l} \\ \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.2, 0.6666666666666666\right), 2\right)}{\sqrt{\pi}}\right| \end{array} \]
        (FPCore (x)
         :precision binary64
         (fabs
          (*
           (fabs x)
           (/ (fma (* x x) (fma x (* x 0.2) 0.6666666666666666) 2.0) (sqrt PI)))))
        double code(double x) {
        	return fabs((fabs(x) * (fma((x * x), fma(x, (x * 0.2), 0.6666666666666666), 2.0) / sqrt(((double) M_PI)))));
        }
        
        function code(x)
        	return abs(Float64(abs(x) * Float64(fma(Float64(x * x), fma(x, Float64(x * 0.2), 0.6666666666666666), 2.0) / sqrt(pi))))
        end
        
        code[x_] := N[Abs[N[(N[Abs[x], $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.2), $MachinePrecision] + 0.6666666666666666), $MachinePrecision] + 2.0), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.2, 0.6666666666666666\right), 2\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. Add Preprocessing
        3. Applied egg-rr99.4%

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

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

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

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

            \[\leadsto \left|\color{blue}{{x}^{2} \cdot \left(\frac{1}{5} \cdot \left(\left({x}^{2} \cdot \left|x\right|\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right) + \left({x}^{2} \cdot \left(\frac{2}{3} \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)\right) + 2 \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)\right)}\right| \]
        6. Simplified91.6%

          \[\leadsto \left|\color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \left|x\right|\right) \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.2, 0.6666666666666666\right), 2\right)}\right| \]
        7. Applied egg-rr91.6%

          \[\leadsto \left|\color{blue}{\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.2, 0.6666666666666666\right), 2\right)}{\sqrt{\pi}}}\right| \]
        8. Add Preprocessing

        Alternative 9: 93.2% accurate, 3.5× speedup?

        \[\begin{array}{l} \\ \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot 0.2, 2\right)}{\sqrt{\pi}}\right| \end{array} \]
        (FPCore (x)
         :precision binary64
         (fabs (* (fabs x) (/ (fma (* x x) (* (* x x) 0.2) 2.0) (sqrt PI)))))
        double code(double x) {
        	return fabs((fabs(x) * (fma((x * x), ((x * x) * 0.2), 2.0) / sqrt(((double) M_PI)))));
        }
        
        function code(x)
        	return abs(Float64(abs(x) * Float64(fma(Float64(x * x), Float64(Float64(x * x) * 0.2), 2.0) / sqrt(pi))))
        end
        
        code[x_] := N[Abs[N[(N[Abs[x], $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.2), $MachinePrecision] + 2.0), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot 0.2, 2\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. Add Preprocessing
        3. Applied egg-rr99.4%

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

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

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

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

            \[\leadsto \left|\color{blue}{{x}^{2} \cdot \left(\frac{1}{5} \cdot \left(\left({x}^{2} \cdot \left|x\right|\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right) + \left({x}^{2} \cdot \left(\frac{2}{3} \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)\right) + 2 \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)\right)}\right| \]
        6. Simplified91.6%

          \[\leadsto \left|\color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \left|x\right|\right) \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.2, 0.6666666666666666\right), 2\right)}\right| \]
        7. Applied egg-rr91.6%

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

          \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{1}{5} \cdot {x}^{2}}, 2\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \]
        9. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{1}{5} \cdot {x}^{2}}, 2\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \]
          2. unpow2N/A

            \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \frac{1}{5} \cdot \color{blue}{\left(x \cdot x\right)}, 2\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \]
          3. lower-*.f6490.8

            \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, 0.2 \cdot \color{blue}{\left(x \cdot x\right)}, 2\right)}{\sqrt{\pi}}\right| \]
        10. Simplified90.8%

          \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{0.2 \cdot \left(x \cdot x\right)}, 2\right)}{\sqrt{\pi}}\right| \]
        11. Final simplification90.8%

          \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot 0.2, 2\right)}{\sqrt{\pi}}\right| \]
        12. Add Preprocessing

        Alternative 10: 89.5% accurate, 4.4× speedup?

        \[\begin{array}{l} \\ \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, 0.6666666666666666, 2\right)}{\sqrt{\pi}}\right| \end{array} \]
        (FPCore (x)
         :precision binary64
         (fabs (* (fabs x) (/ (fma (* x x) 0.6666666666666666 2.0) (sqrt PI)))))
        double code(double x) {
        	return fabs((fabs(x) * (fma((x * x), 0.6666666666666666, 2.0) / sqrt(((double) M_PI)))));
        }
        
        function code(x)
        	return abs(Float64(abs(x) * Float64(fma(Float64(x * x), 0.6666666666666666, 2.0) / sqrt(pi))))
        end
        
        code[x_] := N[Abs[N[(N[Abs[x], $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 0.6666666666666666 + 2.0), $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, 0.6666666666666666, 2\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. Add Preprocessing
        3. Applied egg-rr99.4%

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

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

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

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

            \[\leadsto \left|\color{blue}{{x}^{2} \cdot \left(\frac{1}{5} \cdot \left(\left({x}^{2} \cdot \left|x\right|\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)\right) + \left({x}^{2} \cdot \left(\frac{2}{3} \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)\right) + 2 \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)\right)}\right| \]
        6. Simplified91.6%

          \[\leadsto \left|\color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \left|x\right|\right) \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.2, 0.6666666666666666\right), 2\right)}\right| \]
        7. Applied egg-rr91.6%

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

          \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{2}{3}}, 2\right)}{\sqrt{\mathsf{PI}\left(\right)}}\right| \]
        9. Step-by-step derivation
          1. Simplified88.8%

            \[\leadsto \left|\left|x\right| \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{0.6666666666666666}, 2\right)}{\sqrt{\pi}}\right| \]
          2. Add Preprocessing

          Alternative 11: 68.1% accurate, 6.3× speedup?

          \[\begin{array}{l} \\ \left|x\right| \cdot \frac{2}{\sqrt{\pi}} \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 Float64(abs(x) * Float64(2.0 / sqrt(pi)))
          end
          
          function tmp = code(x)
          	tmp = abs(x) * (2.0 / sqrt(pi));
          end
          
          code[x_] := N[(N[Abs[x], $MachinePrecision] * N[(2.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \left|x\right| \cdot \frac{2}{\sqrt{\pi}}
          \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. Add Preprocessing
          3. Applied egg-rr99.4%

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

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

              \[\leadsto \left|\color{blue}{\left(2 \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right) \cdot \left|x\right|}\right| \]
            2. *-commutativeN/A

              \[\leadsto \left|\color{blue}{\left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot 2\right)} \cdot \left|x\right|\right| \]
            3. associate-*l*N/A

              \[\leadsto \left|\color{blue}{\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(2 \cdot \left|x\right|\right)}\right| \]
            4. lower-*.f64N/A

              \[\leadsto \left|\color{blue}{\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(2 \cdot \left|x\right|\right)}\right| \]
            5. lower-sqrt.f64N/A

              \[\leadsto \left|\color{blue}{\sqrt{\frac{1}{\mathsf{PI}\left(\right)}}} \cdot \left(2 \cdot \left|x\right|\right)\right| \]
            6. lower-/.f64N/A

              \[\leadsto \left|\sqrt{\color{blue}{\frac{1}{\mathsf{PI}\left(\right)}}} \cdot \left(2 \cdot \left|x\right|\right)\right| \]
            7. lower-PI.f64N/A

              \[\leadsto \left|\sqrt{\frac{1}{\color{blue}{\mathsf{PI}\left(\right)}}} \cdot \left(2 \cdot \left|x\right|\right)\right| \]
            8. lower-*.f64N/A

              \[\leadsto \left|\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \color{blue}{\left(2 \cdot \left|x\right|\right)}\right| \]
            9. lower-fabs.f6466.6

              \[\leadsto \left|\sqrt{\frac{1}{\pi}} \cdot \left(2 \cdot \color{blue}{\left|x\right|}\right)\right| \]
          6. Simplified66.6%

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

              \[\leadsto \left|\sqrt{\frac{1}{\color{blue}{\mathsf{PI}\left(\right)}}} \cdot \left(2 \cdot \left|x\right|\right)\right| \]
            2. lift-/.f64N/A

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

              \[\leadsto \left|\color{blue}{\sqrt{\frac{1}{\mathsf{PI}\left(\right)}}} \cdot \left(2 \cdot \left|x\right|\right)\right| \]
            4. lift-fabs.f64N/A

              \[\leadsto \left|\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(2 \cdot \color{blue}{\left|x\right|}\right)\right| \]
            5. associate-*r*N/A

              \[\leadsto \left|\color{blue}{\left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot 2\right) \cdot \left|x\right|}\right| \]
            6. *-commutativeN/A

              \[\leadsto \left|\color{blue}{\left(2 \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)} \cdot \left|x\right|\right| \]
            7. associate-*r*N/A

              \[\leadsto \left|\color{blue}{2 \cdot \left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)}\right| \]
            8. lift-*.f64N/A

              \[\leadsto \left|2 \cdot \color{blue}{\left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)}\right| \]
            9. lift-*.f64N/A

              \[\leadsto \left|2 \cdot \color{blue}{\left(\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left|x\right|\right)}\right| \]
            10. *-commutativeN/A

              \[\leadsto \left|2 \cdot \color{blue}{\left(\left|x\right| \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right)}\right| \]
            11. associate-*r*N/A

              \[\leadsto \left|\color{blue}{\left(2 \cdot \left|x\right|\right) \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}}\right| \]
            12. lift-*.f64N/A

              \[\leadsto \left|\color{blue}{\left(2 \cdot \left|x\right|\right)} \cdot \sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right| \]
            13. *-commutativeN/A

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

              \[\leadsto \color{blue}{\left|\sqrt{\frac{1}{\mathsf{PI}\left(\right)}}\right| \cdot \left|2 \cdot \left|x\right|\right|} \]
          8. Applied egg-rr66.6%

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

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

          Reproduce

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