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

Percentage Accurate: 99.8% → 99.9%
Time: 26.0s
Alternatives: 1

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 1 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.9% accurate, 0.5× speedup?

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

\\
\left|\mathsf{fma}\left(\frac{0.047619047619047616}{\sqrt{\pi}} \cdot \left({x}^{4} \cdot x\right), x \cdot x, {\pi}^{-0.5} \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot 0.6666666666666666, x, 2\right), x, {x}^{5} \cdot 0.2\right)\right)\right|
\end{array}
Derivation
  1. Initial program 99.6%

    \[\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 rewrites99.9%

    \[\leadsto \left|\color{blue}{\mathsf{fma}\left({\pi}^{-0.5} \cdot \left({\left(\left|x\right|\right)}^{6} \cdot 0.047619047619047616\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, 0.2, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, 0.6666666666666666, 2\right)\right) \cdot {\pi}^{-0.5}\right)}\right| \]
  4. Step-by-step derivation
    1. lift-fabs.f64N/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left({\color{blue}{\left(\left|x\right|\right)}}^{6} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    2. lift-pow.f64N/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left(\color{blue}{{\left(\left|x\right|\right)}^{6}} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    3. sqr-powN/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left(\color{blue}{\left({\left(\left|x\right|\right)}^{\left(\frac{6}{2}\right)} \cdot {\left(\left|x\right|\right)}^{\left(\frac{6}{2}\right)}\right)} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    4. pow2N/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left(\color{blue}{{\left({\left(\left|x\right|\right)}^{\left(\frac{6}{2}\right)}\right)}^{2}} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    5. lower-pow.f64N/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left(\color{blue}{{\left({\left(\left|x\right|\right)}^{\left(\frac{6}{2}\right)}\right)}^{2}} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    6. metadata-evalN/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left({\left({\left(\left|x\right|\right)}^{\color{blue}{3}}\right)}^{2} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    7. lower-pow.f64N/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left({\color{blue}{\left({\left(\left|x\right|\right)}^{3}\right)}}^{2} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    8. rem-sqrt-square-revN/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left({\left({\color{blue}{\left(\sqrt{x \cdot x}\right)}}^{3}\right)}^{2} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    9. pow2N/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left({\left({\left(\sqrt{\color{blue}{{x}^{2}}}\right)}^{3}\right)}^{2} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    10. sqrt-pow1N/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left({\left({\color{blue}{\left({x}^{\left(\frac{2}{2}\right)}\right)}}^{3}\right)}^{2} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    11. metadata-evalN/A

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{\frac{-1}{2}} \cdot \left({\left({\left({x}^{\color{blue}{1}}\right)}^{3}\right)}^{2} \cdot \frac{1}{21}\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, \frac{1}{5}, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, \frac{2}{3}, 2\right)\right) \cdot {\pi}^{\frac{-1}{2}}\right)\right| \]
    12. unpow199.9

      \[\leadsto \left|\mathsf{fma}\left({\pi}^{-0.5} \cdot \left({\left({\color{blue}{x}}^{3}\right)}^{2} \cdot 0.047619047619047616\right), \left|x\right|, \mathsf{fma}\left({\left(\left|x\right|\right)}^{5}, 0.2, \left|x\right| \cdot \mathsf{fma}\left(x \cdot x, 0.6666666666666666, 2\right)\right) \cdot {\pi}^{-0.5}\right)\right| \]
  5. Applied rewrites99.9%

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

    \[\leadsto \left|\color{blue}{\sqrt{\frac{1}{\mathsf{PI}\left(\right)}} \cdot \left(\frac{1}{5} \cdot {\left(\left|x\right|\right)}^{5} + 2 \cdot \left|x\right|\right) + {x}^{2} \cdot \left(\frac{1}{21} \cdot \left(\left({x}^{4} \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| \]
  7. Applied rewrites99.9%

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

Reproduce

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