Jmat.Real.erfi, branch x greater than or equal to 5

Percentage Accurate: 100.0% → 99.5%
Time: 12.1s
Alternatives: 4
Speedup: N/A×

Specification

?
\[x \geq 0.5\]
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{\left|x\right|}\\ t_1 := \left(t\_0 \cdot t\_0\right) \cdot t\_0\\ t_2 := \left(t\_1 \cdot t\_0\right) \cdot t\_0\\ \left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(t\_0 + \frac{1}{2} \cdot t\_1\right) + \frac{3}{4} \cdot t\_2\right) + \frac{15}{8} \cdot \left(\left(t\_2 \cdot t\_0\right) \cdot t\_0\right)\right) \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (/ 1.0 (fabs x)))
        (t_1 (* (* t_0 t_0) t_0))
        (t_2 (* (* t_1 t_0) t_0)))
   (*
    (* (/ 1.0 (sqrt PI)) (exp (* (fabs x) (fabs x))))
    (+
     (+ (+ t_0 (* (/ 1.0 2.0) t_1)) (* (/ 3.0 4.0) t_2))
     (* (/ 15.0 8.0) (* (* t_2 t_0) t_0))))))
double code(double x) {
	double t_0 = 1.0 / fabs(x);
	double t_1 = (t_0 * t_0) * t_0;
	double t_2 = (t_1 * t_0) * t_0;
	return ((1.0 / sqrt(((double) M_PI))) * exp((fabs(x) * fabs(x)))) * (((t_0 + ((1.0 / 2.0) * t_1)) + ((3.0 / 4.0) * t_2)) + ((15.0 / 8.0) * ((t_2 * t_0) * t_0)));
}
public static double code(double x) {
	double t_0 = 1.0 / Math.abs(x);
	double t_1 = (t_0 * t_0) * t_0;
	double t_2 = (t_1 * t_0) * t_0;
	return ((1.0 / Math.sqrt(Math.PI)) * Math.exp((Math.abs(x) * Math.abs(x)))) * (((t_0 + ((1.0 / 2.0) * t_1)) + ((3.0 / 4.0) * t_2)) + ((15.0 / 8.0) * ((t_2 * t_0) * t_0)));
}
def code(x):
	t_0 = 1.0 / math.fabs(x)
	t_1 = (t_0 * t_0) * t_0
	t_2 = (t_1 * t_0) * t_0
	return ((1.0 / math.sqrt(math.pi)) * math.exp((math.fabs(x) * math.fabs(x)))) * (((t_0 + ((1.0 / 2.0) * t_1)) + ((3.0 / 4.0) * t_2)) + ((15.0 / 8.0) * ((t_2 * t_0) * t_0)))
function code(x)
	t_0 = Float64(1.0 / abs(x))
	t_1 = Float64(Float64(t_0 * t_0) * t_0)
	t_2 = Float64(Float64(t_1 * t_0) * t_0)
	return Float64(Float64(Float64(1.0 / sqrt(pi)) * exp(Float64(abs(x) * abs(x)))) * Float64(Float64(Float64(t_0 + Float64(Float64(1.0 / 2.0) * t_1)) + Float64(Float64(3.0 / 4.0) * t_2)) + Float64(Float64(15.0 / 8.0) * Float64(Float64(t_2 * t_0) * t_0))))
end
function tmp = code(x)
	t_0 = 1.0 / abs(x);
	t_1 = (t_0 * t_0) * t_0;
	t_2 = (t_1 * t_0) * t_0;
	tmp = ((1.0 / sqrt(pi)) * exp((abs(x) * abs(x)))) * (((t_0 + ((1.0 / 2.0) * t_1)) + ((3.0 / 4.0) * t_2)) + ((15.0 / 8.0) * ((t_2 * t_0) * t_0)));
