Average Error: 29.1 → 0.0
Time: 5.0s
Precision: binary64
\[\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\]
\[\begin{array}{l} \mathbf{if}\;x \leq -1.306931706838439 \cdot 10^{+19} \lor \neg \left(x \leq 19622578.850445196\right):\\ \;\;\;\;0.5 \cdot \frac{1}{x} + 0.2514179000665374 \cdot \frac{1}{{x}^{3}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{{x}^{10} \cdot -0.0001789971 + \left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.1049934947 + {x}^{4} \cdot 0.0424060604\right) + \left({x}^{6} \cdot 0.0072644182 + 0.0005064034 \cdot {x}^{8}\right)\right)\right)}{\left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.7715471019 + {x}^{4} \cdot 0.2909738639\right) + \left({x}^{6} \cdot 0.0694555761 + {x}^{8} \cdot 0.0140005442\right)\right)\right) + \left({x}^{10} \cdot -0.0008327945 - 0.0003579942 \cdot {x}^{12}\right)}\\ \end{array}\]
\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
\begin{array}{l}
\mathbf{if}\;x \leq -1.306931706838439 \cdot 10^{+19} \lor \neg \left(x \leq 19622578.850445196\right):\\
\;\;\;\;0.5 \cdot \frac{1}{x} + 0.2514179000665374 \cdot \frac{1}{{x}^{3}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{{x}^{10} \cdot -0.0001789971 + \left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.1049934947 + {x}^{4} \cdot 0.0424060604\right) + \left({x}^{6} \cdot 0.0072644182 + 0.0005064034 \cdot {x}^{8}\right)\right)\right)}{\left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.7715471019 + {x}^{4} \cdot 0.2909738639\right) + \left({x}^{6} \cdot 0.0694555761 + {x}^{8} \cdot 0.0140005442\right)\right)\right) + \left({x}^{10} \cdot -0.0008327945 - 0.0003579942 \cdot {x}^{12}\right)}\\

\end{array}
(FPCore (x)
 :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))
(FPCore (x)
 :precision binary64
 (if (or (<= x -1.306931706838439e+19) (not (<= x 19622578.850445196)))
   (+ (* 0.5 (/ 1.0 x)) (* 0.2514179000665374 (/ 1.0 (pow x 3.0))))
   (*
    x
    (/
     (+
      (* (pow x 10.0) -0.0001789971)
      (-
       -1.0
       (+
        (+ (* (* x x) 0.1049934947) (* (pow x 4.0) 0.0424060604))
        (+ (* (pow x 6.0) 0.0072644182) (* 0.0005064034 (pow x 8.0))))))
     (+
      (-
       -1.0
       (+
        (+ (* (* x x) 0.7715471019) (* (pow x 4.0) 0.2909738639))
        (+ (* (pow x 6.0) 0.0694555761) (* (pow x 8.0) 0.0140005442))))
      (- (* (pow x 10.0) -0.0008327945) (* 0.0003579942 (pow x 12.0))))))))
