?

Average Accuracy: 78.8% → 99.9%
Time: 22.6s
Precision: binary64
Cost: 213444

?

\[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\\ t_1 := e^{x \cdot x}\\ t_2 := \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{t_0}}{t_0}}{t_0}}{t_0}}{t_1}}{t_0}\\ t_3 := \mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\\ t_4 := {t_3}^{3}\\ \mathbf{if}\;\left|x\right| \leq 5 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\log \left(e^{1 - \frac{\frac{{\left(\left(\left(0.254829592 + \left(\frac{1.061405429}{{t_3}^{4}} + \frac{1.421413741}{{t_3}^{2}}\right)\right) - \frac{1.453152027}{t_4}\right) + \frac{-0.284496736}{t_3}\right)}^{3}}{t_4}}{{t_1}^{3}}}\right)}{1 + t_2 \cdot \left(1 + t_2\right)}\\ \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)))
        (t_1 (exp (* x x)))
        (t_2
         (/
          (/
           (+
            0.254829592
            (/
             (+
              -0.284496736
              (/
               (+ 1.421413741 (/ (+ -1.453152027 (/ 1.061405429 t_0)) t_0))
               t_0))
             t_0))
           t_1)
          t_0))
        (t_3 (fma 0.3275911 (fabs x) 1.0))
        (t_4 (pow t_3 3.0)))
   (if (<= (fabs x) 5e-6)
     (+
      1e-9
      (+
       (* -0.00011824294398844343 (pow x 2.0))
       (+
        (* -0.37545125292247583 (pow x 3.0))
        (sqrt (* 1.2732557730789702 (* x x))))))
     (/
      (log
       (exp
        (-
         1.0
         (/
          (/
           (pow
            (+
             (-
              (+
               0.254829592
               (+ (/ 1.061405429 (pow t_3 4.0)) (/ 1.421413741 (pow t_3 2.0))))
              (/ 1.453152027 t_4))
             (/ -0.284496736 t_3))
            3.0)
           t_4)
          (pow t_1 3.0)))))
      (+ 1.0 (* t_2 (+ 1.0 t_2)))))))
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 t_1 = exp((x * x));
	double t_2 = ((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / t_0)) / t_0)) / t_0)) / t_0)) / t_1) / t_0;
	double t_3 = fma(0.3275911, fabs(x), 1.0);
	double t_4 = pow(t_3, 3.0);
	double tmp;
	if (fabs(x) <= 5e-6) {
		tmp = 1e-9 + ((-0.00011824294398844343 * pow(x, 2.0)) + ((-0.37545125292247583 * pow(x, 3.0)) + sqrt((1.2732557730789702 * (x * x)))));
	} else {
		tmp = log(exp((1.0 - ((pow((((0.254829592 + ((1.061405429 / pow(t_3, 4.0)) + (1.421413741 / pow(t_3, 2.0)))) - (1.453152027 / t_4)) + (-0.284496736 / t_3)), 3.0) / t_4) / pow(t_1, 3.0))))) / (1.0 + (t_2 * (1.0 + t_2)));
	}
	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))
	t_1 = exp(Float64(x * x))
	t_2 = Float64(Float64(Float64(0.254829592 + Float64(Float64(-0.284496736 + Float64(Float64(1.421413741 + Float64(Float64(-1.453152027 + Float64(1.061405429 / t_0)) / t_0)) / t_0)) / t_0)) / t_1) / t_0)
	t_3 = fma(0.3275911, abs(x), 1.0)
	t_4 = t_3 ^ 3.0
	tmp = 0.0
	if (abs(x) <= 5e-6)
		tmp = Float64(1e-9 + Float64(Float64(-0.00011824294398844343 * (x ^ 2.0)) + Float64(Float64(-0.37545125292247583 * (x ^ 3.0)) + sqrt(Float64(1.2732557730789702 * Float64(x * x))))));
	else
		tmp = Float64(log(exp(Float64(1.0 - Float64(Float64((Float64(Float64(Float64(0.254829592 + Float64(Float64(1.061405429 / (t_3 ^ 4.0)) + Float64(1.421413741 / (t_3 ^ 2.0)))) - Float64(1.453152027 / t_4)) + Float64(-0.284496736 / t_3)) ^ 3.0) / t_4) / (t_1 ^ 3.0))))) / Float64(1.0 + Float64(t_2 * Float64(1.0 + t_2))));
	end
	return 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]}, Block[{t$95$1 = N[Exp[N[(x * x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(0.254829592 + N[(N[(-0.284496736 + N[(N[(1.421413741 + N[(N[(-1.453152027 + N[(1.061405429 / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(0.3275911 * N[Abs[x], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$3, 3.0], $MachinePrecision]}, If[LessEqual[N[Abs[x], $MachinePrecision], 5e-6], 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[(1.2732557730789702 * N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[N[Exp[N[(1.0 - N[(N[(N[Power[N[(N[(N[(0.254829592 + N[(N[(1.061405429 / N[Power[t$95$3, 4.0], $MachinePrecision]), $MachinePrecision] + N[(1.421413741 / N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(1.453152027 / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(-0.284496736 / t$95$3), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / t$95$4), $MachinePrecision] / N[Power[t$95$1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / N[(1.0 + N[(t$95$2 * N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $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\\
t_1 := e^{x \cdot x}\\
t_2 := \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{t_0}}{t_0}}{t_0}}{t_0}}{t_1}}{t_0}\\
t_3 := \mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\\
t_4 := {t_3}^{3}\\
\mathbf{if}\;\left|x\right| \leq 5 \cdot 10^{-6}:\\
\;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\log \left(e^{1 - \frac{\frac{{\left(\left(\left(0.254829592 + \left(\frac{1.061405429}{{t_3}^{4}} + \frac{1.421413741}{{t_3}^{2}}\right)\right) - \frac{1.453152027}{t_4}\right) + \frac{-0.284496736}{t_3}\right)}^{3}}{t_4}}{{t_1}^{3}}}\right)}{1 + t_2 \cdot \left(1 + t_2\right)}\\


\end{array}

Error?

Derivation?

  1. Split input into 2 regimes
  2. if (fabs.f64 x) < 5.00000000000000041e-6

    1. Initial program 57.7%

      \[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|} \]
    2. Simplified57.7%

      \[\leadsto \color{blue}{1 - \frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right) \cdot {\left(e^{x}\right)}^{x}}} \]
      Proof

      [Start]57.7

      \[ 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|} \]

      associate-*l/ [=>]57.7

      \[ 1 - \color{blue}{\frac{1 \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)}{1 + 0.3275911 \cdot \left|x\right|}} \cdot e^{-\left|x\right| \cdot \left|x\right|} \]

      *-lft-identity [=>]57.7

      \[ 1 - \frac{\color{blue}{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)}}{1 + 0.3275911 \cdot \left|x\right|} \cdot e^{-\left|x\right| \cdot \left|x\right|} \]
    3. Applied egg-rr57.1%

      \[\leadsto \color{blue}{1 + \left(-\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right) \cdot {\left(e^{x}\right)}^{x}}\right)} \]
      Proof

      [Start]57.7

      \[ 1 - \frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right) \cdot {\left(e^{x}\right)}^{x}} \]

      sub-neg [=>]57.7

      \[ \color{blue}{1 + \left(-\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right) \cdot {\left(e^{x}\right)}^{x}}\right)} \]
    4. Simplified57.1%

      \[\leadsto \color{blue}{1 + \frac{-0.254829592 - \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{e^{x \cdot x} \cdot \mathsf{fma}\left(0.3275911, x, 1\right)}} \]
      Proof

      [Start]57.1

      \[ 1 + \left(-\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right) \cdot {\left(e^{x}\right)}^{x}}\right) \]

      distribute-neg-frac [=>]57.1

      \[ 1 + \color{blue}{\frac{-\left(0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}\right)}{\mathsf{fma}\left(0.3275911, x, 1\right) \cdot {\left(e^{x}\right)}^{x}}} \]

      *-commutative [=>]57.1

      \[ 1 + \frac{-\left(0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}\right)}{\color{blue}{{\left(e^{x}\right)}^{x} \cdot \mathsf{fma}\left(0.3275911, x, 1\right)}} \]

      neg-sub0 [=>]57.1

      \[ 1 + \frac{\color{blue}{0 - \left(0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}\right)}}{{\left(e^{x}\right)}^{x} \cdot \mathsf{fma}\left(0.3275911, x, 1\right)} \]

      associate--r+ [=>]57.1

      \[ 1 + \frac{\color{blue}{\left(0 - 0.254829592\right) - \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}}{{\left(e^{x}\right)}^{x} \cdot \mathsf{fma}\left(0.3275911, x, 1\right)} \]

      metadata-eval [=>]57.1

      \[ 1 + \frac{\color{blue}{-0.254829592} - \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{{\left(e^{x}\right)}^{x} \cdot \mathsf{fma}\left(0.3275911, x, 1\right)} \]

      exp-prod [<=]57.1

      \[ 1 + \frac{-0.254829592 - \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\color{blue}{e^{x \cdot x}} \cdot \mathsf{fma}\left(0.3275911, x, 1\right)} \]
    5. Taylor expanded in x around 0 98.2%

      \[\leadsto \color{blue}{10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + 1.128386358070218 \cdot x\right)\right)} \]
    6. Applied egg-rr99.9%

      \[\leadsto 10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \color{blue}{\sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}}\right)\right) \]
      Proof

      [Start]98.2

      \[ 10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + 1.128386358070218 \cdot x\right)\right) \]

      add-sqr-sqrt [=>]50.4

      \[ 10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \color{blue}{\sqrt{1.128386358070218 \cdot x} \cdot \sqrt{1.128386358070218 \cdot x}}\right)\right) \]

      sqrt-unprod [=>]99.9

      \[ 10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \color{blue}{\sqrt{\left(1.128386358070218 \cdot x\right) \cdot \left(1.128386358070218 \cdot x\right)}}\right)\right) \]

      swap-sqr [=>]99.9

      \[ 10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{\color{blue}{\left(1.128386358070218 \cdot 1.128386358070218\right) \cdot \left(x \cdot x\right)}}\right)\right) \]

      metadata-eval [=>]99.9

      \[ 10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{\color{blue}{1.2732557730789702} \cdot \left(x \cdot x\right)}\right)\right) \]

    if 5.00000000000000041e-6 < (fabs.f64 x)

    1. Initial program 99.8%

      \[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|} \]
    2. Simplified99.8%

      \[\leadsto \color{blue}{1 - \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(\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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x}\right)} \]
      Proof

      [Start]99.8

      \[ 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|} \]

      associate-*l* [=>]99.8

      \[ 1 - \color{blue}{\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(\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) \cdot e^{-\left|x\right| \cdot \left|x\right|}\right)} \]
    3. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{1 - {\left(\frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)}^{3}}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)}} \]
      Proof

      [Start]99.8

      \[ 1 - \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(\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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x}\right) \]

      flip3-- [=>]99.8

      \[ \color{blue}{\frac{{1}^{3} - {\left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(\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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x}\right)\right)}^{3}}{1 \cdot 1 + \left(\left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(\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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x}\right)\right) \cdot \left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(\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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x}\right)\right) + 1 \cdot \left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(\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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x}\right)\right)\right)}} \]
    4. Applied egg-rr99.8%

      \[\leadsto \frac{\color{blue}{\log \left(e^{1 - {\left(\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{\left(1 + 0.3275911 \cdot \left|x\right|\right) \cdot {\left(e^{x}\right)}^{x}}\right)}^{3}}\right)}}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)} \]
      Proof

      [Start]99.8

      \[ \frac{1 - {\left(\frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)}^{3}}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)} \]

      add-log-exp [=>]99.8

      \[ \frac{\color{blue}{\log \left(e^{1 - {\left(\frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)}^{3}}\right)}}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)} \]
    5. Taylor expanded in x around inf 99.8%

      \[\leadsto \frac{\log \left(e^{\color{blue}{1 - \frac{{\left(\left(0.254829592 + \left(1.061405429 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{4}} + 1.421413741 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{2}}\right)\right) - \left(0.284496736 \cdot \frac{1}{0.3275911 \cdot \left|x\right| + 1} + 1.453152027 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{3}}\right)\right)}^{3}}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{3} \cdot {\left(e^{{x}^{2}}\right)}^{3}}}}\right)}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)} \]
    6. Simplified99.8%

      \[\leadsto \frac{\log \left(e^{\color{blue}{1 - \frac{\frac{{\left(\left(\left(0.254829592 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{2}}\right)\right) - \frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{3}}\right) - \frac{0.284496736}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}^{3}}{{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{3}}}{{\left(e^{x \cdot x}\right)}^{3}}}}\right)}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)} \]
      Proof

      [Start]99.8

      \[ \frac{\log \left(e^{1 - \frac{{\left(\left(0.254829592 + \left(1.061405429 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{4}} + 1.421413741 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{2}}\right)\right) - \left(0.284496736 \cdot \frac{1}{0.3275911 \cdot \left|x\right| + 1} + 1.453152027 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{3}}\right)\right)}^{3}}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{3} \cdot {\left(e^{{x}^{2}}\right)}^{3}}}\right)}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)} \]

      associate-/r* [=>]99.8

      \[ \frac{\log \left(e^{1 - \color{blue}{\frac{\frac{{\left(\left(0.254829592 + \left(1.061405429 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{4}} + 1.421413741 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{2}}\right)\right) - \left(0.284496736 \cdot \frac{1}{0.3275911 \cdot \left|x\right| + 1} + 1.453152027 \cdot \frac{1}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{3}}\right)\right)}^{3}}{{\left(0.3275911 \cdot \left|x\right| + 1\right)}^{3}}}{{\left(e^{{x}^{2}}\right)}^{3}}}}\right)}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}}{e^{x \cdot x}}}{1 + 0.3275911 \cdot \left|x\right|}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 5 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\log \left(e^{1 - \frac{\frac{{\left(\left(\left(0.254829592 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{2}}\right)\right) - \frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{3}}\right) + \frac{-0.284496736}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}^{3}}{{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{3}}}{{\left(e^{x \cdot x}\right)}^{3}}}\right)}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{e^{x \cdot x}}}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{e^{x \cdot x}}}{1 + \left|x\right| \cdot 0.3275911}\right)}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy99.9%