end
code[x_] := Block[{t$95$0 = N[(1.0 / N[Abs[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]}, N[(N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[Abs[x], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$0 + N[(N[(1.0 / 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 / 4.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(15.0 / 8.0), $MachinePrecision] * N[(N[(t$95$2 * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{\left|x\right|}\\
t_1 := \left(t\_0 \cdot t\_0\right) \cdot t\_0\\
t_2 := \left(t\_1 \cdot t\_0\right) \cdot t\_0\\
\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(t\_0 + \frac{1}{2} \cdot t\_1\right) + \frac{3}{4} \cdot t\_2\right) + \frac{15}{8} \cdot \left(\left(t\_2 \cdot t\_0\right) \cdot t\_0\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 4 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: 100.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{1}{\left|x\right|}\\
t_1 := \left(t\_0 \cdot t\_0\right) \cdot t\_0\\
t_2 := \left(t\_1 \cdot t\_0\right) \cdot t\_0\\
\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(t\_0 + \frac{1}{2} \cdot t\_1\right) + \frac{3}{4} \cdot t\_2\right) + \frac{15}{8} \cdot \left(\left(t\_2 \cdot t\_0\right) \cdot t\_0\right)\right)
\end{array}
\end{array}

Alternative 1: 99.5% accurate, 5.1× speedup?

\[\begin{array}{l} \\ 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{{x}^{3}}{\sqrt{\pi}}\right)\right) \end{array} \]
(FPCore (x)
 :precision binary64
 (* 0.5 (log1p (expm1 (/ (pow x 3.0) (sqrt PI))))))
double code(double x) {
	return 0.5 * log1p(expm1((pow(x, 3.0) / sqrt(((double) M_PI)))));
}
public static double code(double x) {
	return 0.5 * Math.log1p(Math.expm1((Math.pow(x, 3.0) / Math.sqrt(Math.PI))));
}
def code(x):
	return 0.5 * math.log1p(math.expm1((math.pow(x, 3.0) / math.sqrt(math.pi))))
function code(x)
	return Float64(0.5 * log1p(expm1(Float64((x ^ 3.0) / sqrt(pi)))))
end
code[x_] := N[(0.5 * N[Log[1 + N[(Exp[N[(N[Power[x, 3.0], $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{{x}^{3}}{\sqrt{\pi}}\right)\right)
\end{array}
Derivation
  1. Initial program 100.0%

    \[\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(\frac{1}{\left|x\right|} + \frac{1}{2} \cdot \left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{3}{4} \cdot \left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{15}{8} \cdot \left(\left(\left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) \]
  2. Simplified100.0%

    \[\leadsto \color{blue}{\frac{e^{x \cdot x}}{\sqrt{\pi}} \cdot \mathsf{fma}\left(0.75, {\left(\frac{1}{\left|x\right|}\right)}^{5}, \mathsf{fma}\left(1.875, {\left(\frac{1}{\left|x\right|}\right)}^{7}, \frac{1 + \frac{0.5}{x \cdot x}}{\left|x\right|}\right)\right)} \]
  3. Add Preprocessing
  4. Taylor expanded in x around 0 1.8%

    \[\leadsto \color{blue}{0.5 \cdot \left(\frac{1}{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{\frac{1}{\pi}}\right)} \]
  5. Step-by-step derivation
    1. inv-pow1.8%

      \[\leadsto 0.5 \cdot \left(\color{blue}{{\left({x}^{2} \cdot \left|x\right|\right)}^{-1}} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    2. pow-to-exp1.8%

      \[\leadsto 0.5 \cdot \left(\color{blue}{e^{\log \left({x}^{2} \cdot \left|x\right|\right) \cdot -1}} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    3. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \color{blue}{\left(\sqrt{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{{x}^{2} \cdot \left|x\right|}\right)} \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    4. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \color{blue}{\left({x}^{2} \cdot \left|x\right|\right)} \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    5. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \left({x}^{2} \cdot \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    6. fabs-sqr1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \left({x}^{2} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    7. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \left({x}^{2} \cdot \color{blue}{x}\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    8. pow-plus1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \color{blue}{\left({x}^{\left(2 + 1\right)}\right)} \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    9. metadata-eval1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \left({x}^{\color{blue}{3}}\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    10. log-pow1.8%

      \[\leadsto 0.5 \cdot \left(e^{\color{blue}{\left(3 \cdot \log x\right)} \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
  6. Applied egg-rr1.8%

    \[\leadsto 0.5 \cdot \left(\color{blue}{e^{\left(3 \cdot \log x\right) \cdot -1}} \cdot \sqrt{\frac{1}{\pi}}\right) \]
  7. Step-by-step derivation
    1. log1p-expm1-u1.8%

      \[\leadsto 0.5 \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(e^{\left(3 \cdot \log x\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right)\right)} \]
    2. sqrt-div1.8%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(e^{\left(3 \cdot \log x\right) \cdot -1} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\pi}}}\right)\right) \]
    3. metadata-eval1.8%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(e^{\left(3 \cdot \log x\right) \cdot -1} \cdot \frac{\color{blue}{1}}{\sqrt{\pi}}\right)\right) \]
    4. un-div-inv1.8%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\color{blue}{\frac{e^{\left(3 \cdot \log x\right) \cdot -1}}{\sqrt{\pi}}}\right)\right) \]
    5. add-sqr-sqrt0.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\color{blue}{\sqrt{\left(3 \cdot \log x\right) \cdot -1} \cdot \sqrt{\left(3 \cdot \log x\right) \cdot -1}}}}{\sqrt{\pi}}\right)\right) \]
    6. sqrt-unprod100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\color{blue}{\sqrt{\left(\left(3 \cdot \log x\right) \cdot -1\right) \cdot \left(\left(3 \cdot \log x\right) \cdot -1\right)}}}}{\sqrt{\pi}}\right)\right) \]
    7. *-commutative100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\sqrt{\color{blue}{\left(-1 \cdot \left(3 \cdot \log x\right)\right)} \cdot \left(\left(3 \cdot \log x\right) \cdot -1\right)}}}{\sqrt{\pi}}\right)\right) \]
    8. *-commutative100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\sqrt{\left(-1 \cdot \left(3 \cdot \log x\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(3 \cdot \log x\right)\right)}}}}{\sqrt{\pi}}\right)\right) \]
    9. swap-sqr100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\sqrt{\color{blue}{\left(-1 \cdot -1\right) \cdot \left(\left(3 \cdot \log x\right) \cdot \left(3 \cdot \log x\right)\right)}}}}{\sqrt{\pi}}\right)\right) \]
    10. metadata-eval100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\sqrt{\color{blue}{1} \cdot \left(\left(3 \cdot \log x\right) \cdot \left(3 \cdot \log x\right)\right)}}}{\sqrt{\pi}}\right)\right) \]
    11. *-un-lft-identity100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\sqrt{\color{blue}{\left(3 \cdot \log x\right) \cdot \left(3 \cdot \log x\right)}}}}{\sqrt{\pi}}\right)\right) \]
    12. sqrt-unprod100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\color{blue}{\sqrt{3 \cdot \log x} \cdot \sqrt{3 \cdot \log x}}}}{\sqrt{\pi}}\right)\right) \]
    13. add-sqr-sqrt100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\color{blue}{3 \cdot \log x}}}{\sqrt{\pi}}\right)\right) \]
    14. *-commutative100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{e^{\color{blue}{\log x \cdot 3}}}{\sqrt{\pi}}\right)\right) \]
    15. pow-to-exp100.0%

      \[\leadsto 0.5 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\color{blue}{{x}^{3}}}{\sqrt{\pi}}\right)\right) \]
  8. Applied egg-rr100.0%

    \[\leadsto 0.5 \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{{x}^{3}}{\sqrt{\pi}}\right)\right)} \]
  9. Add Preprocessing

