?

Average Accuracy: 78.7% → 99.7%
Time: 24.2s
Precision: binary64
Cost: 154248

?

\[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 + 0.3275911 \cdot \left|x\right|\\ t_1 := \frac{1}{t_0}\\ t_2 := \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}}\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{-7}:\\ \;\;\;\;1 + e^{x \cdot \left(-x\right)} \cdot \left(t_1 \cdot \left(\left(-0.284496736 + t_1 \cdot \left(1.421413741 + t_1 \cdot \left(-1.453152027 + t_1 \cdot 1.061405429\right)\right)\right) \cdot \frac{-1}{t_0} - 0.254829592\right)\right)\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1 + \left(t_2 + {t_2}^{2}\right)}{1 - {t_2}^{3}}}\\ \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 (* 0.3275911 (fabs x))))
        (t_1 (/ 1.0 t_0))
        (t_2
         (/
          (+
           0.254829592
           (/
            (+
             -0.284496736
             (/
              (+
               1.421413741
               (/
                (+ -1.453152027 (/ 1.061405429 (fma 0.3275911 x 1.0)))
                (fma 0.3275911 x 1.0)))
              (fma 0.3275911 x 1.0)))
            (fma 0.3275911 x 1.0)))
          (* (fma 0.3275911 x 1.0) (pow (exp x) x)))))
   (if (<= x -8.5e-7)
     (+
      1.0
      (*
       (exp (* x (- x)))
       (*
        t_1
        (-
         (*
          (+
           -0.284496736
           (*
            t_1
            (+ 1.421413741 (* t_1 (+ -1.453152027 (* t_1 1.061405429))))))
          (/ -1.0 t_0))
         0.254829592))))
     (if (<= x 1.05e-6)
       (+ 1e-9 (fabs (* x 1.128386358070218)))
       (/ 1.0 (/ (+ 1.0 (+ t_2 (pow t_2 2.0))) (- 1.0 (pow t_2 3.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 + (0.3275911 * fabs(x));
	double t_1 = 1.0 / t_0;
	double t_2 = (0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / fma(0.3275911, x, 1.0))) / fma(0.3275911, x, 1.0))) / fma(0.3275911, x, 1.0))) / fma(0.3275911, x, 1.0))) / (fma(0.3275911, x, 1.0) * pow(exp(x), x));
	double tmp;
	if (x <= -8.5e-7) {
		tmp = 1.0 + (exp((x * -x)) * (t_1 * (((-0.284496736 + (t_1 * (1.421413741 + (t_1 * (-1.453152027 + (t_1 * 1.061405429)))))) * (-1.0 / t_0)) - 0.254829592)));
	} else if (x <= 1.05e-6) {
		tmp = 1e-9 + fabs((x * 1.128386358070218));
	} else {
		tmp = 1.0 / ((1.0 + (t_2 + pow(t_2, 2.0))) / (1.0 - pow(t_2, 3.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(0.3275911 * abs(x)))
	t_1 = Float64(1.0 / t_0)
	t_2 = Float64(Float64(0.254829592 + Float64(Float64(-0.284496736 + Float64(Float64(1.421413741 + Float64(Float64(-1.453152027 + Float64(1.061405429 / fma(0.3275911, x, 1.0))) / fma(0.3275911, x, 1.0))) / fma(0.3275911, x, 1.0))) / fma(0.3275911, x, 1.0))) / Float64(fma(0.3275911, x, 1.0) * (exp(x) ^ x)))
	tmp = 0.0
	if (x <= -8.5e-7)
		tmp = Float64(1.0 + Float64(exp(Float64(x * Float64(-x))) * Float64(t_1 * Float64(Float64(Float64(-0.284496736 + Float64(t_1 * Float64(1.421413741 + Float64(t_1 * Float64(-1.453152027 + Float64(t_1 * 1.061405429)))))) * Float64(-1.0 / t_0)) - 0.254829592))));
	elseif (x <= 1.05e-6)
		tmp = Float64(1e-9 + abs(Float64(x * 1.128386358070218)));
	else
		tmp = Float64(1.0 / Float64(Float64(1.0 + Float64(t_2 + (t_2 ^ 2.0))) / Float64(1.0 - (t_2 ^ 3.0))));
	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[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(0.254829592 + N[(N[(-0.284496736 + N[(N[(1.421413741 + N[(N[(-1.453152027 + N[(1.061405429 / N[(0.3275911 * x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.3275911 * x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.3275911 * x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.3275911 * x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(0.3275911 * x + 1.0), $MachinePrecision] * N[Power[N[Exp[x], $MachinePrecision], x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e-7], N[(1.0 + N[(N[Exp[N[(x * (-x)), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[(N[(N[(-0.284496736 + N[(t$95$1 * N[(1.421413741 + N[(t$95$1 * N[(-1.453152027 + N[(t$95$1 * 1.061405429), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision] - 0.254829592), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-6], N[(1e-9 + N[Abs[N[(x * 1.128386358070218), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(1.0 + N[(t$95$2 + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[Power[t$95$2, 3.0], $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 + 0.3275911 \cdot \left|x\right|\\
t_1 := \frac{1}{t_0}\\
t_2 := \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}}\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-7}:\\
\;\;\;\;1 + e^{x \cdot \left(-x\right)} \cdot \left(t_1 \cdot \left(\left(-0.284496736 + t_1 \cdot \left(1.421413741 + t_1 \cdot \left(-1.453152027 + t_1 \cdot 1.061405429\right)\right)\right) \cdot \frac{-1}{t_0} - 0.254829592\right)\right)\\

\mathbf{elif}\;x \leq 1.05 \cdot 10^{-6}:\\
\;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1 + \left(t_2 + {t_2}^{2}\right)}{1 - {t_2}^{3}}}\\


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if x < -8.50000000000000014e-7

    1. Initial program 99.6%

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

    if -8.50000000000000014e-7 < x < 1.0499999999999999e-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|} \]

      exp-neg [=>]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 \color{blue}{\frac{1}{e^{\left|x\right| \cdot \left|x\right|}}} \]

      associate-*r/ [=>]57.7

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\left(-\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) + -0.254829592}{\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}} \]

      add-exp-log [=>]57.7

      \[ \color{blue}{e^{\log \left(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}}\right)}} \]

      sub-neg [=>]57.7

      \[ e^{\log \color{blue}{\left(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)\right)}} \]

      log1p-def [=>]57.7

      \[ e^{\color{blue}{\mathsf{log1p}\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)}} \]

      distribute-neg-frac [=>]57.7

      \[ e^{\mathsf{log1p}\left(\color{blue}{\frac{-\left(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)}\right)}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right) \cdot {\left(e^{x}\right)}^{x}}}\right)} \]
    4. Simplified57.2%

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

      [Start]57.2

      \[ e^{\mathsf{log1p}\left(\frac{\left(-\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) + -0.254829592}{\mathsf{fma}\left(0.3275911, x, 1\right) \cdot {\left(e^{x}\right)}^{x}}\right)} \]

      distribute-neg-frac [=>]57.2

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

      distribute-neg-in [=>]57.2

      \[ e^{\mathsf{log1p}\left(\frac{\frac{\color{blue}{\left(--0.284496736\right) + \left(-\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)}\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)} + -0.254829592}{\mathsf{fma}\left(0.3275911, x, 1\right) \cdot {\left(e^{x}\right)}^{x}}\right)} \]

      metadata-eval [=>]57.2

      \[ e^{\mathsf{log1p}\left(\frac{\frac{\color{blue}{0.284496736} + \left(-\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)}\right)}{\mathsf{fma}\left(0.3275911, x, 1\right)} + -0.254829592}{\mathsf{fma}\left(0.3275911, x, 1\right) \cdot {\left(e^{x}\right)}^{x}}\right)} \]

      unsub-neg [=>]57.2

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

      *-commutative [=>]57.2

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

      exp-prod [<=]57.2

      \[ e^{\mathsf{log1p}\left(\frac{\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)} + -0.254829592}{\color{blue}{e^{x \cdot x}} \cdot \mathsf{fma}\left(0.3275911, x, 1\right)}\right)} \]
    5. Taylor expanded in x around 0 98.4%

      \[\leadsto \color{blue}{10^{-9} + 1.128386358070218 \cdot x} \]
    6. Simplified98.4%

      \[\leadsto \color{blue}{10^{-9} + x \cdot 1.128386358070218} \]
      Proof

      [Start]98.4

      \[ 10^{-9} + 1.128386358070218 \cdot x \]

      *-commutative [=>]98.4

      \[ 10^{-9} + \color{blue}{x \cdot 1.128386358070218} \]
    7. Applied egg-rr97.6%

      \[\leadsto 10^{-9} + \color{blue}{\left(\left(1 + x \cdot 1.128386358070218\right) - 1\right)} \]
      Proof

      [Start]98.4

      \[ 10^{-9} + x \cdot 1.128386358070218 \]

      expm1-log1p-u [=>]98.4

      \[ 10^{-9} + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot 1.128386358070218\right)\right)} \]

      expm1-udef [=>]97.6

      \[ 10^{-9} + \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot 1.128386358070218\right)} - 1\right)} \]

      log1p-udef [=>]97.6

      \[ 10^{-9} + \left(e^{\color{blue}{\log \left(1 + x \cdot 1.128386358070218\right)}} - 1\right) \]

      add-exp-log [<=]97.6

      \[ 10^{-9} + \left(\color{blue}{\left(1 + x \cdot 1.128386358070218\right)} - 1\right) \]
    8. Applied egg-rr99.8%

      \[\leadsto 10^{-9} + \color{blue}{{\left(1.2732557730789702 \cdot \left(x \cdot x\right)\right)}^{0.5}} \]
      Proof

      [Start]97.6

      \[ 10^{-9} + \left(\left(1 + x \cdot 1.128386358070218\right) - 1\right) \]

      pow1 [=>]97.6

      \[ 10^{-9} + \color{blue}{{\left(\left(1 + x \cdot 1.128386358070218\right) - 1\right)}^{1}} \]

      add-exp-log [=>]97.6

      \[ 10^{-9} + {\left(\color{blue}{e^{\log \left(1 + x \cdot 1.128386358070218\right)}} - 1\right)}^{1} \]

      log1p-udef [<=]97.6

      \[ 10^{-9} + {\left(e^{\color{blue}{\mathsf{log1p}\left(x \cdot 1.128386358070218\right)}} - 1\right)}^{1} \]

      expm1-udef [<=]98.4

      \[ 10^{-9} + {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot 1.128386358070218\right)\right)\right)}}^{1} \]

      expm1-log1p-u [<=]98.4

      \[ 10^{-9} + {\color{blue}{\left(x \cdot 1.128386358070218\right)}}^{1} \]

      metadata-eval [<=]98.4

      \[ 10^{-9} + {\left(x \cdot 1.128386358070218\right)}^{\color{blue}{\left(0.5 + 0.5\right)}} \]

      pow-prod-up [<=]49.1

      \[ 10^{-9} + \color{blue}{{\left(x \cdot 1.128386358070218\right)}^{0.5} \cdot {\left(x \cdot 1.128386358070218\right)}^{0.5}} \]

      pow-prod-down [=>]99.8

      \[ 10^{-9} + \color{blue}{{\left(\left(x \cdot 1.128386358070218\right) \cdot \left(x \cdot 1.128386358070218\right)\right)}^{0.5}} \]

      *-commutative [=>]99.8

      \[ 10^{-9} + {\left(\color{blue}{\left(1.128386358070218 \cdot x\right)} \cdot \left(x \cdot 1.128386358070218\right)\right)}^{0.5} \]

      *-commutative [=>]99.8

      \[ 10^{-9} + {\left(\left(1.128386358070218 \cdot x\right) \cdot \color{blue}{\left(1.128386358070218 \cdot x\right)}\right)}^{0.5} \]

      swap-sqr [=>]99.8

      \[ 10^{-9} + {\color{blue}{\left(\left(1.128386358070218 \cdot 1.128386358070218\right) \cdot \left(x \cdot x\right)\right)}}^{0.5} \]

      metadata-eval [=>]99.8

      \[ 10^{-9} + {\left(\color{blue}{1.2732557730789702} \cdot \left(x \cdot x\right)\right)}^{0.5} \]
    9. Simplified99.8%

      \[\leadsto 10^{-9} + \color{blue}{\left|1.128386358070218 \cdot x\right|} \]
      Proof

      [Start]99.8

      \[ 10^{-9} + {\left(1.2732557730789702 \cdot \left(x \cdot x\right)\right)}^{0.5} \]

      unpow1/2 [=>]99.8

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

      *-commutative [=>]99.8

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

      metadata-eval [<=]99.8

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

      swap-sqr [<=]99.8

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

      rem-sqrt-square [=>]99.8

      \[ 10^{-9} + \color{blue}{\left|x \cdot 1.128386358070218\right|} \]

      *-commutative [<=]99.8

      \[ 10^{-9} + \left|\color{blue}{1.128386358070218 \cdot x}\right| \]

    if 1.0499999999999999e-6 < x

    1. Initial program 99.6%

      \[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.6%

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

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

      exp-neg [=>]99.6

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

      associate-*r/ [=>]99.6

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

      \[\leadsto \color{blue}{\frac{1}{\frac{1 + \left({\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)}^{2} + \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)}{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)}^{3}}}} \]
      Proof

      [Start]99.6

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

      flip3-- [=>]99.6

      \[ \color{blue}{\frac{{1}^{3} - {\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)}^{3}}{1 \cdot 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}} \cdot \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}} + 1 \cdot \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)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{-7}:\\ \;\;\;\;1 + e^{x \cdot \left(-x\right)} \cdot \left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(\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) \cdot \frac{-1}{1 + 0.3275911 \cdot \left|x\right|} - 0.254829592\right)\right)\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{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}} + {\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)}^{2}\right)}{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)}^{3}}}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy99.7%
