\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 -15821.591683061039 \lor \neg \left(x \leq 5404.763142861626\right):\\
\;\;\;\;\frac{0.5}{x} + \frac{\frac{0.2514179000665374}{x \cdot x}}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\left(\left(\left(\left(1 + \left(x \cdot x\right) \cdot 0.1049934947\right) + 0.0424060604 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right) + 0.0072644182 \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\right) + 0.0005064034 \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\right)\right) + 0.0001789971 \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{0.0003579942 \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\right)\right)\right) + \left(\left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\right)\right) \cdot 0.0008327945 + \left(\left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right)\right) \cdot 0.0140005442 + \left(\left(\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\right) \cdot 0.0694555761 + \left(\left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot 0.2909738639 + \left(1 + x \cdot \left(x \cdot 0.7715471019\right)\right)\right)\right)\right)\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 -15821.591683061039) (not (<= x 5404.763142861626)))
(+ (/ 0.5 x) (/ (/ 0.2514179000665374 (* x x)) x))
(*
x
(/
(+
(+
(+
(+
(+ 1.0 (* (* x x) 0.1049934947))
(* 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)))))))
(+
(*
0.0003579942
(* (* x x) (* (* x x) (* (* x x) (* (* x x) (* (* x x) (* x x)))))))
(+
(* (* (* x x) (* (* x x) (* (* x x) (* (* x x) (* x x))))) 0.0008327945)
(+
(* (* (* x x) (* (* x x) (* (* x x) (* x x)))) 0.0140005442)
(+
(* (* (* x x) (* (* x x) (* x x))) 0.0694555761)
(+
(* (* (* x x) (* x x)) 0.2909738639)
(+ 1.0 (* x (* x 0.7715471019))))))))))))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 <= -15821.591683061039) || !(x <= 5404.763142861626)) {
tmp = (0.5 / x) + ((0.2514179000665374 / (x * x)) / x);
} else {
tmp = x * ((((((1.0 + ((x * x) * 0.1049934947)) + (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))))))) / ((0.0003579942 * ((x * x) * ((x * x) * ((x * x) * ((x * x) * ((x * x) * (x * x))))))) + ((((x * x) * ((x * x) * ((x * x) * ((x * x) * (x * x))))) * 0.0008327945) + ((((x * x) * ((x * x) * ((x * x) * (x * x)))) * 0.0140005442) + ((((x * x) * ((x * x) * (x * x))) * 0.0694555761) + ((((x * x) * (x * x)) * 0.2909738639) + (1.0 + (x * (x * 0.7715471019)))))))));
}
return tmp;
}








Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 0.5 |
| Cost | 1032 |
| Alternative 2 | |
|---|---|
| Error | 0.6 |
| Cost | 520 |
| Alternative 3 | |
|---|---|
| Error | 31.8 |
| Cost | 64 |
| Alternative 4 | |
|---|---|
| Error | 60.6 |
| Cost | 64 |
| Alternative 5 | |
|---|---|
| Error | 61.5 |
| Cost | 64 |

if x < -15821.5916830610386 or 5404.763142861626 < x Initial program 59.5
Taylor expanded around inf 0.0
Simplified0.0
rmApplied unpow3_binary64_38950.0
Applied associate-/r*_binary64_37730.0
Simplified0.0
if -15821.5916830610386 < x < 5404.763142861626Initial program 0.0
rmApplied associate-*r*_binary64_37690.0
Simplified0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021044
(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))