Alternative 2: 91.8% accurate, 6.8× speedup?

\[\begin{array}{l} \\ \sqrt{\frac{\sqrt{0.0625 \cdot {x}^{12}}}{\pi}} \end{array} \]
(FPCore (x) :precision binary64 (sqrt (/ (sqrt (* 0.0625 (pow x 12.0))) PI)))
double code(double x) {
	return sqrt((sqrt((0.0625 * pow(x, 12.0))) / ((double) M_PI)));
}
public static double code(double x) {
	return Math.sqrt((Math.sqrt((0.0625 * Math.pow(x, 12.0))) / Math.PI));
}
def code(x):
	return math.sqrt((math.sqrt((0.0625 * math.pow(x, 12.0))) / math.pi))
function code(x)
	return sqrt(Float64(sqrt(Float64(0.0625 * (x ^ 12.0))) / pi))
end
function tmp = code(x)
	tmp = sqrt((sqrt((0.0625 * (x ^ 12.0))) / pi));
end
code[x_] := N[Sqrt[N[(N[Sqrt[N[(0.0625 * N[Power[x, 12.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\frac{\sqrt{0.0625 \cdot {x}^{12}}}{\pi}}
\end{array}
Derivation
  1. Initial program 100.0%

    \[\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(\frac{1}{\left|x\right|} + \frac{1}{2} \cdot \left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{3}{4} \cdot \left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{15}{8} \cdot \left(\left(\left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) \]
  2. Simplified100.0%

    \[\leadsto \color{blue}{\frac{e^{x \cdot x}}{\sqrt{\pi}} \cdot \mathsf{fma}\left(0.75, {\left(\frac{1}{\left|x\right|}\right)}^{5}, \mathsf{fma}\left(1.875, {\left(\frac{1}{\left|x\right|}\right)}^{7}, \frac{1 + \frac{0.5}{x \cdot x}}{\left|x\right|}\right)\right)} \]
  3. Add Preprocessing
  4. Taylor expanded in x around 0 1.8%

    \[\leadsto \color{blue}{0.5 \cdot \left(\frac{1}{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{\frac{1}{\pi}}\right)} \]
  5. Step-by-step derivation
    1. associate-*r*1.8%

      \[\leadsto \color{blue}{\left(0.5 \cdot \frac{1}{{x}^{2} \cdot \left|x\right|}\right) \cdot \sqrt{\frac{1}{\pi}}} \]
    2. associate-*r/1.8%

      \[\leadsto \color{blue}{\frac{0.5 \cdot 1}{{x}^{2} \cdot \left|x\right|}} \cdot \sqrt{\frac{1}{\pi}} \]
    3. metadata-eval1.8%

      \[\leadsto \frac{\color{blue}{0.5}}{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{\frac{1}{\pi}} \]
  6. Simplified1.8%

    \[\leadsto \color{blue}{\frac{0.5}{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{\frac{1}{\pi}}} \]
  7. Step-by-step derivation
    1. associate-*l/1.8%

      \[\leadsto \color{blue}{\frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{2} \cdot \left|x\right|}} \]
    2. add-sqr-sqrt1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{2} \cdot \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|} \]
    3. fabs-sqr1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{2} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}} \]
    4. add-sqr-sqrt1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{2} \cdot \color{blue}{x}} \]
    5. pow-plus1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{\color{blue}{{x}^{\left(2 + 1\right)}}} \]
    6. metadata-eval1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{\color{blue}{3}}} \]
    7. associate-*l/1.8%

      \[\leadsto \color{blue}{\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}} \]
    8. add-sqr-sqrt1.8%

      \[\leadsto \color{blue}{\sqrt{\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}} \cdot \sqrt{\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}}} \]
    9. sqrt-unprod1.7%

      \[\leadsto \color{blue}{\sqrt{\left(\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}\right) \cdot \left(\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}\right)}} \]
    10. *-commutative1.7%

      \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \frac{0.5}{{x}^{3}}\right)} \cdot \left(\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}\right)} \]
    11. *-commutative1.7%

      \[\leadsto \sqrt{\left(\sqrt{\frac{1}{\pi}} \cdot \frac{0.5}{{x}^{3}}\right) \cdot \color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \frac{0.5}{{x}^{3}}\right)}} \]
    12. swap-sqr1.7%

      \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \sqrt{\frac{1}{\pi}}\right) \cdot \left(\frac{0.5}{{x}^{3}} \cdot \frac{0.5}{{x}^{3}}\right)}} \]
    13. add-sqr-sqrt1.7%

      \[\leadsto \sqrt{\color{blue}{\frac{1}{\pi}} \cdot \left(\frac{0.5}{{x}^{3}} \cdot \frac{0.5}{{x}^{3}}\right)} \]
    14. frac-times1.7%

      \[\leadsto \sqrt{\frac{1}{\pi} \cdot \color{blue}{\frac{0.5 \cdot 0.5}{{x}^{3} \cdot {x}^{3}}}} \]
    15. metadata-eval1.7%

      \[\leadsto \sqrt{\frac{1}{\pi} \cdot \frac{\color{blue}{0.25}}{{x}^{3} \cdot {x}^{3}}} \]
  8. Applied egg-rr1.7%

    \[\leadsto \color{blue}{\sqrt{\frac{1}{\pi} \cdot \frac{0.25}{{x}^{6}}}} \]
  9. Step-by-step derivation
    1. associate-*l/1.7%

      \[\leadsto \sqrt{\color{blue}{\frac{1 \cdot \frac{0.25}{{x}^{6}}}{\pi}}} \]
    2. *-lft-identity1.7%

      \[\leadsto \sqrt{\frac{\color{blue}{\frac{0.25}{{x}^{6}}}}{\pi}} \]
  10. Simplified1.7%

    \[\leadsto \color{blue}{\sqrt{\frac{\frac{0.25}{{x}^{6}}}{\pi}}} \]
  11. Applied egg-rr93.2%

    \[\leadsto \sqrt{\frac{\color{blue}{\sqrt{0.0625 \cdot {x}^{12}}}}{\pi}} \]
  12. Add Preprocessing