Cost186692
\[\begin{array}{l} t_0 := \mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\\ t_1 := \frac{1}{1 + \left|x\right| \cdot 0.3275911}\\ t_2 := \frac{-1.453152027 + \frac{1.061405429}{t_0}}{t_0}\\ \mathbf{if}\;\left(t_1 \cdot \left(0.254829592 + t_1 \cdot \left(-0.284496736 + t_1 \cdot \left(1.421413741 + t_1 \cdot \left(-1.453152027 + 1.061405429 \cdot t_1\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \leq 0.99999:\\ \;\;\;\;\mathsf{fma}\left(0.254829592 + \frac{-0.284496736 + \frac{2.871848519189793 + {t_2}^{3}}{t_0 \cdot \mathsf{fma}\left(t_2 + -1.421413741, t_2, 2.020417023103615\right)}}{t_0}, \frac{\frac{-1}{e^{x \cdot x}}}{t_0}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \end{array} \]
Alternative 2
Accuracy99.9%
Cost96004
\[\begin{array}{l} t_0 := 1 + \left|x\right| \cdot 0.3275911\\ t_1 := \frac{1}{t_0}\\ \mathbf{if}\;\left(t_1 \cdot \left(0.254829592 + t_1 \cdot \left(-0.284496736 + t_1 \cdot \left(1.421413741 + t_1 \cdot \left(-1.453152027 + 1.061405429 \cdot t_1\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \leq 0.99999:\\ \;\;\;\;e^{\log \left(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}\right)}\\ \mathbf{else}:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \end{array} \]
Alternative 3
Accuracy99.9%
Cost76356
\[\begin{array}{l} t_0 := 1 + x \cdot 0.3275911\\ t_1 := \frac{-1.453152027 + \frac{1.061405429}{t_0}}{t_0}\\ t_2 := 1 + \left|x\right| \cdot 0.3275911\\ t_3 := \frac{1}{t_2}\\ t_4 := \frac{-1.453152027 + \frac{1.061405429}{t_2}}{t_2}\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{-6}:\\ \;\;\;\;1 - t_3 \cdot \left(\left(0.254829592 + t_3 \cdot \left(-0.284496736 + t_3 \cdot \left(\left(2.871848519189793 + {t_4}^{3}\right) \cdot \frac{1}{2.020417023103615 + t_4 \cdot \left(t_4 + -1.421413741\right)}\right)\right)\right) \cdot e^{-x \cdot x}\right)\\ \mathbf{elif}\;x \leq 0.00058:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{0.254829592 + \frac{-0.284496736 + \frac{\frac{2.871848519189793 + {t_1}^{3}}{2.020417023103615 + t_1 \cdot \left(-1.421413741 + t_1\right)}}{t_0}}{t_0}}{t_0 \cdot {\left(e^{x}\right)}^{x}}\\ \end{array} \]
Alternative 4
Accuracy99.9%
Cost74116
\[\begin{array}{l} t_0 := 1 + \left|x\right| \cdot 0.3275911\\ \mathbf{if}\;\left|x\right| \leq 5 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{e^{-{x}^{2}} \cdot \left(\left(1.453152027 \cdot \frac{1}{{t_0}^{3}} + -0.284496736 \cdot \frac{-1}{t_0}\right) + \left(-0.254829592 + \left(1.061405429 \cdot \frac{-1}{{t_0}^{4}} + 1.421413741 \cdot \frac{-1}{{t_0}^{2}}\right)\right)\right)}{t_0}\\ \end{array} \]
Alternative 5
Accuracy99.9%
Cost41412
\[\begin{array}{l} t_0 := 1 + \left|x\right| \cdot 0.3275911\\ t_1 := 1 + x \cdot 0.3275911\\ t_2 := \frac{-1.453152027 + \frac{1.061405429}{t_1}}{t_1}\\ \mathbf{if}\;x \leq -5.8 \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 0.00058:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{0.254829592 + \frac{-0.284496736 + \frac{\frac{2.871848519189793 + {t_2}^{3}}{2.020417023103615 + t_2 \cdot \left(-1.421413741 + t_2\right)}}{t_1}}{t_1}}{t_1 \cdot {\left(e^{x}\right)}^{x}}\\ \end{array} \]
Alternative 6
Accuracy99.7%
Cost24648
\[\begin{array}{l} t_0 := 1 + x \cdot 0.3275911\\ t_1 := \frac{-1.453152027 + \frac{1.061405429}{t_0}}{t_0}\\ \mathbf{if}\;x \leq -0.75:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.00058:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{0.254829592 + \frac{-0.284496736 + \frac{\frac{2.871848519189793 + {t_1}^{3}}{2.020417023103615 + t_1 \cdot \left(-1.421413741 + t_1\right)}}{t_0}}{t_0}}{t_0 \cdot {\left(e^{x}\right)}^{x}}\\ \end{array} \]
Alternative 7
Accuracy99.7%
Cost20552
\[\begin{array}{l} t_0 := 1 + x \cdot 0.3275911\\ \mathbf{if}\;x \leq -0.75:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.00058:\\ \;\;\;\;10^{-9} + \left(-0.00011824294398844343 \cdot {x}^{2} + \left(-0.37545125292247583 \cdot {x}^{3} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;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}}\\ \end{array} \]
Alternative 8
Accuracy99.5%
Cost15880
\[\begin{array}{l} t_0 := 1 + x \cdot 0.3275911\\ \mathbf{if}\;x \leq -0.88:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\\ \mathbf{else}:\\ \;\;\;\;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}}\\ \end{array} \]
Alternative 9
Accuracy99.3%
Cost7112
\[\begin{array}{l} \mathbf{if}\;x \leq -0.88:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.9:\\ \;\;\;\;10^{-9} + \sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 10
Accuracy98.4%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -8.8 \cdot 10^{-10}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.9:\\ \;\;\;\;10^{-9} + x \cdot 1.128386358070218\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 11
Accuracy98.5%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -0.88:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{-10}:\\ \;\;\;\;10^{-9} + x \cdot -1.128386358070218\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 12
Accuracy97.7%
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{-5}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-5}:\\ \;\;\;\;10^{-9}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 13
Accuracy53.9%
Cost64
\[10^{-9} \]

Error

Reproduce?

herbie shell --seed 2023133 
(FPCore (x)
  :name "Jmat.Real.erf"
  :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)))))))