Jmat.Real.dawson

Percentage Accurate: 53.3% → 53.3%
Time: 7.5s
Alternatives: 5
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x \cdot x\right) \cdot \left(x \cdot x\right)\\ t_1 := t_0 \cdot \left(x \cdot x\right)\\ t_2 := t_1 \cdot \left(x \cdot x\right)\\ t_3 := t_2 \cdot \left(x \cdot x\right)\\ \frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot t_0\right) + 0.0072644182 \cdot t_1\right) + 0.0005064034 \cdot t_2\right) + 0.0001789971 \cdot t_3}{\left(\left(\left(\left(\left(1 + 0.7715471019 \cdot \left(x \cdot x\right)\right) + 0.2909738639 \cdot t_0\right) + 0.0694555761 \cdot t_1\right) + 0.0140005442 \cdot t_2\right) + 0.0008327945 \cdot t_3\right) + \left(2 \cdot 0.0001789971\right) \cdot \left(t_3 \cdot \left(x \cdot x\right)\right)} \cdot x \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* (* x x) (* x x)))
        (t_1 (* t_0 (* x x)))
        (t_2 (* t_1 (* x x)))
        (t_3 (* t_2 (* x x))))
   (*
    (/
     (+
      (+
       (+
        (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 t_0))
        (* 0.0072644182 t_1))
       (* 0.0005064034 t_2))
      (* 0.0001789971 t_3))
     (+
      (+
       (+
        (+
         (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 t_0))
         (* 0.0694555761 t_1))
        (* 0.0140005442 t_2))
       (* 0.0008327945 t_3))
      (* (* 2.0 0.0001789971) (* t_3 (* x x)))))
    x)))
double code(double x) {
	double t_0 = (x * x) * (x * x);
	double t_1 = t_0 * (x * x);
	double t_2 = t_1 * (x * x);
	double t_3 = t_2 * (x * x);
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    t_0 = (x * x) * (x * x)
    t_1 = t_0 * (x * x)
    t_2 = t_1 * (x * x)
    t_3 = t_2 * (x * x)
    code = ((((((1.0d0 + (0.1049934947d0 * (x * x))) + (0.0424060604d0 * t_0)) + (0.0072644182d0 * t_1)) + (0.0005064034d0 * t_2)) + (0.0001789971d0 * t_3)) / ((((((1.0d0 + (0.7715471019d0 * (x * x))) + (0.2909738639d0 * t_0)) + (0.0694555761d0 * t_1)) + (0.0140005442d0 * t_2)) + (0.0008327945d0 * t_3)) + ((2.0d0 * 0.0001789971d0) * (t_3 * (x * x))))) * x
end function
public static double code(double x) {
	double t_0 = (x * x) * (x * x);
	double t_1 = t_0 * (x * x);
	double t_2 = t_1 * (x * x);
	double t_3 = t_2 * (x * x);
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
}
def code(x):
	t_0 = (x * x) * (x * x)
	t_1 = t_0 * (x * x)
	t_2 = t_1 * (x * x)
	t_3 = t_2 * (x * x)
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x
function code(x)
	t_0 = Float64(Float64(x * x) * Float64(x * x))
	t_1 = Float64(t_0 * Float64(x * x))
	t_2 = Float64(t_1 * Float64(x * x))
	t_3 = Float64(t_2 * Float64(x * x))
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(1.0 + Float64(0.1049934947 * Float64(x * x))) + Float64(0.0424060604 * t_0)) + Float64(0.0072644182 * t_1)) + Float64(0.0005064034 * t_2)) + Float64(0.0001789971 * t_3)) / Float64(Float64(Float64(Float64(Float64(Float64(1.0 + Float64(0.7715471019 * Float64(x * x))) + Float64(0.2909738639 * t_0)) + Float64(0.0694555761 * t_1)) + Float64(0.0140005442 * t_2)) + Float64(0.0008327945 * t_3)) + Float64(Float64(2.0 * 0.0001789971) * Float64(t_3 * Float64(x * x))))) * x)
end
function tmp = code(x)
	t_0 = (x * x) * (x * x);
	t_1 = t_0 * (x * x);
	t_2 = t_1 * (x * x);
	t_3 = t_2 * (x * x);
	tmp = ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