Alternative 3: 83.5% accurate, 10.1× speedup?

\[\begin{array}{l} \\ 0.5 \cdot \sqrt{\frac{{x}^{6}}{\pi}} \end{array} \]
(FPCore (x) :precision binary64 (* 0.5 (sqrt (/ (pow x 6.0) PI))))
double code(double x) {
	return 0.5 * sqrt((pow(x, 6.0) / ((double) M_PI)));
}
public static double code(double x) {
	return 0.5 * Math.sqrt((Math.pow(x, 6.0) / Math.PI));
}
def code(x):
	return 0.5 * math.sqrt((math.pow(x, 6.0) / math.pi))
function code(x)
	return Float64(0.5 * sqrt(Float64((x ^ 6.0) / pi)))
end
function tmp = code(x)
	tmp = 0.5 * sqrt(((x ^ 6.0) / pi));
end
code[x_] := N[(0.5 * N[Sqrt[N[(N[Power[x, 6.0], $MachinePrecision] / Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.5 \cdot \sqrt{\frac{{x}^{6}}{\pi}}
\end{array}
Derivation
  1. Initial program 100.0%

    \[\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(\frac{1}{\left|x\right|} + \frac{1}{2} \cdot \left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{3}{4} \cdot \left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{15}{8} \cdot \left(\left(\left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) \]
  2. Simplified100.0%

    \[\leadsto \color{blue}{\frac{e^{x \cdot x}}{\sqrt{\pi}} \cdot \mathsf{fma}\left(0.75, {\left(\frac{1}{\left|x\right|}\right)}^{5}, \mathsf{fma}\left(1.875, {\left(\frac{1}{\left|x\right|}\right)}^{7}, \frac{1 + \frac{0.5}{x \cdot x}}{\left|x\right|}\right)\right)} \]
  3. Add Preprocessing
  4. Taylor expanded in x around 0 1.8%

    \[\leadsto \color{blue}{0.5 \cdot \left(\frac{1}{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{\frac{1}{\pi}}\right)} \]
  5. Step-by-step derivation
    1. inv-pow1.8%

      \[\leadsto 0.5 \cdot \left(\color{blue}{{\left({x}^{2} \cdot \left|x\right|\right)}^{-1}} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    2. pow-to-exp1.8%

      \[\leadsto 0.5 \cdot \left(\color{blue}{e^{\log \left({x}^{2} \cdot \left|x\right|\right) \cdot -1}} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    3. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \color{blue}{\left(\sqrt{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{{x}^{2} \cdot \left|x\right|}\right)} \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    4. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \color{blue}{\left({x}^{2} \cdot \left|x\right|\right)} \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    5. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \left({x}^{2} \cdot \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    6. fabs-sqr1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \left({x}^{2} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    7. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \left({x}^{2} \cdot \color{blue}{x}\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    8. pow-plus1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \color{blue}{\left({x}^{\left(2 + 1\right)}\right)} \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    9. metadata-eval1.8%

      \[\leadsto 0.5 \cdot \left(e^{\log \left({x}^{\color{blue}{3}}\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
    10. log-pow1.8%

      \[\leadsto 0.5 \cdot \left(e^{\color{blue}{\left(3 \cdot \log x\right)} \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \]
  6. Applied egg-rr1.8%

    \[\leadsto 0.5 \cdot \left(\color{blue}{e^{\left(3 \cdot \log x\right) \cdot -1}} \cdot \sqrt{\frac{1}{\pi}}\right) \]
  7. Step-by-step derivation
    1. add-sqr-sqrt1.8%

      \[\leadsto 0.5 \cdot \color{blue}{\left(\sqrt{e^{\left(3 \cdot \log x\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}} \cdot \sqrt{e^{\left(3 \cdot \log x\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}}\right)} \]
    2. sqrt-unprod1.7%

      \[\leadsto 0.5 \cdot \color{blue}{\sqrt{\left(e^{\left(3 \cdot \log x\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right) \cdot \left(e^{\left(3 \cdot \log x\right) \cdot -1} \cdot \sqrt{\frac{1}{\pi}}\right)}} \]
    3. swap-sqr1.7%

      \[\leadsto 0.5 \cdot \sqrt{\color{blue}{\left(e^{\left(3 \cdot \log x\right) \cdot -1} \cdot e^{\left(3 \cdot \log x\right) \cdot -1}\right) \cdot \left(\sqrt{\frac{1}{\pi}} \cdot \sqrt{\frac{1}{\pi}}\right)}} \]
  8. Applied egg-rr85.3%

    \[\leadsto 0.5 \cdot \color{blue}{\sqrt{{x}^{6} \cdot \frac{1}{\pi}}} \]
  9. Step-by-step derivation
    1. associate-*r/85.3%

      \[\leadsto 0.5 \cdot \sqrt{\color{blue}{\frac{{x}^{6} \cdot 1}{\pi}}} \]
    2. *-rgt-identity85.3%

      \[\leadsto 0.5 \cdot \sqrt{\frac{\color{blue}{{x}^{6}}}{\pi}} \]
  10. Simplified85.3%

    \[\leadsto 0.5 \cdot \color{blue}{\sqrt{\frac{{x}^{6}}{\pi}}} \]
  11. Add Preprocessing

Alternative 4: 1.8% accurate, 10.1× speedup?

\[\begin{array}{l} \\ \sqrt{\frac{\frac{0.25}{{x}^{6}}}{\pi}} \end{array} \]
(FPCore (x) :precision binary64 (sqrt (/ (/ 0.25 (pow x 6.0)) PI)))
double code(double x) {
	return sqrt(((0.25 / pow(x, 6.0)) / ((double) M_PI)));
}
public static double code(double x) {
	return Math.sqrt(((0.25 / Math.pow(x, 6.0)) / Math.PI));
}
def code(x):
	return math.sqrt(((0.25 / math.pow(x, 6.0)) / math.pi))
function code(x)
	return sqrt(Float64(Float64(0.25 / (x ^ 6.0)) / pi))
end
function tmp = code(x)
	tmp = sqrt(((0.25 / (x ^ 6.0)) / pi));
end
code[x_] := N[Sqrt[N[(N[(0.25 / N[Power[x, 6.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\frac{\frac{0.25}{{x}^{6}}}{\pi}}
\end{array}
Derivation
  1. Initial program 100.0%

    \[\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(\frac{1}{\left|x\right|} + \frac{1}{2} \cdot \left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{3}{4} \cdot \left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{15}{8} \cdot \left(\left(\left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) \]
  2. Simplified100.0%

    \[\leadsto \color{blue}{\frac{e^{x \cdot x}}{\sqrt{\pi}} \cdot \mathsf{fma}\left(0.75, {\left(\frac{1}{\left|x\right|}\right)}^{5}, \mathsf{fma}\left(1.875, {\left(\frac{1}{\left|x\right|}\right)}^{7}, \frac{1 + \frac{0.5}{x \cdot x}}{\left|x\right|}\right)\right)} \]
  3. Add Preprocessing
  4. Taylor expanded in x around 0 1.8%

    \[\leadsto \color{blue}{0.5 \cdot \left(\frac{1}{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{\frac{1}{\pi}}\right)} \]
  5. Step-by-step derivation
    1. associate-*r*1.8%

      \[\leadsto \color{blue}{\left(0.5 \cdot \frac{1}{{x}^{2} \cdot \left|x\right|}\right) \cdot \sqrt{\frac{1}{\pi}}} \]
    2. associate-*r/1.8%

      \[\leadsto \color{blue}{\frac{0.5 \cdot 1}{{x}^{2} \cdot \left|x\right|}} \cdot \sqrt{\frac{1}{\pi}} \]
    3. metadata-eval1.8%

      \[\leadsto \frac{\color{blue}{0.5}}{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{\frac{1}{\pi}} \]
  6. Simplified1.8%

    \[\leadsto \color{blue}{\frac{0.5}{{x}^{2} \cdot \left|x\right|} \cdot \sqrt{\frac{1}{\pi}}} \]
  7. Step-by-step derivation
    1. associate-*l/1.8%

      \[\leadsto \color{blue}{\frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{2} \cdot \left|x\right|}} \]
    2. add-sqr-sqrt1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{2} \cdot \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|} \]
    3. fabs-sqr1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{2} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}} \]
    4. add-sqr-sqrt1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{2} \cdot \color{blue}{x}} \]
    5. pow-plus1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{\color{blue}{{x}^{\left(2 + 1\right)}}} \]
    6. metadata-eval1.8%

      \[\leadsto \frac{0.5 \cdot \sqrt{\frac{1}{\pi}}}{{x}^{\color{blue}{3}}} \]
    7. associate-*l/1.8%

      \[\leadsto \color{blue}{\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}} \]
    8. add-sqr-sqrt1.8%

      \[\leadsto \color{blue}{\sqrt{\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}} \cdot \sqrt{\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}}} \]
    9. sqrt-unprod1.7%

      \[\leadsto \color{blue}{\sqrt{\left(\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}\right) \cdot \left(\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}\right)}} \]
    10. *-commutative1.7%

      \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \frac{0.5}{{x}^{3}}\right)} \cdot \left(\frac{0.5}{{x}^{3}} \cdot \sqrt{\frac{1}{\pi}}\right)} \]
    11. *-commutative1.7%

      \[\leadsto \sqrt{\left(\sqrt{\frac{1}{\pi}} \cdot \frac{0.5}{{x}^{3}}\right) \cdot \color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \frac{0.5}{{x}^{3}}\right)}} \]
    12. swap-sqr1.7%

      \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{1}{\pi}} \cdot \sqrt{\frac{1}{\pi}}\right) \cdot \left(\frac{0.5}{{x}^{3}} \cdot \frac{0.5}{{x}^{3}}\right)}} \]
    13. add-sqr-sqrt1.7%

      \[\leadsto \sqrt{\color{blue}{\frac{1}{\pi}} \cdot \left(\frac{0.5}{{x}^{3}} \cdot \frac{0.5}{{x}^{3}}\right)} \]
    14. frac-times1.7%

      \[\leadsto \sqrt{\frac{1}{\pi} \cdot \color{blue}{\frac{0.5 \cdot 0.5}{{x}^{3} \cdot {x}^{3}}}} \]
    15. metadata-eval1.7%

      \[\leadsto \sqrt{\frac{1}{\pi} \cdot \frac{\color{blue}{0.25}}{{x}^{3} \cdot {x}^{3}}} \]
  8. Applied egg-rr1.7%

    \[\leadsto \color{blue}{\sqrt{\frac{1}{\pi} \cdot \frac{0.25}{{x}^{6}}}} \]
  9. Step-by-step derivation
    1. associate-*l/1.7%

      \[\leadsto \sqrt{\color{blue}{\frac{1 \cdot \frac{0.25}{{x}^{6}}}{\pi}}} \]
    2. *-lft-identity1.7%

      \[\leadsto \sqrt{\frac{\color{blue}{\frac{0.25}{{x}^{6}}}}{\pi}} \]
  10. Simplified1.7%

    \[\leadsto \color{blue}{\sqrt{\frac{\frac{0.25}{{x}^{6}}}{\pi}}} \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2024113 
(FPCore (x)
  :name "Jmat.Real.erfi, branch x greater than or equal to 5"
  :precision binary64
  :pre (>= x 0.5)
  (* (* (/ 1.0 (sqrt PI)) (exp (* (fabs x) (fabs x)))) (+ (+ (+ (/ 1.0 (fabs x)) (* (/ 1.0 2.0) (* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))))) (* (/ 3.0 4.0) (* (* (* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))))) (* (/ 15.0 8.0) (* (* (* (* (* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x)))))))