double code(double x) {
	return ((((((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;
}
double code(double x) {
	double tmp;
	if ((x <= -1.306931706838439e+19) || !(x <= 19622578.850445196)) {
		tmp = (0.5 * (1.0 / x)) + (0.2514179000665374 * (1.0 / pow(x, 3.0)));
	} else {
		tmp = x * (((pow(x, 10.0) * -0.0001789971) + (-1.0 - ((((x * x) * 0.1049934947) + (pow(x, 4.0) * 0.0424060604)) + ((pow(x, 6.0) * 0.0072644182) + (0.0005064034 * pow(x, 8.0)))))) / ((-1.0 - ((((x * x) * 0.7715471019) + (pow(x, 4.0) * 0.2909738639)) + ((pow(x, 6.0) * 0.0694555761) + (pow(x, 8.0) * 0.0140005442)))) + ((pow(x, 10.0) * -0.0008327945) - (0.0003579942 * pow(x, 12.0)))));
	}
	return tmp;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < -13069317068384389100 or 19622578.850445196 < x

    1. Initial program 61.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\]
    2. Simplified61.4

      \[\leadsto \color{blue}{x \cdot \frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot {x}^{4}\right) + 0.0072644182 \cdot {x}^{6}\right) + 0.0005064034 \cdot {x}^{8}\right) + 0.0001789971 \cdot {x}^{10}}{\left(\left(\left(\left(\left(1 + \left(x \cdot x\right) \cdot 0.7715471019\right) + {x}^{4} \cdot 0.2909738639\right) + {x}^{6} \cdot 0.0694555761\right) + {x}^{8} \cdot 0.0140005442\right) + {x}^{10} \cdot 0.0008327945\right) + 0.0003579942 \cdot {x}^{12}}}\]
    3. Taylor expanded around inf 0.0

      \[\leadsto \color{blue}{0.5 \cdot \frac{1}{x} + 0.2514179000665374 \cdot \frac{1}{{x}^{3}}}\]

    if -13069317068384389100 < x < 19622578.850445196

    1. Initial program 0.0

      \[\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\]
    2. Simplified0.0

      \[\leadsto \color{blue}{x \cdot \frac{\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot {x}^{4}\right) + 0.0072644182 \cdot {x}^{6}\right) + 0.0005064034 \cdot {x}^{8}\right) + 0.0001789971 \cdot {x}^{10}}{\left(\left(\left(\left(\left(1 + \left(x \cdot x\right) \cdot 0.7715471019\right) + {x}^{4} \cdot 0.2909738639\right) + {x}^{6} \cdot 0.0694555761\right) + {x}^{8} \cdot 0.0140005442\right) + {x}^{10} \cdot 0.0008327945\right) + 0.0003579942 \cdot {x}^{12}}}\]
    3. Using strategy rm
    4. Applied frac-2neg_binary640.0

      \[\leadsto x \cdot \color{blue}{\frac{-\left(\left(\left(\left(\left(1 + 0.1049934947 \cdot \left(x \cdot x\right)\right) + 0.0424060604 \cdot {x}^{4}\right) + 0.0072644182 \cdot {x}^{6}\right) + 0.0005064034 \cdot {x}^{8}\right) + 0.0001789971 \cdot {x}^{10}\right)}{-\left(\left(\left(\left(\left(\left(1 + \left(x \cdot x\right) \cdot 0.7715471019\right) + {x}^{4} \cdot 0.2909738639\right) + {x}^{6} \cdot 0.0694555761\right) + {x}^{8} \cdot 0.0140005442\right) + {x}^{10} \cdot 0.0008327945\right) + 0.0003579942 \cdot {x}^{12}\right)}}\]
    5. Simplified0.0

      \[\leadsto x \cdot \frac{\color{blue}{{x}^{10} \cdot -0.0001789971 + \left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.1049934947 + {x}^{4} \cdot 0.0424060604\right) + \left({x}^{6} \cdot 0.0072644182 + 0.0005064034 \cdot {x}^{8}\right)\right)\right)}}{-\left(\left(\left(\left(\left(\left(1 + \left(x \cdot x\right) \cdot 0.7715471019\right) + {x}^{4} \cdot 0.2909738639\right) + {x}^{6} \cdot 0.0694555761\right) + {x}^{8} \cdot 0.0140005442\right) + {x}^{10} \cdot 0.0008327945\right) + 0.0003579942 \cdot {x}^{12}\right)}\]
    6. Simplified0.0

      \[\leadsto x \cdot \frac{{x}^{10} \cdot -0.0001789971 + \left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.1049934947 + {x}^{4} \cdot 0.0424060604\right) + \left({x}^{6} \cdot 0.0072644182 + 0.0005064034 \cdot {x}^{8}\right)\right)\right)}{\color{blue}{\left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.7715471019 + {x}^{4} \cdot 0.2909738639\right) + \left({x}^{6} \cdot 0.0694555761 + {x}^{8} \cdot 0.0140005442\right)\right)\right) + \left({x}^{10} \cdot -0.0008327945 - 0.0003579942 \cdot {x}^{12}\right)}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.306931706838439 \cdot 10^{+19} \lor \neg \left(x \leq 19622578.850445196\right):\\ \;\;\;\;0.5 \cdot \frac{1}{x} + 0.2514179000665374 \cdot \frac{1}{{x}^{3}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{{x}^{10} \cdot -0.0001789971 + \left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.1049934947 + {x}^{4} \cdot 0.0424060604\right) + \left({x}^{6} \cdot 0.0072644182 + 0.0005064034 \cdot {x}^{8}\right)\right)\right)}{\left(-1 - \left(\left(\left(x \cdot x\right) \cdot 0.7715471019 + {x}^{4} \cdot 0.2909738639\right) + \left({x}^{6} \cdot 0.0694555761 + {x}^{8} \cdot 0.0140005442\right)\right)\right) + \left({x}^{10} \cdot -0.0008327945 - 0.0003579942 \cdot {x}^{12}\right)}\\ \end{array}\]

Reproduce

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