
(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}
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(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}
Initial program 99.8%
(FPCore (x)
:precision binary64
(*
(/ 1.0 (sqrt PI))
(fabs
(*
(fma
(* 0.047619047619047616 (* x x))
(* (* (* x x) x) x)
(fma (* x x) (fma (* 0.2 x) x 0.6666666666666666) 2.0))
x))))
double code(double x) {
return (1.0 / sqrt(((double) M_PI))) * fabs((fma((0.047619047619047616 * (x * x)), (((x * x) * x) * x), fma((x * x), fma((0.2 * x), x, 0.6666666666666666), 2.0)) * x));
}
function code(x) return Float64(Float64(1.0 / sqrt(pi)) * abs(Float64(fma(Float64(0.047619047619047616 * Float64(x * x)), Float64(Float64(Float64(x * x) * x) * x), fma(Float64(x * x), fma(Float64(0.2 * x), x, 0.6666666666666666), 2.0)) * x))) end
code[x_] := N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Abs[N[(N[(N[(0.047619047619047616 * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * N[(N[(0.2 * x), $MachinePrecision] * x + 0.6666666666666666), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\sqrt{\pi}} \cdot \left|\mathsf{fma}\left(0.047619047619047616 \cdot \left(x \cdot x\right), \left(\left(x \cdot x\right) \cdot x\right) \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(0.2 \cdot x, x, 0.6666666666666666\right), 2\right)\right) \cdot x\right|
\end{array}
Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
(FPCore (x)
:precision binary64
(*
(/ 1.0 (sqrt PI))
(fabs
(*
(fma
(* 0.047619047619047616 (* x x))
(* (* (* x x) x) x)
(fma (* x x) 0.6666666666666666 2.0))
x))))
double code(double x) {
return (1.0 / sqrt(((double) M_PI))) * fabs((fma((0.047619047619047616 * (x * x)), (((x * x) * x) * x), fma((x * x), 0.6666666666666666, 2.0)) * x));
}
function code(x) return Float64(Float64(1.0 / sqrt(pi)) * abs(Float64(fma(Float64(0.047619047619047616 * Float64(x * x)), Float64(Float64(Float64(x * x) * x) * x), fma(Float64(x * x), 0.6666666666666666, 2.0)) * x))) end
code[x_] := N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Abs[N[(N[(N[(0.047619047619047616 * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * 0.6666666666666666 + 2.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\sqrt{\pi}} \cdot \left|\mathsf{fma}\left(0.047619047619047616 \cdot \left(x \cdot x\right), \left(\left(x \cdot x\right) \cdot x\right) \cdot x, \mathsf{fma}\left(x \cdot x, 0.6666666666666666, 2\right)\right) \cdot x\right|
\end{array}
Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites99.2%
(FPCore (x)
:precision binary64
(let* ((t_0 (/ 1.0 (sqrt PI))))
(if (<= x 1.85)
(* t_0 (fabs (* x 2.0)))
(* t_0 (fabs (* 0.047619047619047616 (pow x 7.0)))))))
double code(double x) {
double t_0 = 1.0 / sqrt(((double) M_PI));
double tmp;
if (x <= 1.85) {
tmp = t_0 * fabs((x * 2.0));
} else {
tmp = t_0 * fabs((0.047619047619047616 * pow(x, 7.0)));
}
return tmp;
}
public static double code(double x) {
double t_0 = 1.0 / Math.sqrt(Math.PI);
double tmp;
if (x <= 1.85) {
tmp = t_0 * Math.abs((x * 2.0));
} else {
tmp = t_0 * Math.abs((0.047619047619047616 * Math.pow(x, 7.0)));
}
return tmp;
}
def code(x): t_0 = 1.0 / math.sqrt(math.pi) tmp = 0 if x <= 1.85: tmp = t_0 * math.fabs((x * 2.0)) else: tmp = t_0 * math.fabs((0.047619047619047616 * math.pow(x, 7.0))) return tmp
function code(x) t_0 = Float64(1.0 / sqrt(pi)) tmp = 0.0 if (x <= 1.85) tmp = Float64(t_0 * abs(Float64(x * 2.0))); else tmp = Float64(t_0 * abs(Float64(0.047619047619047616 * (x ^ 7.0)))); end return tmp end
function tmp_2 = code(x) t_0 = 1.0 / sqrt(pi); tmp = 0.0; if (x <= 1.85) tmp = t_0 * abs((x * 2.0)); else tmp = t_0 * abs((0.047619047619047616 * (x ^ 7.0))); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.85], N[(t$95$0 * N[Abs[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Abs[N[(0.047619047619047616 * N[Power[x, 7.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sqrt{\pi}}\\
\mathbf{if}\;x \leq 1.85:\\
\;\;\;\;t\_0 \cdot \left|x \cdot 2\right|\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left|0.047619047619047616 \cdot {x}^{7}\right|\\
\end{array}
\end{array}
if x < 1.8500000000000001Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
if 1.8500000000000001 < x Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-pow.f6436.9
Applied rewrites36.9%
(FPCore (x)
:precision binary64
(if (<= x 1.85)
(* (/ 1.0 (sqrt PI)) (fabs (* x 2.0)))
(/
(fabs (* (* (* (* (* (* (* x x) x) x) x) 0.047619047619047616) x) x))
(sqrt PI))))
double code(double x) {
double tmp;
if (x <= 1.85) {
tmp = (1.0 / sqrt(((double) M_PI))) * fabs((x * 2.0));
} else {
tmp = fabs((((((((x * x) * x) * x) * x) * 0.047619047619047616) * x) * x)) / sqrt(((double) M_PI));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.85) {
tmp = (1.0 / Math.sqrt(Math.PI)) * Math.abs((x * 2.0));
} else {
tmp = Math.abs((((((((x * x) * x) * x) * x) * 0.047619047619047616) * x) * x)) / Math.sqrt(Math.PI);
}
return tmp;
}
def code(x): tmp = 0 if x <= 1.85: tmp = (1.0 / math.sqrt(math.pi)) * math.fabs((x * 2.0)) else: tmp = math.fabs((((((((x * x) * x) * x) * x) * 0.047619047619047616) * x) * x)) / math.sqrt(math.pi) return tmp
function code(x) tmp = 0.0 if (x <= 1.85) tmp = Float64(Float64(1.0 / sqrt(pi)) * abs(Float64(x * 2.0))); else tmp = Float64(abs(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * x) * x) * x) * x) * 0.047619047619047616) * x) * x)) / sqrt(pi)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 1.85) tmp = (1.0 / sqrt(pi)) * abs((x * 2.0)); else tmp = abs((((((((x * x) * x) * x) * x) * 0.047619047619047616) * x) * x)) / sqrt(pi); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1.85], N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Abs[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[(N[(N[(N[(N[(N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * 0.047619047619047616), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision]], $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85:\\
\;\;\;\;\frac{1}{\sqrt{\pi}} \cdot \left|x \cdot 2\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{\left|\left(\left(\left(\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot 0.047619047619047616\right) \cdot x\right) \cdot x\right|}{\sqrt{\pi}}\\
\end{array}
\end{array}
if x < 1.8500000000000001Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
if 1.8500000000000001 < x Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-pow.f6436.9
Applied rewrites36.9%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flip-revN/A
lower-/.f6436.9
Applied rewrites36.9%
(FPCore (x)
:precision binary64
(if (<= x 1.85)
(* (/ 1.0 (sqrt PI)) (fabs (* x 2.0)))
(fabs
(*
(/ x (sqrt PI))
(* (* (* (* (* (* x x) x) x) x) 0.047619047619047616) x)))))
double code(double x) {
double tmp;
if (x <= 1.85) {
tmp = (1.0 / sqrt(((double) M_PI))) * fabs((x * 2.0));
} else {
tmp = fabs(((x / sqrt(((double) M_PI))) * ((((((x * x) * x) * x) * x) * 0.047619047619047616) * x)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.85) {
tmp = (1.0 / Math.sqrt(Math.PI)) * Math.abs((x * 2.0));
} else {
tmp = Math.abs(((x / Math.sqrt(Math.PI)) * ((((((x * x) * x) * x) * x) * 0.047619047619047616) * x)));
}
return tmp;
}
def code(x): tmp = 0 if x <= 1.85: tmp = (1.0 / math.sqrt(math.pi)) * math.fabs((x * 2.0)) else: tmp = math.fabs(((x / math.sqrt(math.pi)) * ((((((x * x) * x) * x) * x) * 0.047619047619047616) * x))) return tmp
function code(x) tmp = 0.0 if (x <= 1.85) tmp = Float64(Float64(1.0 / sqrt(pi)) * abs(Float64(x * 2.0))); else tmp = abs(Float64(Float64(x / sqrt(pi)) * Float64(Float64(Float64(Float64(Float64(Float64(x * x) * x) * x) * x) * 0.047619047619047616) * x))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 1.85) tmp = (1.0 / sqrt(pi)) * abs((x * 2.0)); else tmp = abs(((x / sqrt(pi)) * ((((((x * x) * x) * x) * x) * 0.047619047619047616) * x))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1.85], N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Abs[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(x / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * 0.047619047619047616), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85:\\
\;\;\;\;\frac{1}{\sqrt{\pi}} \cdot \left|x \cdot 2\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{\sqrt{\pi}} \cdot \left(\left(\left(\left(\left(\left(x \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot 0.047619047619047616\right) \cdot x\right)\right|\\
\end{array}
\end{array}
if x < 1.8500000000000001Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
if 1.8500000000000001 < x Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-pow.f6436.9
Applied rewrites36.9%
Applied rewrites36.9%
(FPCore (x) :precision binary64 (fabs (/ (fma (pow (fabs x) 7.0) -0.047619047619047616 (- (* (fabs x) 2.0))) (- (sqrt PI)))))
double code(double x) {
return fabs((fma(pow(fabs(x), 7.0), -0.047619047619047616, -(fabs(x) * 2.0)) / -sqrt(((double) M_PI))));
}
function code(x) return abs(Float64(fma((abs(x) ^ 7.0), -0.047619047619047616, Float64(-Float64(abs(x) * 2.0))) / Float64(-sqrt(pi)))) end
code[x_] := N[Abs[N[(N[(N[Power[N[Abs[x], $MachinePrecision], 7.0], $MachinePrecision] * -0.047619047619047616 + (-N[(N[Abs[x], $MachinePrecision] * 2.0), $MachinePrecision])), $MachinePrecision] / (-N[Sqrt[Pi], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{\mathsf{fma}\left({\left(\left|x\right|\right)}^{7}, -0.047619047619047616, -\left|x\right| \cdot 2\right)}{-\sqrt{\pi}}\right|
\end{array}
Initial program 99.8%
Applied rewrites99.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower-fabs.f6498.4
Applied rewrites98.4%
lift--.f64N/A
sub-flipN/A
lift-*.f64N/A
lower-fma.f64N/A
lower-neg.f6498.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.4
Applied rewrites98.4%
(FPCore (x) :precision binary64 (/ (fabs (- (* (fabs x) 2.0) (* (pow (fabs x) 7.0) -0.047619047619047616))) (sqrt PI)))
double code(double x) {
return fabs(((fabs(x) * 2.0) - (pow(fabs(x), 7.0) * -0.047619047619047616))) / sqrt(((double) M_PI));
}
public static double code(double x) {
return Math.abs(((Math.abs(x) * 2.0) - (Math.pow(Math.abs(x), 7.0) * -0.047619047619047616))) / Math.sqrt(Math.PI);
}
def code(x): return math.fabs(((math.fabs(x) * 2.0) - (math.pow(math.fabs(x), 7.0) * -0.047619047619047616))) / math.sqrt(math.pi)
function code(x) return Float64(abs(Float64(Float64(abs(x) * 2.0) - Float64((abs(x) ^ 7.0) * -0.047619047619047616))) / sqrt(pi)) end
function tmp = code(x) tmp = abs(((abs(x) * 2.0) - ((abs(x) ^ 7.0) * -0.047619047619047616))) / sqrt(pi); end
code[x_] := N[(N[Abs[N[(N[(N[Abs[x], $MachinePrecision] * 2.0), $MachinePrecision] - N[(N[Power[N[Abs[x], $MachinePrecision], 7.0], $MachinePrecision] * -0.047619047619047616), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left|\left|x\right| \cdot 2 - {\left(\left|x\right|\right)}^{7} \cdot -0.047619047619047616\right|}{\sqrt{\pi}}
\end{array}
Initial program 99.8%
Applied rewrites99.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower-fabs.f6498.4
Applied rewrites98.4%
lift-fabs.f64N/A
lift-/.f64N/A
fabs-divN/A
lift-neg.f64N/A
neg-fabsN/A
lift-sqrt.f64N/A
sqrt-fabs-revN/A
lift-sqrt.f64N/A
Applied rewrites98.4%
(FPCore (x) :precision binary64 (if (<= x 1.8) (* (/ 1.0 (sqrt PI)) (fabs (* x 2.0))) (fabs (* (* (/ (fabs x) (sqrt PI)) (* 0.2 (* (* x x) x))) x))))
double code(double x) {
double tmp;
if (x <= 1.8) {
tmp = (1.0 / sqrt(((double) M_PI))) * fabs((x * 2.0));
} else {
tmp = fabs((((fabs(x) / sqrt(((double) M_PI))) * (0.2 * ((x * x) * x))) * x));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.8) {
tmp = (1.0 / Math.sqrt(Math.PI)) * Math.abs((x * 2.0));
} else {
tmp = Math.abs((((Math.abs(x) / Math.sqrt(Math.PI)) * (0.2 * ((x * x) * x))) * x));
}
return tmp;
}
def code(x): tmp = 0 if x <= 1.8: tmp = (1.0 / math.sqrt(math.pi)) * math.fabs((x * 2.0)) else: tmp = math.fabs((((math.fabs(x) / math.sqrt(math.pi)) * (0.2 * ((x * x) * x))) * x)) return tmp
function code(x) tmp = 0.0 if (x <= 1.8) tmp = Float64(Float64(1.0 / sqrt(pi)) * abs(Float64(x * 2.0))); else tmp = abs(Float64(Float64(Float64(abs(x) / sqrt(pi)) * Float64(0.2 * Float64(Float64(x * x) * x))) * x)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 1.8) tmp = (1.0 / sqrt(pi)) * abs((x * 2.0)); else tmp = abs((((abs(x) / sqrt(pi)) * (0.2 * ((x * x) * x))) * x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1.8], N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Abs[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(N[(N[Abs[x], $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(0.2 * N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.8:\\
\;\;\;\;\frac{1}{\sqrt{\pi}} \cdot \left|x \cdot 2\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(\frac{\left|x\right|}{\sqrt{\pi}} \cdot \left(0.2 \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)\right) \cdot x\right|\\
\end{array}
\end{array}
if x < 1.80000000000000004Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
if 1.80000000000000004 < x Initial program 99.8%
Applied rewrites99.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-fabs.f64N/A
lower-sqrt.f64N/A
lower-PI.f6431.2
Applied rewrites31.2%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-pow.f64N/A
metadata-evalN/A
pow-plusN/A
pow3N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites31.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites31.1%
(FPCore (x) :precision binary64 (if (<= x 2e-21) (* (/ 1.0 (sqrt PI)) (fabs (* x 2.0))) (sqrt (/ (* (* (* 2.0 x) x) 2.0) PI))))
double code(double x) {
double tmp;
if (x <= 2e-21) {
tmp = (1.0 / sqrt(((double) M_PI))) * fabs((x * 2.0));
} else {
tmp = sqrt(((((2.0 * x) * x) * 2.0) / ((double) M_PI)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 2e-21) {
tmp = (1.0 / Math.sqrt(Math.PI)) * Math.abs((x * 2.0));
} else {
tmp = Math.sqrt(((((2.0 * x) * x) * 2.0) / Math.PI));
}
return tmp;
}
def code(x): tmp = 0 if x <= 2e-21: tmp = (1.0 / math.sqrt(math.pi)) * math.fabs((x * 2.0)) else: tmp = math.sqrt(((((2.0 * x) * x) * 2.0) / math.pi)) return tmp
function code(x) tmp = 0.0 if (x <= 2e-21) tmp = Float64(Float64(1.0 / sqrt(pi)) * abs(Float64(x * 2.0))); else tmp = sqrt(Float64(Float64(Float64(Float64(2.0 * x) * x) * 2.0) / pi)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 2e-21) tmp = (1.0 / sqrt(pi)) * abs((x * 2.0)); else tmp = sqrt(((((2.0 * x) * x) * 2.0) / pi)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 2e-21], N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Abs[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(N[(N[(2.0 * x), $MachinePrecision] * x), $MachinePrecision] * 2.0), $MachinePrecision] / Pi), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{-21}:\\
\;\;\;\;\frac{1}{\sqrt{\pi}} \cdot \left|x \cdot 2\right|\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\left(2 \cdot x\right) \cdot x\right) \cdot 2}{\pi}}\\
\end{array}
\end{array}
if x < 1.99999999999999982e-21Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
if 1.99999999999999982e-21 < x Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flip-revN/A
lift-fabs.f64N/A
rem-sqrt-square-revN/A
lift-sqrt.f64N/A
Applied rewrites52.8%
(FPCore (x)
:precision binary64
(let* ((t_0 (/ 1.0 (sqrt PI))))
(if (<= x 100000000.0)
(* t_0 (fabs (* x 2.0)))
(* t_0 (* (sqrt (* (* 2.0 x) x)) (sqrt 2.0))))))
double code(double x) {
double t_0 = 1.0 / sqrt(((double) M_PI));
double tmp;
if (x <= 100000000.0) {
tmp = t_0 * fabs((x * 2.0));
} else {
tmp = t_0 * (sqrt(((2.0 * x) * x)) * sqrt(2.0));
}
return tmp;
}
public static double code(double x) {
double t_0 = 1.0 / Math.sqrt(Math.PI);
double tmp;
if (x <= 100000000.0) {
tmp = t_0 * Math.abs((x * 2.0));
} else {
tmp = t_0 * (Math.sqrt(((2.0 * x) * x)) * Math.sqrt(2.0));
}
return tmp;
}
def code(x): t_0 = 1.0 / math.sqrt(math.pi) tmp = 0 if x <= 100000000.0: tmp = t_0 * math.fabs((x * 2.0)) else: tmp = t_0 * (math.sqrt(((2.0 * x) * x)) * math.sqrt(2.0)) return tmp
function code(x) t_0 = Float64(1.0 / sqrt(pi)) tmp = 0.0 if (x <= 100000000.0) tmp = Float64(t_0 * abs(Float64(x * 2.0))); else tmp = Float64(t_0 * Float64(sqrt(Float64(Float64(2.0 * x) * x)) * sqrt(2.0))); end return tmp end
function tmp_2 = code(x) t_0 = 1.0 / sqrt(pi); tmp = 0.0; if (x <= 100000000.0) tmp = t_0 * abs((x * 2.0)); else tmp = t_0 * (sqrt(((2.0 * x) * x)) * sqrt(2.0)); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 100000000.0], N[(t$95$0 * N[Abs[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[N[(N[(2.0 * x), $MachinePrecision] * x), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sqrt{\pi}}\\
\mathbf{if}\;x \leq 100000000:\\
\;\;\;\;t\_0 \cdot \left|x \cdot 2\right|\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{\left(2 \cdot x\right) \cdot x} \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if x < 1e8Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
if 1e8 < x Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
lift-fabs.f64N/A
rem-sqrt-square-revN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites52.7%
(FPCore (x) :precision binary64 (* (/ 1.0 (sqrt PI)) (fabs (* x 2.0))))
double code(double x) {
return (1.0 / sqrt(((double) M_PI))) * fabs((x * 2.0));
}
public static double code(double x) {
return (1.0 / Math.sqrt(Math.PI)) * Math.abs((x * 2.0));
}
def code(x): return (1.0 / math.sqrt(math.pi)) * math.fabs((x * 2.0))
function code(x) return Float64(Float64(1.0 / sqrt(pi)) * abs(Float64(x * 2.0))) end
function tmp = code(x) tmp = (1.0 / sqrt(pi)) * abs((x * 2.0)); end
code[x_] := N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Abs[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\sqrt{\pi}} \cdot \left|x \cdot 2\right|
\end{array}
Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
(FPCore (x) :precision binary64 (/ (fabs (* 2.0 x)) (sqrt PI)))
double code(double x) {
return fabs((2.0 * x)) / sqrt(((double) M_PI));
}
public static double code(double x) {
return Math.abs((2.0 * x)) / Math.sqrt(Math.PI);
}
def code(x): return math.fabs((2.0 * x)) / math.sqrt(math.pi)
function code(x) return Float64(abs(Float64(2.0 * x)) / sqrt(pi)) end
function tmp = code(x) tmp = abs((2.0 * x)) / sqrt(pi); end
code[x_] := N[(N[Abs[N[(2.0 * x), $MachinePrecision]], $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left|2 \cdot x\right|}{\sqrt{\pi}}
\end{array}
Initial program 99.8%
Applied rewrites99.8%
lift-fabs.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
distribute-lft-outN/A
fabs-mulN/A
lift-fabs.f64N/A
fabs-fabsN/A
mul-fabsN/A
lower-fabs.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
Applied rewrites67.7%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flip-revN/A
lower-/.f6467.2
Applied rewrites67.2%
herbie shell --seed 2025159
(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)))))))