end
code[x_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(N[(N[(N[(1.0 + N[(0.1049934947 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0424060604 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.0072644182 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(0.0005064034 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(0.0001789971 * t$95$3), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(1.0 + N[(0.7715471019 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.2909738639 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.0694555761 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(0.0140005442 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(0.0008327945 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * 0.0001789971), $MachinePrecision] * N[(t$95$3 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x \cdot x\right) \cdot \left(x \cdot x\right)\\
t_1 := t_0 \cdot \left(x \cdot x\right)\\
t_2 := t_1 \cdot \left(x \cdot x\right)\\
t_3 := t_2 \cdot \left(x \cdot x\right)\\
\frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot t_0\right) + 0.0072644182 \cdot t_1\right) + 0.0005064034 \cdot t_2\right) + 0.0001789971 \cdot t_3}{\left(\left(\left(\left(\left(1 + 0.7715471019 \cdot \left(x \cdot x\right)\right) + 0.2909738639 \cdot t_0\right) + 0.0694555761 \cdot t_1\right) + 0.0140005442 \cdot t_2\right) + 0.0008327945 \cdot t_3\right) + \left(2 \cdot 0.0001789971\right) \cdot \left(t_3 \cdot \left(x \cdot x\right)\right)} \cdot x
\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 5 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: 53.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x \cdot x\right) \cdot \left(x \cdot x\right)\\ t_1 := t_0 \cdot \left(x \cdot x\right)\\ t_2 := t_1 \cdot \left(x \cdot x\right)\\ t_3 := t_2 \cdot \left(x \cdot x\right)\\ \frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot t_0\right) + 0.0072644182 \cdot t_1\right) + 0.0005064034 \cdot t_2\right) + 0.0001789971 \cdot t_3}{\left(\left(\left(\left(\left(1 + 0.7715471019 \cdot \left(x \cdot x\right)\right) + 0.2909738639 \cdot t_0\right) + 0.0694555761 \cdot t_1\right) + 0.0140005442 \cdot t_2\right) + 0.0008327945 \cdot t_3\right) + \left(2 \cdot 0.0001789971\right) \cdot \left(t_3 \cdot \left(x \cdot x\right)\right)} \cdot x \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* (* x x) (* x x)))
        (t_1 (* t_0 (* x x)))
        (t_2 (* t_1 (* x x)))
        (t_3 (* t_2 (* x x))))
   (*
    (/
     (+
      (+
       (+
        (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 t_0))
        (* 0.0072644182 t_1))
       (* 0.0005064034 t_2))
      (* 0.0001789971 t_3))
     (+
      (+
       (+
        (+
         (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 t_0))
         (* 0.0694555761 t_1))
        (* 0.0140005442 t_2))
       (* 0.0008327945 t_3))
      (* (* 2.0 0.0001789971) (* t_3 (* x x)))))
    x)))
double code(double x) {
	double t_0 = (x * x) * (x * x);
	double t_1 = t_0 * (x * x);
	double t_2 = t_1 * (x * x);
	double t_3 = t_2 * (x * x);
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    t_0 = (x * x) * (x * x)
    t_1 = t_0 * (x * x)
    t_2 = t_1 * (x * x)
    t_3 = t_2 * (x * x)
    code = ((((((1.0d0 + (0.1049934947d0 * (x * x))) + (0.0424060604d0 * t_0)) + (0.0072644182d0 * t_1)) + (0.0005064034d0 * t_2)) + (0.0001789971d0 * t_3)) / ((((((1.0d0 + (0.7715471019d0 * (x * x))) + (0.2909738639d0 * t_0)) + (0.0694555761d0 * t_1)) + (0.0140005442d0 * t_2)) + (0.0008327945d0 * t_3)) + ((2.0d0 * 0.0001789971d0) * (t_3 * (x * x))))) * x
end function
public static double code(double x) {
	double t_0 = (x * x) * (x * x);
	double t_1 = t_0 * (x * x);
	double t_2 = t_1 * (x * x);
	double t_3 = t_2 * (x * x);
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
}
def code(x):
	t_0 = (x * x) * (x * x)
	t_1 = t_0 * (x * x)
	t_2 = t_1 * (x * x)
	t_3 = t_2 * (x * x)
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x
function code(x)
	t_0 = Float64(Float64(x * x) * Float64(x * x))
	t_1 = Float64(t_0 * Float64(x * x))
	t_2 = Float64(t_1 * Float64(x * x))
	t_3 = Float64(t_2 * Float64(x * x))
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(1.0 + Float64(0.1049934947 * Float64(x * x))) + Float64(0.0424060604 * t_0)) + Float64(0.0072644182 * t_1)) + Float64(0.0005064034 * t_2)) + Float64(0.0001789971 * t_3)) / Float64(Float64(Float64(Float64(Float64(Float64(1.0 + Float64(0.7715471019 * Float64(x * x))) + Float64(0.2909738639 * t_0)) + Float64(0.0694555761 * t_1)) + Float64(0.0140005442 * t_2)) + Float64(0.0008327945 * t_3)) + Float64(Float64(2.0 * 0.0001789971) * Float64(t_3 * Float64(x * x))))) * x)
end
function tmp = code(x)
	t_0 = (x * x) * (x * x);
	t_1 = t_0 * (x * x);
	t_2 = t_1 * (x * x);
	t_3 = t_2 * (x * x);
	tmp = ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