Cost128776
\[\begin{array}{l} t_0 := \frac{\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)} + -0.254829592}{\mathsf{fma}\left(0.3275911, x, 1\right) \cdot e^{x \cdot x}}\\ t_1 := 1 + 0.3275911 \cdot \left|x\right|\\ t_2 := \frac{1}{t_1}\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{-7}:\\ \;\;\;\;1 + e^{x \cdot \left(-x\right)} \cdot \left(t_2 \cdot \left(\left(-0.284496736 + t_2 \cdot \left(1.421413741 + t_2 \cdot \left(-1.453152027 + t_2 \cdot 1.061405429\right)\right)\right) \cdot \frac{-1}{t_1} - 0.254829592\right)\right)\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + {t_0}^{3}}{1 + t_0 \cdot \left(t_0 + -1\right)}\\ \end{array} \]
Alternative 2
Accuracy99.7%
Cost42116
\[\begin{array}{l} t_0 := e^{x \cdot \left(-x\right)}\\ t_1 := 1 + 0.3275911 \cdot \left|x\right|\\ t_2 := \frac{1}{t_1}\\ t_3 := \frac{-1}{t_1}\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{-7}:\\ \;\;\;\;1 + t_0 \cdot \left(t_2 \cdot \left(\left(-0.284496736 + t_2 \cdot \left(1.421413741 + t_2 \cdot \left(-1.453152027 + t_2 \cdot 1.061405429\right)\right)\right) \cdot t_3 - 0.254829592\right)\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;1 + t_2 \cdot \left(t_0 \cdot \left(\frac{1}{1 + e^{\log \left(x \cdot 0.3275911\right)}} \cdot \left(\left(1.421413741 + \left(-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}\right) \cdot \frac{1}{1 + x \cdot 0.3275911}\right) \cdot t_3 - -0.284496736\right) - 0.254829592\right)\right)\\ \end{array} \]
Alternative 3
Accuracy99.5%
Cost41992
\[\begin{array}{l} t_0 := 1 + 0.3275911 \cdot \left|x\right|\\ \mathbf{if}\;x \leq -0.86:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{1}{t_0} \cdot \left(e^{x \cdot \left(-x\right)} \cdot \left(\frac{1}{1 + e^{\log \left(x \cdot 0.3275911\right)}} \cdot \left(\left(1.421413741 + \left(-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}\right) \cdot \frac{1}{1 + x \cdot 0.3275911}\right) \cdot \frac{-1}{t_0} - -0.284496736\right) - 0.254829592\right)\right)\\ \end{array} \]
Alternative 4
Accuracy99.7%
Cost41992
\[\begin{array}{l} t_0 := 1 + 0.3275911 \cdot \left|x\right|\\ t_1 := e^{x \cdot \left(-x\right)}\\ t_2 := \frac{-1}{t_0}\\ t_3 := \frac{1}{t_0}\\ \mathbf{if}\;x \leq -1 \cdot 10^{-6}:\\ \;\;\;\;1 + \left(t_1 \cdot \left(0.254829592 + t_3 \cdot \left(-0.284496736 + t_3 \cdot \left(1.421413741 + t_3 \cdot \left(-1.453152027 + \frac{1.061405429}{t_0}\right)\right)\right)\right)\right) \cdot t_2\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;1 + t_3 \cdot \left(t_1 \cdot \left(\frac{1}{1 + e^{\log \left(x \cdot 0.3275911\right)}} \cdot \left(\left(1.421413741 + \left(-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}\right) \cdot \frac{1}{1 + x \cdot 0.3275911}\right) \cdot t_2 - -0.284496736\right) - 0.254829592\right)\right)\\ \end{array} \]
Alternative 5
Accuracy99.5%
Cost40904
\[\begin{array}{l} \mathbf{if}\;x \leq -0.86:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\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)} + -0.254829592}{\mathsf{fma}\left(0.3275911, x, 1\right) \cdot e^{x \cdot x}}\\ \end{array} \]
Alternative 6
Accuracy99.5%
Cost29192
\[\begin{array}{l} t_0 := \frac{1}{1 + x \cdot 0.3275911}\\ t_1 := 1 + 0.3275911 \cdot \left|x\right|\\ \mathbf{if}\;x \leq -0.86:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-6}:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;1 + t_0 \cdot \left(e^{x \cdot \left(-x\right)} \cdot \left(\frac{1}{t_1} \cdot \left(\left(1.421413741 + \left(-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}\right) \cdot t_0\right) \cdot \frac{-1}{t_1} - -0.284496736\right) - 0.254829592\right)\right)\\ \end{array} \]
Alternative 7
Accuracy99.2%
Cost6984
\[\begin{array}{l} \mathbf{if}\;x \leq -0.86:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.88:\\ \;\;\;\;10^{-9} + \left|x \cdot 1.128386358070218\right|\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 8
Accuracy98.3%
Cost1096
\[\begin{array}{l} \mathbf{if}\;x \leq -8.9 \cdot 10^{-10}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.88:\\ \;\;\;\;\frac{\left(x \cdot x\right) \cdot 1.2732557730789702 - 10^{-18}}{x \cdot 1.128386358070218 - 10^{-9}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 9
Accuracy98.3%
Cost584
\[\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 10
Accuracy97.5%
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 11
Accuracy54.1%
Cost64
\[10^{-9} \]

Error

Reproduce?

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