\[1 - \left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(0.254829592 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-0.284496736 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1.421413741 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-1.453152027 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}
\]
↓
\[\begin{array}{l}
t_0 := 1 + \left|x\right| \cdot 0.3275911\\
\mathbf{if}\;\left|x\right| \leq 4 \cdot 10^{-5}:\\
\;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-0.254829592 + \frac{0.284496736 + \frac{1.453152027 \cdot \frac{1}{t_0} + \left(-1.421413741 + 1.061405429 \cdot \frac{-1}{{t_0}^{2}}\right)}{t_0}}{t_0}}{e^{x \cdot x}}}{t_0}\\
\end{array}
\]
(FPCore (x)
:precision binary64
(-
1.0
(*
(*
(/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
(+
0.254829592
(*
(/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
(+
-0.284496736
(*
(/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
(+
1.421413741
(*
(/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
(+
-1.453152027
(* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) 1.061405429)))))))))
(exp (- (* (fabs x) (fabs x)))))))↓
(FPCore (x)
:precision binary64
(let* ((t_0 (+ 1.0 (* (fabs x) 0.3275911))))
(if (<= (fabs x) 4e-5)
(+
1e-9
(+
(* -0.00011824294398844343 (pow x 2.0))
(+
(* -0.37545125292247583 (pow x 3.0))
(sqrt (* x (* x 1.2732557730789702))))))
(+
1.0
(/
(/
(+
-0.254829592
(/
(+
0.284496736
(/
(+
(* 1.453152027 (/ 1.0 t_0))
(+ -1.421413741 (* 1.061405429 (/ -1.0 (pow t_0 2.0)))))
t_0))
t_0))
(exp (* x x)))
t_0)))))double code(double x) {
return 1.0 - (((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * 1.061405429))))))))) * exp(-(fabs(x) * fabs(x))));
}
↓
double code(double x) {
double t_0 = 1.0 + (fabs(x) * 0.3275911);
double tmp;
if (fabs(x) <= 4e-5) {
tmp = 1e-9 + ((-0.00011824294398844343 * pow(x, 2.0)) + ((-0.37545125292247583 * pow(x, 3.0)) + sqrt((x * (x * 1.2732557730789702)))));
} else {
tmp = 1.0 + (((-0.254829592 + ((0.284496736 + (((1.453152027 * (1.0 / t_0)) + (-1.421413741 + (1.061405429 * (-1.0 / pow(t_0, 2.0))))) / t_0)) / t_0)) / exp((x * x))) / t_0);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
code = 1.0d0 - (((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * (0.254829592d0 + ((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * ((-0.284496736d0) + ((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * (1.421413741d0 + ((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * ((-1.453152027d0) + ((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * 1.061405429d0))))))))) * exp(-(abs(x) * abs(x))))
end function
↓
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + (abs(x) * 0.3275911d0)
if (abs(x) <= 4d-5) then
tmp = 1d-9 + (((-0.00011824294398844343d0) * (x ** 2.0d0)) + (((-0.37545125292247583d0) * (x ** 3.0d0)) + sqrt((x * (x * 1.2732557730789702d0)))))
else
tmp = 1.0d0 + ((((-0.254829592d0) + ((0.284496736d0 + (((1.453152027d0 * (1.0d0 / t_0)) + ((-1.421413741d0) + (1.061405429d0 * ((-1.0d0) / (t_0 ** 2.0d0))))) / t_0)) / t_0)) / exp((x * x))) / t_0)
end if
code = tmp
end function
public static double code(double x) {
return 1.0 - (((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * 1.061405429))))))))) * Math.exp(-(Math.abs(x) * Math.abs(x))));
}
↓
public static double code(double x) {
double t_0 = 1.0 + (Math.abs(x) * 0.3275911);
double tmp;
if (Math.abs(x) <= 4e-5) {
tmp = 1e-9 + ((-0.00011824294398844343 * Math.pow(x, 2.0)) + ((-0.37545125292247583 * Math.pow(x, 3.0)) + Math.sqrt((x * (x * 1.2732557730789702)))));
} else {
tmp = 1.0 + (((-0.254829592 + ((0.284496736 + (((1.453152027 * (1.0 / t_0)) + (-1.421413741 + (1.061405429 * (-1.0 / Math.pow(t_0, 2.0))))) / t_0)) / t_0)) / Math.exp((x * x))) / t_0);
}
return tmp;
}
def code(x):
return 1.0 - (((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * 1.061405429))))))))) * math.exp(-(math.fabs(x) * math.fabs(x))))
↓
def code(x):
t_0 = 1.0 + (math.fabs(x) * 0.3275911)
tmp = 0
if math.fabs(x) <= 4e-5:
tmp = 1e-9 + ((-0.00011824294398844343 * math.pow(x, 2.0)) + ((-0.37545125292247583 * math.pow(x, 3.0)) + math.sqrt((x * (x * 1.2732557730789702)))))
else:
tmp = 1.0 + (((-0.254829592 + ((0.284496736 + (((1.453152027 * (1.0 / t_0)) + (-1.421413741 + (1.061405429 * (-1.0 / math.pow(t_0, 2.0))))) / t_0)) / t_0)) / math.exp((x * x))) / t_0)
return tmp
function code(x)
return Float64(1.0 - Float64(Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(0.254829592 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(-0.284496736 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(1.421413741 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(-1.453152027 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * 1.061405429))))))))) * exp(Float64(-Float64(abs(x) * abs(x))))))
end
↓
function code(x)
t_0 = Float64(1.0 + Float64(abs(x) * 0.3275911))
tmp = 0.0
if (abs(x) <= 4e-5)
tmp = Float64(1e-9 + Float64(Float64(-0.00011824294398844343 * (x ^ 2.0)) + Float64(Float64(-0.37545125292247583 * (x ^ 3.0)) + sqrt(Float64(x * Float64(x * 1.2732557730789702))))));
else
tmp = Float64(1.0 + Float64(Float64(Float64(-0.254829592 + Float64(Float64(0.284496736 + Float64(Float64(Float64(1.453152027 * Float64(1.0 / t_0)) + Float64(-1.421413741 + Float64(1.061405429 * Float64(-1.0 / (t_0 ^ 2.0))))) / t_0)) / t_0)) / exp(Float64(x * x))) / t_0));
end
return tmp
end
function tmp = code(x)
tmp = 1.0 - (((1.0 / (1.0 + (0.3275911 * abs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * abs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * abs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * abs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * abs(x)))) * 1.061405429))))))))) * exp(-(abs(x) * abs(x))));
end
↓
function tmp_2 = code(x)
t_0 = 1.0 + (abs(x) * 0.3275911);
tmp = 0.0;
if (abs(x) <= 4e-5)
tmp = 1e-9 + ((-0.00011824294398844343 * (x ^ 2.0)) + ((-0.37545125292247583 * (x ^ 3.0)) + sqrt((x * (x * 1.2732557730789702)))));
else
tmp = 1.0 + (((-0.254829592 + ((0.284496736 + (((1.453152027 * (1.0 / t_0)) + (-1.421413741 + (1.061405429 * (-1.0 / (t_0 ^ 2.0))))) / t_0)) / t_0)) / exp((x * x))) / t_0);
end
tmp_2 = tmp;
end
code[x_] := N[(1.0 - N[(N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.254829592 + N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.284496736 + N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.421413741 + N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.453152027 + N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.061405429), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Exp[(-N[(N[Abs[x], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_] := Block[{t$95$0 = N[(1.0 + N[(N[Abs[x], $MachinePrecision] * 0.3275911), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[x], $MachinePrecision], 4e-5], N[(1e-9 + N[(N[(-0.00011824294398844343 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.37545125292247583 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(x * N[(x * 1.2732557730789702), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(-0.254829592 + N[(N[(0.284496736 + N[(N[(N[(1.453152027 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(-1.421413741 + N[(1.061405429 * N[(-1.0 / N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / N[Exp[N[(x * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]
1 - \left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(0.254829592 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-0.284496736 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1.421413741 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-1.453152027 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}
↓
\begin{array}{l}
t_0 := 1 + \left|x\right| \cdot 0.3275911\\
\mathbf{if}\;\left|x\right| \leq 4 \cdot 10^{-5}:\\
\;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-0.254829592 + \frac{0.284496736 + \frac{1.453152027 \cdot \frac{1}{t_0} + \left(-1.421413741 + 1.061405429 \cdot \frac{-1}{{t_0}^{2}}\right)}{t_0}}{t_0}}{e^{x \cdot x}}}{t_0}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.2 |
|---|
| Cost | 47748 |
|---|
\[\begin{array}{l}
t_0 := 1 + \left|x\right| \cdot 0.3275911\\
\mathbf{if}\;x \leq -6.4 \cdot 10^{-6}:\\
\;\;\;\;1 + \frac{-0.254829592 + \frac{0.284496736 + \frac{-1.421413741 - \frac{-1.453152027 + \frac{1.061405429}{t_0}}{t_0}}{t_0}}{t_0}}{t_0 \cdot {\left(e^{x}\right)}^{x}}\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.2 |
|---|
| Cost | 41412 |
|---|
\[\begin{array}{l}
t_0 := 1 + \left|x\right| \cdot 0.3275911\\
\mathbf{if}\;x \leq -7.6 \cdot 10^{-6}:\\
\;\;\;\;1 + \frac{\frac{-0.254829592 + \frac{0.284496736 + \frac{-1.421413741 - \frac{-1.453152027 + \frac{1.061405429}{t_0}}{t_0}}{t_0}}{t_0}}{e^{x \cdot x}}}{t_0}\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.3 |
|---|
| Cost | 35076 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{1 + \left|x\right| \cdot 0.3275911}\\
\mathbf{if}\;x \leq -0.52:\\
\;\;\;\;1 - t_0 \cdot \left(\left(0.254829592 + t_0 \cdot \left(-0.284496736 + t_0 \cdot \left(1.421413741 + t_0 \cdot -0.391746598\right)\right)\right) \cdot e^{-x \cdot x}\right)\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 0.3 |
|---|
| Cost | 20552 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.75:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.3 |
|---|
| Cost | 20232 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.1:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;10^{-9} + \left|\mathsf{fma}\left(-0.37545125292247583, {x}^{3}, x \cdot \left(1.128386358070218 + x \cdot -0.00011824294398844343\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 0.4 |
|---|
| Cost | 19848 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.9:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 0.88:\\
\;\;\;\;10^{-9} + \sqrt{{\left(\sqrt[3]{x \cdot 1.128386358070218}\right)}^{6}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 0.4 |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.9:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 0.88:\\
\;\;\;\;10^{-9} + \sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 0.9 |
|---|
| Cost | 1224 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.9 \cdot 10^{-10}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.05:\\
\;\;\;\;10^{-9} + \left(x \cdot 1.128386358070218 + \left(x \cdot x\right) \cdot \left(-0.00011824294398844343 + x \cdot -0.37545125292247583\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 1.0 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.9 \cdot 10^{-10}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 0.88:\\
\;\;\;\;10^{-9} + x \cdot \left(1.128386358070218 + x \cdot -0.00011824294398844343\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 1.0 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.9 \cdot 10^{-10}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 0.88:\\
\;\;\;\;10^{-9} + x \cdot 1.128386358070218\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 1.0 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.9:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-10}:\\
\;\;\;\;10^{-9} + x \cdot -1.128386358070218\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 1.5 |
|---|
| Cost | 328 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.85 \cdot 10^{-5}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-5}:\\
\;\;\;\;10^{-9}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 29.7 |
|---|
| Cost | 64 |
|---|
\[10^{-9}
\]