end
code[x_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(N[(N[(N[(1.0 + N[(0.1049934947 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0424060604 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.0072644182 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(0.0005064034 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(0.0001789971 * t$95$3), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(1.0 + N[(0.7715471019 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.2909738639 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.0694555761 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(0.0140005442 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(0.0008327945 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * 0.0001789971), $MachinePrecision] * N[(t$95$3 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x \cdot x\right) \cdot \left(x \cdot x\right)\\
t_1 := t_0 \cdot \left(x \cdot x\right)\\
t_2 := t_1 \cdot \left(x \cdot x\right)\\
t_3 := t_2 \cdot \left(x \cdot x\right)\\
\frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot t_0\right) + 0.0072644182 \cdot t_1\right) + 0.0005064034 \cdot t_2\right) + 0.0001789971 \cdot t_3}{\left(\left(\left(\left(\left(1 + 0.7715471019 \cdot \left(x \cdot x\right)\right) + 0.2909738639 \cdot t_0\right) + 0.0694555761 \cdot t_1\right) + 0.0140005442 \cdot t_2\right) + 0.0008327945 \cdot t_3\right) + \left(2 \cdot 0.0001789971\right) \cdot \left(t_3 \cdot \left(x \cdot x\right)\right)} \cdot x
\end{array}
\end{array}

Alternative 1: 53.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x \cdot x\right) \cdot \left(x \cdot x\right)\\ t_1 := t_0 \cdot \left(x \cdot x\right)\\ t_2 := t_1 \cdot \left(x \cdot x\right)\\ t_3 := t_2 \cdot \left(x \cdot x\right)\\ \frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot t_0\right) + 0.0072644182 \cdot t_1\right) + 0.0005064034 \cdot t_2\right) + 0.0001789971 \cdot t_3}{\left(\left(\left(\left(\left(1 + 0.7715471019 \cdot \left(x \cdot x\right)\right) + 0.2909738639 \cdot t_0\right) + 0.0694555761 \cdot t_1\right) + 0.0140005442 \cdot t_2\right) + 0.0008327945 \cdot t_3\right) + \left(2 \cdot 0.0001789971\right) \cdot \left(t_3 \cdot \left(x \cdot x\right)\right)} \cdot x \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* (* x x) (* x x)))
        (t_1 (* t_0 (* x x)))
        (t_2 (* t_1 (* x x)))
        (t_3 (* t_2 (* x x))))
   (*
    (/
     (+
      (+
       (+
        (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 t_0))
        (* 0.0072644182 t_1))
       (* 0.0005064034 t_2))
      (* 0.0001789971 t_3))
     (+
      (+
       (+
        (+
         (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 t_0))
         (* 0.0694555761 t_1))
        (* 0.0140005442 t_2))
       (* 0.0008327945 t_3))
      (* (* 2.0 0.0001789971) (* t_3 (* x x)))))
    x)))
double code(double x) {
	double t_0 = (x * x) * (x * x);
	double t_1 = t_0 * (x * x);
	double t_2 = t_1 * (x * x);
	double t_3 = t_2 * (x * x);
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    t_0 = (x * x) * (x * x)
    t_1 = t_0 * (x * x)
    t_2 = t_1 * (x * x)
    t_3 = t_2 * (x * x)
    code = ((((((1.0d0 + (0.1049934947d0 * (x * x))) + (0.0424060604d0 * t_0)) + (0.0072644182d0 * t_1)) + (0.0005064034d0 * t_2)) + (0.0001789971d0 * t_3)) / ((((((1.0d0 + (0.7715471019d0 * (x * x))) + (0.2909738639d0 * t_0)) + (0.0694555761d0 * t_1)) + (0.0140005442d0 * t_2)) + (0.0008327945d0 * t_3)) + ((2.0d0 * 0.0001789971d0) * (t_3 * (x * x))))) * x
end function
public static double code(double x) {
	double t_0 = (x * x) * (x * x);
	double t_1 = t_0 * (x * x);
	double t_2 = t_1 * (x * x);
	double t_3 = t_2 * (x * x);
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
}
def code(x):
	t_0 = (x * x) * (x * x)
	t_1 = t_0 * (x * x)
	t_2 = t_1 * (x * x)
	t_3 = t_2 * (x * x)
	return ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x
function code(x)
	t_0 = Float64(Float64(x * x) * Float64(x * x))
	t_1 = Float64(t_0 * Float64(x * x))
	t_2 = Float64(t_1 * Float64(x * x))
	t_3 = Float64(t_2 * Float64(x * x))
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(1.0 + Float64(0.1049934947 * Float64(x * x))) + Float64(0.0424060604 * t_0)) + Float64(0.0072644182 * t_1)) + Float64(0.0005064034 * t_2)) + Float64(0.0001789971 * t_3)) / Float64(Float64(Float64(Float64(Float64(Float64(1.0 + Float64(0.7715471019 * Float64(x * x))) + Float64(0.2909738639 * t_0)) + Float64(0.0694555761 * t_1)) + Float64(0.0140005442 * t_2)) + Float64(0.0008327945 * t_3)) + Float64(Float64(2.0 * 0.0001789971) * Float64(t_3 * Float64(x * x))))) * x)
end
function tmp = code(x)
	t_0 = (x * x) * (x * x);
	t_1 = t_0 * (x * x);
	t_2 = t_1 * (x * x);
	t_3 = t_2 * (x * x);
	tmp = ((((((1.0 + (0.1049934947 * (x * x))) + (0.0424060604 * t_0)) + (0.0072644182 * t_1)) + (0.0005064034 * t_2)) + (0.0001789971 * t_3)) / ((((((1.0 + (0.7715471019 * (x * x))) + (0.2909738639 * t_0)) + (0.0694555761 * t_1)) + (0.0140005442 * t_2)) + (0.0008327945 * t_3)) + ((2.0 * 0.0001789971) * (t_3 * (x * x))))) * x;
end
code[x_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(N[(N[(N[(1.0 + N[(0.1049934947 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0424060604 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.0072644182 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(0.0005064034 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(0.0001789971 * t$95$3), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(1.0 + N[(0.7715471019 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.2909738639 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.0694555761 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(0.0140005442 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(0.0008327945 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * 0.0001789971), $MachinePrecision] * N[(t$95$3 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x \cdot x\right) \cdot \left(x \cdot x\right)\\
t_1 := t_0 \cdot \left(x \cdot x\right)\\
t_2 := t_1 \cdot \left(x \cdot x\right)\\
t_3 := t_2 \cdot \left(x \cdot x\right)\\
\frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot t_0\right) + 0.0072644182 \cdot t_1\right) + 0.0005064034 \cdot t_2\right) + 0.0001789971 \cdot t_3}{\left(\left(\left(\left(\left(1 + 0.7715471019 \cdot \left(x \cdot x\right)\right) + 0.2909738639 \cdot t_0\right) + 0.0694555761 \cdot t_1\right) + 0.0140005442 \cdot t_2\right) + 0.0008327945 \cdot t_3\right) + \left(2 \cdot 0.0001789971\right) \cdot \left(t_3 \cdot \left(x \cdot x\right)\right)} \cdot x
\end{array}
\end{array}
Derivation
  1. Initial program 52.4%

    \[\frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right) + 0.0072644182 \cdot \left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)\right) + 0.0005064034 \cdot \left(\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)\right) + 0.0001789971 \cdot \left(\left(\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)}{\left(\left(\left(\left(\left(1 + 0.7715471019 \cdot \left(x \cdot x\right)\right) + 0.2909738639 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right) + 0.0694555761 \cdot \left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)\right) + 0.0140005442 \cdot \left(\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)\right) + 0.0008327945 \cdot \left(\left(\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)\right) + \left(2 \cdot 0.0001789971\right) \cdot \left(\left(\left(\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)} \cdot x \]

Alternative 2: 53.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot \left(x \cdot x\right)\right)\\ t_1 := \left(x \cdot x\right) \cdot t_0\\ t_2 := t_1 \cdot \left(x \cdot x\right)\\ t_3 := t_1 \cdot t_0\\ x \cdot \frac{\left(0.0072644182 \cdot t_1 + \left(1 + \left(\left(0.1049934947 \cdot x\right) \cdot x + 0.0424060604 \cdot t_0\right)\right)\right) + \left(0.0005064034 \cdot t_2 + 0.0001789971 \cdot t_3\right)}{0.0003579942 \cdot \left(t_2 \cdot t_0\right) + \left(t_3 \cdot 0.0008327945 + \left(t_2 \cdot 0.0140005442 + \left(t_1 \cdot 0.0694555761 + \left(1 + \left(0.7715471019 \cdot \left(x \cdot x\right) + 0.2909738639 \cdot t_0\right)\right)\right)\right)\right)} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* x (* x (* x x))))
        (t_1 (* (* x x) t_0))
        (t_2 (* t_1 (* x x)))
        (t_3 (* t_1 t_0)))
   (*
    x
    (/
     (+
      (+
       (* 0.0072644182 t_1)
       (+ 1.0 (+ (* (* 0.1049934947 x) x) (* 0.0424060604 t_0))))
      (+ (* 0.0005064034 t_2) (* 0.0001789971 t_3)))
     (+
      (* 0.0003579942 (* t_2 t_0))
      (+
       (* t_3 0.0008327945)
       (+
        (* t_2 0.0140005442)
        (+
         (* t_1 0.0694555761)
         (+ 1.0 (+ (* 0.7715471019 (* x x)) (* 0.2909738639 t_0)))))))))))
double code(double x) {
	double t_0 = x * (x * (x * x));
	double t_1 = (x * x) * t_0;
	double t_2 = t_1 * (x * x);
	double t_3 = t_1 * t_0;
	return x * ((((0.0072644182 * t_1) + (1.0 + (((0.1049934947 * x) * x) + (0.0424060604 * t_0)))) + ((0.0005064034 * t_2) + (0.0001789971 * t_3))) / ((0.0003579942 * (t_2 * t_0)) + ((t_3 * 0.0008327945) + ((t_2 * 0.0140005442) + ((t_1 * 0.0694555761) + (1.0 + ((0.7715471019 * (x * x)) + (0.2909738639 * t_0))))))));
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    t_0 = x * (x * (x * x))
    t_1 = (x * x) * t_0
    t_2 = t_1 * (x * x)
    t_3 = t_1 * t_0
    code = x * ((((0.0072644182d0 * t_1) + (1.0d0 + (((0.1049934947d0 * x) * x) + (0.0424060604d0 * t_0)))) + ((0.0005064034d0 * t_2) + (0.0001789971d0 * t_3))) / ((0.0003579942d0 * (t_2 * t_0)) + ((t_3 * 0.0008327945d0) + ((t_2 * 0.0140005442d0) + ((t_1 * 0.0694555761d0) + (1.0d0 + ((0.7715471019d0 * (x * x)) + (0.2909738639d0 * t_0))))))))
end function
public static double code(double x) {
	double t_0 = x * (x * (x * x));
	double t_1 = (x * x) * t_0;
	double t_2 = t_1 * (x * x);
	double t_3 = t_1 * t_0;
	return x * ((((0.0072644182 * t_1) + (1.0 + (((0.1049934947 * x) * x) + (0.0424060604 * t_0)))) + ((0.0005064034 * t_2) + (0.0001789971 * t_3))) / ((0.0003579942 * (t_2 * t_0)) + ((t_3 * 0.0008327945) + ((t_2 * 0.0140005442) + ((t_1 * 0.0694555761) + (1.0 + ((0.7715471019 * (x * x)) + (0.2909738639 * t_0))))))));
}
def code(x):
	t_0 = x * (x * (x * x))
	t_1 = (x * x) * t_0
	t_2 = t_1 * (x * x)
	t_3 = t_1 * t_0
	return x * ((((0.0072644182 * t_1) + (1.0 + (((0.1049934947 * x) * x) + (0.0424060604 * t_0)))) + ((0.0005064034 * t_2) + (0.0001789971 * t_3))) / ((0.0003579942 * (t_2 * t_0)) + ((t_3 * 0.0008327945) + ((t_2 * 0.0140005442) + ((t_1 * 0.0694555761) + (1.0 + ((0.7715471019 * (x * x)) + (0.2909738639 * t_0))))))))
function code(x)
	t_0 = Float64(x * Float64(x * Float64(x * x)))
	t_1 = Float64(Float64(x * x) * t_0)
	t_2 = Float64(t_1 * Float64(x * x))
	t_3 = Float64(t_1 * t_0)
	return Float64(x * Float64(Float64(Float64(Float64(0.0072644182 * t_1) + Float64(1.0 + Float64(Float64(Float64(0.1049934947 * x) * x) + Float64(0.0424060604 * t_0)))) + Float64(Float64(0.0005064034 * t_2) + Float64(0.0001789971 * t_3))) / Float64(Float64(0.0003579942 * Float64(t_2 * t_0)) + Float64(Float64(t_3 * 0.0008327945) + Float64(Float64(t_2 * 0.0140005442) + Float64(Float64(t_1 * 0.0694555761) + Float64(1.0 + Float64(Float64(0.7715471019 * Float64(x * x)) + Float64(0.2909738639 * t_0)))))))))
end
function tmp = code(x)
	t_0 = x * (x * (x * x));
	t_1 = (x * x) * t_0;
	t_2 = t_1 * (x * x);
	t_3 = t_1 * t_0;
	tmp = x * ((((0.0072644182 * t_1) + (1.0 + (((0.1049934947 * x) * x) + (0.0424060604 * t_0)))) + ((0.0005064034 * t_2) + (0.0001789971 * t_3))) / ((0.0003579942 * (t_2 * t_0)) + ((t_3 * 0.0008327945) + ((t_2 * 0.0140005442) + ((t_1 * 0.0694555761) + (1.0 + ((0.7715471019 * (x * x)) + (0.2909738639 * t_0))))))));
end
code[x_] := Block[{t$95$0 = N[(x * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * t$95$0), $MachinePrecision]}, N[(x * N[(N[(N[(N[(0.0072644182 * t$95$1), $MachinePrecision] + N[(1.0 + N[(N[(N[(0.1049934947 * x), $MachinePrecision] * x), $MachinePrecision] + N[(0.0424060604 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.0005064034 * t$95$2), $MachinePrecision] + N[(0.0001789971 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(0.0003579942 * N[(t$95$2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 * 0.0008327945), $MachinePrecision] + N[(N[(t$95$2 * 0.0140005442), $MachinePrecision] + N[(N[(t$95$1 * 0.0694555761), $MachinePrecision] + N[(1.0 + N[(N[(0.7715471019 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(0.2909738639 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
t_1 := \left(x \cdot x\right) \cdot t_0\\
t_2 := t_1 \cdot \left(x \cdot x\right)\\
t_3 := t_1 \cdot t_0\\
x \cdot \frac{\left(0.0072644182 \cdot t_1 + \left(1 + \left(\left(0.1049934947 \cdot x\right) \cdot x + 0.0424060604 \cdot t_0\right)\right)\right) + \left(0.0005064034 \cdot t_2 + 0.0001789971 \cdot t_3\right)}{0.0003579942 \cdot \left(t_2 \cdot t_0\right) + \left(t_3 \cdot 0.0008327945 + \left(t_2 \cdot 0.0140005442 + \left(t_1 \cdot 0.0694555761 + \left(1 + \left(0.7715471019 \cdot \left(x \cdot x\right) + 0.2909738639 \cdot t_0\right)\right)\right)\right)\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 52.4%

    \[x \cdot \frac{\left(0.0072644182 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) + \left(1 + \left(\left(0.1049934947 \cdot x\right) \cdot x + 0.0424060604 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)\right) + \left(0.0005064034 \cdot \left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) \cdot \left(x \cdot x\right)\right) + 0.0001789971 \cdot \left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{0.0003579942 \cdot \left(\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) + \left(\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) \cdot 0.0008327945 + \left(\left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) \cdot \left(x \cdot x\right)\right) \cdot 0.0140005442 + \left(\left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right) \cdot 0.0694555761 + \left(1 + \left(0.7715471019 \cdot \left(x \cdot x\right) + 0.2909738639 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)\right)\right)\right)} \]

Alternative 3: 53.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot {x}^{3}\\ t_1 := {\left(x \cdot x\right)}^{3}\\ t_2 := {x}^{3} \cdot \left(x \cdot t_1\right)\\ t_3 := t_1 \cdot \left(x \cdot x\right)\\ x \cdot \frac{\mathsf{fma}\left(0.0001789971, t_2, \mathsf{fma}\left(0.0005064034, t_3, \mathsf{fma}\left(0.0072644182, t_1, \mathsf{fma}\left(0.0424060604, t_0, \mathsf{fma}\left(0.1049934947, x \cdot x, 1\right)\right)\right)\right)\right)}{\mathsf{fma}\left(0.0003579942, t_1 \cdot t_1, \mathsf{fma}\left(t_2, 0.0008327945, \mathsf{fma}\left(t_3, 0.0140005442, \mathsf{fma}\left(t_1, 0.0694555761, \mathsf{fma}\left(0.2909738639, t_0, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)\right)\right)} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (* x (pow x 3.0)))
        (t_1 (pow (* x x) 3.0))
        (t_2 (* (pow x 3.0) (* x t_1)))
        (t_3 (* t_1 (* x x))))
   (*
    x
    (/
     (fma
      0.0001789971
      t_2
      (fma
       0.0005064034
       t_3
       (fma
        0.0072644182
        t_1
        (fma 0.0424060604 t_0 (fma 0.1049934947 (* x x) 1.0)))))
     (fma
      0.0003579942
      (* t_1 t_1)
      (fma
       t_2
       0.0008327945
       (fma
        t_3
        0.0140005442
        (fma
         t_1
         0.0694555761
         (fma 0.2909738639 t_0 (fma 0.7715471019 (* x x) 1.0))))))))))
double code(double x) {
	double t_0 = x * pow(x, 3.0);
	double t_1 = pow((x * x), 3.0);
	double t_2 = pow(x, 3.0) * (x * t_1);
	double t_3 = t_1 * (x * x);
	return x * (fma(0.0001789971, t_2, fma(0.0005064034, t_3, fma(0.0072644182, t_1, fma(0.0424060604, t_0, fma(0.1049934947, (x * x), 1.0))))) / fma(0.0003579942, (t_1 * t_1), fma(t_2, 0.0008327945, fma(t_3, 0.0140005442, fma(t_1, 0.0694555761, fma(0.2909738639, t_0, fma(0.7715471019, (x * x), 1.0)))))));
}
function code(x)
	t_0 = Float64(x * (x ^ 3.0))
	t_1 = Float64(x * x) ^ 3.0
	t_2 = Float64((x ^ 3.0) * Float64(x * t_1))
	t_3 = Float64(t_1 * Float64(x * x))
	return Float64(x * Float64(fma(0.0001789971, t_2, fma(0.0005064034, t_3, fma(0.0072644182, t_1, fma(0.0424060604, t_0, fma(0.1049934947, Float64(x * x), 1.0))))) / fma(0.0003579942, Float64(t_1 * t_1), fma(t_2, 0.0008327945, fma(t_3, 0.0140005442, fma(t_1, 0.0694555761, fma(0.2909738639, t_0, fma(0.7715471019, Float64(x * x), 1.0))))))))
end
code[x_] := Block[{t$95$0 = N[(x * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(x * x), $MachinePrecision], 3.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[x, 3.0], $MachinePrecision] * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(x * N[(N[(0.0001789971 * t$95$2 + N[(0.0005064034 * t$95$3 + N[(0.0072644182 * t$95$1 + N[(0.0424060604 * t$95$0 + N[(0.1049934947 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0003579942 * N[(t$95$1 * t$95$1), $MachinePrecision] + N[(t$95$2 * 0.0008327945 + N[(t$95$3 * 0.0140005442 + N[(t$95$1 * 0.0694555761 + N[(0.2909738639 * t$95$0 + N[(0.7715471019 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot {x}^{3}\\
t_1 := {\left(x \cdot x\right)}^{3}\\
t_2 := {x}^{3} \cdot \left(x \cdot t_1\right)\\
t_3 := t_1 \cdot \left(x \cdot x\right)\\
x \cdot \frac{\mathsf{fma}\left(0.0001789971, t_2, \mathsf{fma}\left(0.0005064034, t_3, \mathsf{fma}\left(0.0072644182, t_1, \mathsf{fma}\left(0.0424060604, t_0, \mathsf{fma}\left(0.1049934947, x \cdot x, 1\right)\right)\right)\right)\right)}{\mathsf{fma}\left(0.0003579942, t_1 \cdot t_1, \mathsf{fma}\left(t_2, 0.0008327945, \mathsf{fma}\left(t_3, 0.0140005442, \mathsf{fma}\left(t_1, 0.0694555761, \mathsf{fma}\left(0.2909738639, t_0, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)\right)\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 52.4%

    \[x \cdot \frac{\mathsf{fma}\left(0.0001789971, {x}^{3} \cdot \left(x \cdot {\left(x \cdot x\right)}^{3}\right), \mathsf{fma}\left(0.0005064034, {\left(x \cdot x\right)}^{3} \cdot \left(x \cdot x\right), \mathsf{fma}\left(0.0072644182, {\left(x \cdot x\right)}^{3}, \mathsf{fma}\left(0.0424060604, x \cdot {x}^{3}, \mathsf{fma}\left(0.1049934947, x \cdot x, 1\right)\right)\right)\right)\right)}{\mathsf{fma}\left(0.0003579942, {\left(x \cdot x\right)}^{3} \cdot {\left(x \cdot x\right)}^{3}, \mathsf{fma}\left({x}^{3} \cdot \left(x \cdot {\left(x \cdot x\right)}^{3}\right), 0.0008327945, \mathsf{fma}\left({\left(x \cdot x\right)}^{3} \cdot \left(x \cdot x\right), 0.0140005442, \mathsf{fma}\left({\left(x \cdot x\right)}^{3}, 0.0694555761, \mathsf{fma}\left(0.2909738639, x \cdot {x}^{3}, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)\right)\right)} \]

Alternative 4: 53.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x \cdot x\right)}^{4}\\ x \cdot \frac{\mathsf{fma}\left(0.1049934947, x \cdot x, \mathsf{fma}\left(0.0424060604, {x}^{4}, 1\right)\right) + \mathsf{fma}\left(0.0072644182, {x}^{6}, t_0 \cdot \left(0.0005064034 + 0.0001789971 \cdot \left(x \cdot x\right)\right)\right)}{t_0 \cdot \left(0.0008327945 \cdot \left(x \cdot x\right) + 0.0140005442\right) + \mathsf{fma}\left(0.0003579942, {\left(x \cdot x\right)}^{6}, \mathsf{fma}\left(0.2909738639, {x}^{4}, \mathsf{fma}\left({x}^{6}, 0.0694555761, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (pow (* x x) 4.0)))
   (*
    x
    (/
     (+
      (fma 0.1049934947 (* x x) (fma 0.0424060604 (pow x 4.0) 1.0))
      (fma
       0.0072644182
       (pow x 6.0)
       (* t_0 (+ 0.0005064034 (* 0.0001789971 (* x x))))))
     (+
      (* t_0 (+ (* 0.0008327945 (* x x)) 0.0140005442))
      (fma
       0.0003579942
       (pow (* x x) 6.0)
       (fma
        0.2909738639
        (pow x 4.0)
        (fma (pow x 6.0) 0.0694555761 (fma 0.7715471019 (* x x) 1.0)))))))))
double code(double x) {
	double t_0 = pow((x * x), 4.0);
	return x * ((fma(0.1049934947, (x * x), fma(0.0424060604, pow(x, 4.0), 1.0)) + fma(0.0072644182, pow(x, 6.0), (t_0 * (0.0005064034 + (0.0001789971 * (x * x)))))) / ((t_0 * ((0.0008327945 * (x * x)) + 0.0140005442)) + fma(0.0003579942, pow((x * x), 6.0), fma(0.2909738639, pow(x, 4.0), fma(pow(x, 6.0), 0.0694555761, fma(0.7715471019, (x * x), 1.0))))));
}
function code(x)
	t_0 = Float64(x * x) ^ 4.0
	return Float64(x * Float64(Float64(fma(0.1049934947, Float64(x * x), fma(0.0424060604, (x ^ 4.0), 1.0)) + fma(0.0072644182, (x ^ 6.0), Float64(t_0 * Float64(0.0005064034 + Float64(0.0001789971 * Float64(x * x)))))) / Float64(Float64(t_0 * Float64(Float64(0.0008327945 * Float64(x * x)) + 0.0140005442)) + fma(0.0003579942, (Float64(x * x) ^ 6.0), fma(0.2909738639, (x ^ 4.0), fma((x ^ 6.0), 0.0694555761, fma(0.7715471019, Float64(x * x), 1.0)))))))
end
code[x_] := Block[{t$95$0 = N[Power[N[(x * x), $MachinePrecision], 4.0], $MachinePrecision]}, N[(x * N[(N[(N[(0.1049934947 * N[(x * x), $MachinePrecision] + N[(0.0424060604 * N[Power[x, 4.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(0.0072644182 * N[Power[x, 6.0], $MachinePrecision] + N[(t$95$0 * N[(0.0005064034 + N[(0.0001789971 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$0 * N[(N[(0.0008327945 * N[(x * x), $MachinePrecision]), $MachinePrecision] + 0.0140005442), $MachinePrecision]), $MachinePrecision] + N[(0.0003579942 * N[Power[N[(x * x), $MachinePrecision], 6.0], $MachinePrecision] + N[(0.2909738639 * N[Power[x, 4.0], $MachinePrecision] + N[(N[Power[x, 6.0], $MachinePrecision] * 0.0694555761 + N[(0.7715471019 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(x \cdot x\right)}^{4}\\
x \cdot \frac{\mathsf{fma}\left(0.1049934947, x \cdot x, \mathsf{fma}\left(0.0424060604, {x}^{4}, 1\right)\right) + \mathsf{fma}\left(0.0072644182, {x}^{6}, t_0 \cdot \left(0.0005064034 + 0.0001789971 \cdot \left(x \cdot x\right)\right)\right)}{t_0 \cdot \left(0.0008327945 \cdot \left(x \cdot x\right) + 0.0140005442\right) + \mathsf{fma}\left(0.0003579942, {\left(x \cdot x\right)}^{6}, \mathsf{fma}\left(0.2909738639, {x}^{4}, \mathsf{fma}\left({x}^{6}, 0.0694555761, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 52.4%

    \[x \cdot \frac{\mathsf{fma}\left(0.1049934947, x \cdot x, \mathsf{fma}\left(0.0424060604, {x}^{4}, 1\right)\right) + \mathsf{fma}\left(0.0072644182, {x}^{6}, {\left(x \cdot x\right)}^{4} \cdot \left(0.0005064034 + 0.0001789971 \cdot \left(x \cdot x\right)\right)\right)}{{\left(x \cdot x\right)}^{4} \cdot \left(0.0008327945 \cdot \left(x \cdot x\right) + 0.0140005442\right) + \mathsf{fma}\left(0.0003579942, {\left(x \cdot x\right)}^{6}, \mathsf{fma}\left(0.2909738639, {x}^{4}, \mathsf{fma}\left({x}^{6}, 0.0694555761, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)} \]

Alternative 5: 53.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x \cdot x\right)}^{5}\\ x \cdot \frac{\mathsf{fma}\left(0.0005064034, {x}^{8}, \mathsf{fma}\left(0.0001789971, t_0, \mathsf{fma}\left(0.0424060604, {x}^{4}, \mathsf{fma}\left(0.0072644182, {x}^{6}, \mathsf{fma}\left(0.1049934947, x \cdot x, 1\right)\right)\right)\right)\right)}{\mathsf{fma}\left(t_0, 0.0008327945, \mathsf{fma}\left(0.0003579942, {x}^{12}, \mathsf{fma}\left({x}^{6}, 0.0694555761, \mathsf{fma}\left({x}^{8}, 0.0140005442, \mathsf{fma}\left(0.2909738639, {x}^{4}, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)\right)\right)} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (pow (* x x) 5.0)))
   (*
    x
    (/
     (fma
      0.0005064034
      (pow x 8.0)
      (fma
       0.0001789971
       t_0
       (fma
        0.0424060604
        (pow x 4.0)
        (fma 0.0072644182 (pow x 6.0) (fma 0.1049934947 (* x x) 1.0)))))
     (fma
      t_0
      0.0008327945
      (fma
       0.0003579942
       (pow x 12.0)
       (fma
        (pow x 6.0)
        0.0694555761
        (fma
         (pow x 8.0)
         0.0140005442
         (fma 0.2909738639 (pow x 4.0) (fma 0.7715471019 (* x x) 1.0))))))))))
double code(double x) {
	double t_0 = pow((x * x), 5.0);
	return x * (fma(0.0005064034, pow(x, 8.0), fma(0.0001789971, t_0, fma(0.0424060604, pow(x, 4.0), fma(0.0072644182, pow(x, 6.0), fma(0.1049934947, (x * x), 1.0))))) / fma(t_0, 0.0008327945, fma(0.0003579942, pow(x, 12.0), fma(pow(x, 6.0), 0.0694555761, fma(pow(x, 8.0), 0.0140005442, fma(0.2909738639, pow(x, 4.0), fma(0.7715471019, (x * x), 1.0)))))));
}
function code(x)
	t_0 = Float64(x * x) ^ 5.0
	return Float64(x * Float64(fma(0.0005064034, (x ^ 8.0), fma(0.0001789971, t_0, fma(0.0424060604, (x ^ 4.0), fma(0.0072644182, (x ^ 6.0), fma(0.1049934947, Float64(x * x), 1.0))))) / fma(t_0, 0.0008327945, fma(0.0003579942, (x ^ 12.0), fma((x ^ 6.0), 0.0694555761, fma((x ^ 8.0), 0.0140005442, fma(0.2909738639, (x ^ 4.0), fma(0.7715471019, Float64(x * x), 1.0))))))))
end
code[x_] := Block[{t$95$0 = N[Power[N[(x * x), $MachinePrecision], 5.0], $MachinePrecision]}, N[(x * N[(N[(0.0005064034 * N[Power[x, 8.0], $MachinePrecision] + N[(0.0001789971 * t$95$0 + N[(0.0424060604 * N[Power[x, 4.0], $MachinePrecision] + N[(0.0072644182 * N[Power[x, 6.0], $MachinePrecision] + N[(0.1049934947 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 * 0.0008327945 + N[(0.0003579942 * N[Power[x, 12.0], $MachinePrecision] + N[(N[Power[x, 6.0], $MachinePrecision] * 0.0694555761 + N[(N[Power[x, 8.0], $MachinePrecision] * 0.0140005442 + N[(0.2909738639 * N[Power[x, 4.0], $MachinePrecision] + N[(0.7715471019 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(x \cdot x\right)}^{5}\\
x \cdot \frac{\mathsf{fma}\left(0.0005064034, {x}^{8}, \mathsf{fma}\left(0.0001789971, t_0, \mathsf{fma}\left(0.0424060604, {x}^{4}, \mathsf{fma}\left(0.0072644182, {x}^{6}, \mathsf{fma}\left(0.1049934947, x \cdot x, 1\right)\right)\right)\right)\right)}{\mathsf{fma}\left(t_0, 0.0008327945, \mathsf{fma}\left(0.0003579942, {x}^{12}, \mathsf{fma}\left({x}^{6}, 0.0694555761, \mathsf{fma}\left({x}^{8}, 0.0140005442, \mathsf{fma}\left(0.2909738639, {x}^{4}, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)\right)\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 52.4%

    \[x \cdot \frac{\mathsf{fma}\left(0.0005064034, {x}^{8}, \mathsf{fma}\left(0.0001789971, {\left(x \cdot x\right)}^{5}, \mathsf{fma}\left(0.0424060604, {x}^{4}, \mathsf{fma}\left(0.0072644182, {x}^{6}, \mathsf{fma}\left(0.1049934947, x \cdot x, 1\right)\right)\right)\right)\right)}{\mathsf{fma}\left({\left(x \cdot x\right)}^{5}, 0.0008327945, \mathsf{fma}\left(0.0003579942, {x}^{12}, \mathsf{fma}\left({x}^{6}, 0.0694555761, \mathsf{fma}\left({x}^{8}, 0.0140005442, \mathsf{fma}\left(0.2909738639, {x}^{4}, \mathsf{fma}\left(0.7715471019, x \cdot x, 1\right)\right)\right)\right)\right)\right)} \]

Reproduce

?
herbie shell --seed 2023276 
(FPCore (x)
  :name "Jmat.Real.dawson"
  :precision binary64
  (* (/ (+ (+ (+ (+ (+ 1.0 (* 0.1049934947 (* x x))) (* 0.0424060604 (* (* x x) (* x x)))) (* 0.0072644182 (* (* (* x x) (* x x)) (* x x)))) (* 0.0005064034 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0001789971 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (+ (+ (+ (+ (+ (+ 1.0 (* 0.7715471019 (* x x))) (* 0.2909738639 (* (* x x) (* x x)))) (* 0.0694555761 (* (* (* x x) (* x x)) (* x x)))) (* 0.0140005442 (* (* (* (* x x) (* x x)) (* x x)) (* x x)))) (* 0.0008327945 (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)))) (* (* 2.0 0.0001789971) (* (* (* (* (* (* x x) (* x x)) (* x x)) (* x x)) (* x x)) (* x x))))) x))