Jmat.Real.erf

Percentage Accurate: 78.8% → 80.9%
Time: 1.0min
Alternatives: 8
Speedup: 1.3×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\\ 1 - \left(t\_0 \cdot \left(0.254829592 + t\_0 \cdot \left(-0.284496736 + t\_0 \cdot \left(1.421413741 + t\_0 \cdot \left(-1.453152027 + t\_0 \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))))
   (-
    1.0
    (*
     (*
      t_0
      (+
       0.254829592
       (*
        t_0
        (+
         -0.284496736
         (*
          t_0
          (+ 1.421413741 (* t_0 (+ -1.453152027 (* t_0 1.061405429)))))))))
     (exp (- (* (fabs x) (fabs x))))))))
double code(double x) {
	double t_0 = 1.0 / (1.0 + (0.3275911 * fabs(x)));
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (t_0 * 1.061405429))))))))) * exp(-(fabs(x) * fabs(x))));
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    t_0 = 1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))
    code = 1.0d0 - ((t_0 * (0.254829592d0 + (t_0 * ((-0.284496736d0) + (t_0 * (1.421413741d0 + (t_0 * ((-1.453152027d0) + (t_0 * 1.061405429d0))))))))) * exp(-(abs(x) * abs(x))))
end function
public static double code(double x) {
	double t_0 = 1.0 / (1.0 + (0.3275911 * Math.abs(x)));
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (t_0 * 1.061405429))))))))) * Math.exp(-(Math.abs(x) * Math.abs(x))));
}
def code(x):
	t_0 = 1.0 / (1.0 + (0.3275911 * math.fabs(x)))
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (t_0 * 1.061405429))))))))) * math.exp(-(math.fabs(x) * math.fabs(x))))
function code(x)
	t_0 = Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x))))
	return Float64(1.0 - Float64(Float64(t_0 * Float64(0.254829592 + Float64(t_0 * Float64(-0.284496736 + Float64(t_0 * Float64(1.421413741 + Float64(t_0 * Float64(-1.453152027 + Float64(t_0 * 1.061405429))))))))) * exp(Float64(-Float64(abs(x) * abs(x))))))
end
function tmp = code(x)
	t_0 = 1.0 / (1.0 + (0.3275911 * abs(x)));
	tmp = 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (t_0 * 1.061405429))))))))) * exp(-(abs(x) * abs(x))));
end
code[x_] := Block[{t$95$0 = N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(1.0 - N[(N[(t$95$0 * N[(0.254829592 + N[(t$95$0 * N[(-0.284496736 + N[(t$95$0 * N[(1.421413741 + N[(t$95$0 * N[(-1.453152027 + N[(t$95$0 * 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]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\\
1 - \left(t\_0 \cdot \left(0.254829592 + t\_0 \cdot \left(-0.284496736 + t\_0 \cdot \left(1.421413741 + t\_0 \cdot \left(-1.453152027 + t\_0 \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 8 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 78.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\\ 1 - \left(t\_0 \cdot \left(0.254829592 + t\_0 \cdot \left(-0.284496736 + t\_0 \cdot \left(1.421413741 + t\_0 \cdot \left(-1.453152027 + t\_0 \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))))
   (-
    1.0
    (*
     (*
      t_0
      (+
       0.254829592
       (*
        t_0
        (+
         -0.284496736
         (*
          t_0
          (+ 1.421413741 (* t_0 (+ -1.453152027 (* t_0 1.061405429)))))))))
     (exp (- (* (fabs x) (fabs x))))))))
double code(double x) {
	double t_0 = 1.0 / (1.0 + (0.3275911 * fabs(x)));
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (t_0 * 1.061405429))))))))) * exp(-(fabs(x) * fabs(x))));
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    t_0 = 1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))
    code = 1.0d0 - ((t_0 * (0.254829592d0 + (t_0 * ((-0.284496736d0) + (t_0 * (1.421413741d0 + (t_0 * ((-1.453152027d0) + (t_0 * 1.061405429d0))))))))) * exp(-(abs(x) * abs(x))))
end function
public static double code(double x) {
	double t_0 = 1.0 / (1.0 + (0.3275911 * Math.abs(x)));
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (t_0 * 1.061405429))))))))) * Math.exp(-(Math.abs(x) * Math.abs(x))));
}
def code(x):
	t_0 = 1.0 / (1.0 + (0.3275911 * math.fabs(x)))
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (t_0 * 1.061405429))))))))) * math.exp(-(math.fabs(x) * math.fabs(x))))
function code(x)
	t_0 = Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x))))
	return Float64(1.0 - Float64(Float64(t_0 * Float64(0.254829592 + Float64(t_0 * Float64(-0.284496736 + Float64(t_0 * Float64(1.421413741 + Float64(t_0 * Float64(-1.453152027 + Float64(t_0 * 1.061405429))))))))) * exp(Float64(-Float64(abs(x) * abs(x))))))
end
function tmp = code(x)
	t_0 = 1.0 / (1.0 + (0.3275911 * abs(x)));
	tmp = 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (t_0 * 1.061405429))))))))) * exp(-(abs(x) * abs(x))));
end
code[x_] := Block[{t$95$0 = N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(1.0 - N[(N[(t$95$0 * N[(0.254829592 + N[(t$95$0 * N[(-0.284496736 + N[(t$95$0 * N[(1.421413741 + N[(t$95$0 * N[(-1.453152027 + N[(t$95$0 * 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]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\\
1 - \left(t\_0 \cdot \left(0.254829592 + t\_0 \cdot \left(-0.284496736 + t\_0 \cdot \left(1.421413741 + t\_0 \cdot \left(-1.453152027 + t\_0 \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}
\end{array}
\end{array}

Alternative 1: 80.9% accurate, 0.1× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := \mathsf{fma}\left(0.3275911, \left|x\_m\right|, 1\right)\\ t_1 := 1.061405429 \cdot {t\_0}^{-5}\\ t_2 := \sqrt[3]{\mathsf{fma}\left(1.421413741, {t\_0}^{-3}, t\_1\right)}\\ t_3 := \sqrt{\mathsf{fma}\left(1.453152027, {t\_0}^{-4}, \mathsf{fma}\left(0.284496736, {t\_0}^{-2}, 1\right)\right) - \frac{0.254829592}{t\_0}}\\ t_4 := {t\_2}^{2}\\ \mathbf{if}\;\left|x\_m\right| \leq 2 \cdot 10^{-10}:\\ \;\;\;\;\mathsf{fma}\left(t\_3, t\_3, t\_4 \cdot \left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\sqrt{t\_0}\right)}^{-6}, t\_1\right)}\right)\right) + \mathsf{fma}\left(-t\_2, t\_4, t\_2 \cdot t\_4\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x\_m}^{2}}}}{1 + x\_m \cdot 0.3275911}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m)
 :precision binary64
 (let* ((t_0 (fma 0.3275911 (fabs x_m) 1.0))
        (t_1 (* 1.061405429 (pow t_0 -5.0)))
        (t_2 (cbrt (fma 1.421413741 (pow t_0 -3.0) t_1)))
        (t_3
         (sqrt
          (-
           (fma
            1.453152027
            (pow t_0 -4.0)
            (fma 0.284496736 (pow t_0 -2.0) 1.0))
           (/ 0.254829592 t_0))))
        (t_4 (pow t_2 2.0)))
   (if (<= (fabs x_m) 2e-10)
     (+
      (fma
       t_3
       t_3
       (* t_4 (- (cbrt (fma 1.421413741 (pow (sqrt t_0) -6.0) t_1)))))
      (fma (- t_2) t_4 (* t_2 t_4)))
     (+
      1.0
      (/
       (/
        (+
         (/ 0.284496736 (fma 0.3275911 x_m 1.0))
         (+
          (/ 1.453152027 (pow (fma 0.3275911 x_m 1.0) 3.0))
          (-
           -0.254829592
           (+
            (/ 1.061405429 (pow (fma 0.3275911 x_m 1.0) 4.0))
            (/ 1.421413741 (pow (fma 0.3275911 x_m 1.0) 2.0))))))
        (exp (pow x_m 2.0)))
       (+ 1.0 (* x_m 0.3275911)))))))
x_m = fabs(x);
double code(double x_m) {
	double t_0 = fma(0.3275911, fabs(x_m), 1.0);
	double t_1 = 1.061405429 * pow(t_0, -5.0);
	double t_2 = cbrt(fma(1.421413741, pow(t_0, -3.0), t_1));
	double t_3 = sqrt((fma(1.453152027, pow(t_0, -4.0), fma(0.284496736, pow(t_0, -2.0), 1.0)) - (0.254829592 / t_0)));
	double t_4 = pow(t_2, 2.0);
	double tmp;
	if (fabs(x_m) <= 2e-10) {
		tmp = fma(t_3, t_3, (t_4 * -cbrt(fma(1.421413741, pow(sqrt(t_0), -6.0), t_1)))) + fma(-t_2, t_4, (t_2 * t_4));
	} else {
		tmp = 1.0 + ((((0.284496736 / fma(0.3275911, x_m, 1.0)) + ((1.453152027 / pow(fma(0.3275911, x_m, 1.0), 3.0)) + (-0.254829592 - ((1.061405429 / pow(fma(0.3275911, x_m, 1.0), 4.0)) + (1.421413741 / pow(fma(0.3275911, x_m, 1.0), 2.0)))))) / exp(pow(x_m, 2.0))) / (1.0 + (x_m * 0.3275911)));
	}
	return tmp;
}
x_m = abs(x)
function code(x_m)
	t_0 = fma(0.3275911, abs(x_m), 1.0)
	t_1 = Float64(1.061405429 * (t_0 ^ -5.0))
	t_2 = cbrt(fma(1.421413741, (t_0 ^ -3.0), t_1))
	t_3 = sqrt(Float64(fma(1.453152027, (t_0 ^ -4.0), fma(0.284496736, (t_0 ^ -2.0), 1.0)) - Float64(0.254829592 / t_0)))
	t_4 = t_2 ^ 2.0
	tmp = 0.0
	if (abs(x_m) <= 2e-10)
		tmp = Float64(fma(t_3, t_3, Float64(t_4 * Float64(-cbrt(fma(1.421413741, (sqrt(t_0) ^ -6.0), t_1))))) + fma(Float64(-t_2), t_4, Float64(t_2 * t_4)));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(Float64(0.284496736 / fma(0.3275911, x_m, 1.0)) + Float64(Float64(1.453152027 / (fma(0.3275911, x_m, 1.0) ^ 3.0)) + Float64(-0.254829592 - Float64(Float64(1.061405429 / (fma(0.3275911, x_m, 1.0) ^ 4.0)) + Float64(1.421413741 / (fma(0.3275911, x_m, 1.0) ^ 2.0)))))) / exp((x_m ^ 2.0))) / Float64(1.0 + Float64(x_m * 0.3275911))));
	end
	return tmp
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[(0.3275911 * N[Abs[x$95$m], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(1.061405429 * N[Power[t$95$0, -5.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(1.421413741 * N[Power[t$95$0, -3.0], $MachinePrecision] + t$95$1), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(1.453152027 * N[Power[t$95$0, -4.0], $MachinePrecision] + N[(0.284496736 * N[Power[t$95$0, -2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] - N[(0.254829592 / t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$2, 2.0], $MachinePrecision]}, If[LessEqual[N[Abs[x$95$m], $MachinePrecision], 2e-10], N[(N[(t$95$3 * t$95$3 + N[(t$95$4 * (-N[Power[N[(1.421413741 * N[Power[N[Sqrt[t$95$0], $MachinePrecision], -6.0], $MachinePrecision] + t$95$1), $MachinePrecision], 1/3], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] + N[((-t$95$2) * t$95$4 + N[(t$95$2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(N[(0.284496736 / N[(0.3275911 * x$95$m + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.453152027 / N[Power[N[(0.3275911 * x$95$m + 1.0), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] + N[(-0.254829592 - N[(N[(1.061405429 / N[Power[N[(0.3275911 * x$95$m + 1.0), $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision] + N[(1.421413741 / N[Power[N[(0.3275911 * x$95$m + 1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Exp[N[Power[x$95$m, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(x$95$m * 0.3275911), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(0.3275911, \left|x\_m\right|, 1\right)\\
t_1 := 1.061405429 \cdot {t\_0}^{-5}\\
t_2 := \sqrt[3]{\mathsf{fma}\left(1.421413741, {t\_0}^{-3}, t\_1\right)}\\
t_3 := \sqrt{\mathsf{fma}\left(1.453152027, {t\_0}^{-4}, \mathsf{fma}\left(0.284496736, {t\_0}^{-2}, 1\right)\right) - \frac{0.254829592}{t\_0}}\\
t_4 := {t\_2}^{2}\\
\mathbf{if}\;\left|x\_m\right| \leq 2 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(t\_3, t\_3, t\_4 \cdot \left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\sqrt{t\_0}\right)}^{-6}, t\_1\right)}\right)\right) + \mathsf{fma}\left(-t\_2, t\_4, t\_2 \cdot t\_4\right)\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x\_m}^{2}}}}{1 + x\_m \cdot 0.3275911}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 x) < 2.00000000000000007e-10

    1. Initial program 57.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. Simplified57.6%

      \[\leadsto \color{blue}{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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 55.3%

      \[\leadsto \color{blue}{\left(1 + \left(0.284496736 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}} + 1.453152027 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{4}}\right)\right) - \left(0.254829592 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|} + \left(1.061405429 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{5}} + 1.421413741 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{3}}\right)\right)} \]
    5. Step-by-step derivation
      1. associate--r+55.3%

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

      \[\leadsto \color{blue}{\left(\left(\left(1 + \frac{0.284496736}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}}\right) + \frac{1.453152027}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{4}}\right) - \frac{0.254829592}{1 + 0.3275911 \cdot \left|x\right|}\right) - \left(\frac{1.061405429}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{5}} + \frac{1.421413741}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{3}}\right)} \]
    7. Applied egg-rr61.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}, {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}, \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right)} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt61.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\color{blue}{\left(\sqrt{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)} \cdot \sqrt{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}, {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}, \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) \]
      2. unpow-prod-down61.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, \color{blue}{{\left(\sqrt{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}^{-3} \cdot {\left(\sqrt{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}^{-3}}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}, {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}, \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) \]
    9. Applied egg-rr61.8%

      \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, \color{blue}{{\left(\sqrt{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}^{-3} \cdot {\left(\sqrt{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}^{-3}}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}, {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}, \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) \]
    10. Step-by-step derivation
      1. pow-sqr61.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, \color{blue}{{\left(\sqrt{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}^{\left(2 \cdot -3\right)}}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}, {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}, \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) \]
      2. metadata-eval61.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\sqrt{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}\right)}^{\color{blue}{-6}}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}, {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}, \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) \]
    11. Simplified61.8%

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

    if 2.00000000000000007e-10 < (fabs.f64 x)

    1. Initial program 99.0%

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

      \[\leadsto \color{blue}{\mathsf{fma}\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)}, \frac{{\left(e^{x}\right)}^{\left(-x\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}, 1\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 99.1%

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

      \[\leadsto \color{blue}{1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x}^{2}}}}{\mathsf{fma}\left(0.3275911, x, 1\right)}} \]
    6. Step-by-step derivation
      1. fma-udef97.6%

        \[\leadsto 1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x}^{2}}}}{\color{blue}{0.3275911 \cdot x + 1}} \]
    7. Applied egg-rr97.6%

      \[\leadsto 1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x}^{2}}}}{\color{blue}{0.3275911 \cdot x + 1}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.8%

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

Alternative 2: 80.9% accurate, 0.1× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := \mathsf{fma}\left(0.3275911, \left|x\_m\right|, 1\right)\\ t_1 := \mathsf{fma}\left(1.421413741, {t\_0}^{-3}, 1.061405429 \cdot {t\_0}^{-5}\right)\\ t_2 := \sqrt[3]{t\_1}\\ t_3 := -t\_2\\ t_4 := \sqrt{\mathsf{fma}\left(1.453152027, {t\_0}^{-4}, \mathsf{fma}\left(0.284496736, {t\_0}^{-2}, 1\right)\right) - \frac{0.254829592}{t\_0}}\\ t_5 := {t\_2}^{2}\\ \mathbf{if}\;\left|x\_m\right| \leq 2 \cdot 10^{-16}:\\ \;\;\;\;\mathsf{fma}\left(t\_4, t\_4, t\_5 \cdot t\_3\right) + \mathsf{fma}\left(t\_3, t\_5, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x\_m}^{2}}}}{1 + x\_m \cdot 0.3275911}\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m)
 :precision binary64
 (let* ((t_0 (fma 0.3275911 (fabs x_m) 1.0))
        (t_1 (fma 1.421413741 (pow t_0 -3.0) (* 1.061405429 (pow t_0 -5.0))))
        (t_2 (cbrt t_1))
        (t_3 (- t_2))
        (t_4
         (sqrt
          (-
           (fma
            1.453152027
            (pow t_0 -4.0)
            (fma 0.284496736 (pow t_0 -2.0) 1.0))
           (/ 0.254829592 t_0))))
        (t_5 (pow t_2 2.0)))
   (if (<= (fabs x_m) 2e-16)
     (+ (fma t_4 t_4 (* t_5 t_3)) (fma t_3 t_5 t_1))
     (+
      1.0
      (/
       (/
        (+
         (/ 0.284496736 (fma 0.3275911 x_m 1.0))
         (+
          (/ 1.453152027 (pow (fma 0.3275911 x_m 1.0) 3.0))
          (-
           -0.254829592
           (+
            (/ 1.061405429 (pow (fma 0.3275911 x_m 1.0) 4.0))
            (/ 1.421413741 (pow (fma 0.3275911 x_m 1.0) 2.0))))))
        (exp (pow x_m 2.0)))
       (+ 1.0 (* x_m 0.3275911)))))))
x_m = fabs(x);
double code(double x_m) {
	double t_0 = fma(0.3275911, fabs(x_m), 1.0);
	double t_1 = fma(1.421413741, pow(t_0, -3.0), (1.061405429 * pow(t_0, -5.0)));
	double t_2 = cbrt(t_1);
	double t_3 = -t_2;
	double t_4 = sqrt((fma(1.453152027, pow(t_0, -4.0), fma(0.284496736, pow(t_0, -2.0), 1.0)) - (0.254829592 / t_0)));
	double t_5 = pow(t_2, 2.0);
	double tmp;
	if (fabs(x_m) <= 2e-16) {
		tmp = fma(t_4, t_4, (t_5 * t_3)) + fma(t_3, t_5, t_1);
	} else {
		tmp = 1.0 + ((((0.284496736 / fma(0.3275911, x_m, 1.0)) + ((1.453152027 / pow(fma(0.3275911, x_m, 1.0), 3.0)) + (-0.254829592 - ((1.061405429 / pow(fma(0.3275911, x_m, 1.0), 4.0)) + (1.421413741 / pow(fma(0.3275911, x_m, 1.0), 2.0)))))) / exp(pow(x_m, 2.0))) / (1.0 + (x_m * 0.3275911)));
	}
	return tmp;
}
x_m = abs(x)
function code(x_m)
	t_0 = fma(0.3275911, abs(x_m), 1.0)
	t_1 = fma(1.421413741, (t_0 ^ -3.0), Float64(1.061405429 * (t_0 ^ -5.0)))
	t_2 = cbrt(t_1)
	t_3 = Float64(-t_2)
	t_4 = sqrt(Float64(fma(1.453152027, (t_0 ^ -4.0), fma(0.284496736, (t_0 ^ -2.0), 1.0)) - Float64(0.254829592 / t_0)))
	t_5 = t_2 ^ 2.0
	tmp = 0.0
	if (abs(x_m) <= 2e-16)
		tmp = Float64(fma(t_4, t_4, Float64(t_5 * t_3)) + fma(t_3, t_5, t_1));
	else
		tmp = Float64(1.0 + Float64(Float64(Float64(Float64(0.284496736 / fma(0.3275911, x_m, 1.0)) + Float64(Float64(1.453152027 / (fma(0.3275911, x_m, 1.0) ^ 3.0)) + Float64(-0.254829592 - Float64(Float64(1.061405429 / (fma(0.3275911, x_m, 1.0) ^ 4.0)) + Float64(1.421413741 / (fma(0.3275911, x_m, 1.0) ^ 2.0)))))) / exp((x_m ^ 2.0))) / Float64(1.0 + Float64(x_m * 0.3275911))));
	end
	return tmp
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[(0.3275911 * N[Abs[x$95$m], $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(1.421413741 * N[Power[t$95$0, -3.0], $MachinePrecision] + N[(1.061405429 * N[Power[t$95$0, -5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 1/3], $MachinePrecision]}, Block[{t$95$3 = (-t$95$2)}, Block[{t$95$4 = N[Sqrt[N[(N[(1.453152027 * N[Power[t$95$0, -4.0], $MachinePrecision] + N[(0.284496736 * N[Power[t$95$0, -2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] - N[(0.254829592 / t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Power[t$95$2, 2.0], $MachinePrecision]}, If[LessEqual[N[Abs[x$95$m], $MachinePrecision], 2e-16], N[(N[(t$95$4 * t$95$4 + N[(t$95$5 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * t$95$5 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(N[(0.284496736 / N[(0.3275911 * x$95$m + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.453152027 / N[Power[N[(0.3275911 * x$95$m + 1.0), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] + N[(-0.254829592 - N[(N[(1.061405429 / N[Power[N[(0.3275911 * x$95$m + 1.0), $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision] + N[(1.421413741 / N[Power[N[(0.3275911 * x$95$m + 1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Exp[N[Power[x$95$m, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(x$95$m * 0.3275911), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(0.3275911, \left|x\_m\right|, 1\right)\\
t_1 := \mathsf{fma}\left(1.421413741, {t\_0}^{-3}, 1.061405429 \cdot {t\_0}^{-5}\right)\\
t_2 := \sqrt[3]{t\_1}\\
t_3 := -t\_2\\
t_4 := \sqrt{\mathsf{fma}\left(1.453152027, {t\_0}^{-4}, \mathsf{fma}\left(0.284496736, {t\_0}^{-2}, 1\right)\right) - \frac{0.254829592}{t\_0}}\\
t_5 := {t\_2}^{2}\\
\mathbf{if}\;\left|x\_m\right| \leq 2 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(t\_4, t\_4, t\_5 \cdot t\_3\right) + \mathsf{fma}\left(t\_3, t\_5, t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x\_m}^{2}}}}{1 + x\_m \cdot 0.3275911}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fabs.f64 x) < 2e-16

    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 - \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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 55.4%

      \[\leadsto \color{blue}{\left(1 + \left(0.284496736 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}} + 1.453152027 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{4}}\right)\right) - \left(0.254829592 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|} + \left(1.061405429 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{5}} + 1.421413741 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{3}}\right)\right)} \]
    5. Step-by-step derivation
      1. associate--r+55.4%

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

      \[\leadsto \color{blue}{\left(\left(\left(1 + \frac{0.284496736}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}}\right) + \frac{1.453152027}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{4}}\right) - \frac{0.254829592}{1 + 0.3275911 \cdot \left|x\right|}\right) - \left(\frac{1.061405429}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{5}} + \frac{1.421413741}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{3}}\right)} \]
    7. Applied egg-rr62.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}, {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}, \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right)} \]
    8. Step-by-step derivation
      1. fma-udef53.2%

        \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \color{blue}{\left(\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right) \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2} + \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right)} \]
      2. *-commutative53.2%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \left(\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right) \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2} + \color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)} \cdot \sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right) \]
      4. add-cube-cbrt53.2%

        \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \left(\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right) \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2} + \color{blue}{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right) \]
    9. Applied egg-rr53.2%

      \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \color{blue}{\left(\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right) \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2} + \mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)\right)} \]
    10. Step-by-step derivation
      1. fma-def62.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, \sqrt{\mathsf{fma}\left(1.453152027, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-4}, \mathsf{fma}\left(0.284496736, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-2}, 1\right)\right) - \frac{0.254829592}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}, -\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)} \cdot {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}\right) + \color{blue}{\mathsf{fma}\left(-\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}, {\left(\sqrt[3]{\mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)}\right)}^{2}, \mathsf{fma}\left(1.421413741, {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-3}, 1.061405429 \cdot {\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}^{-5}\right)\right)} \]
    11. Simplified62.0%

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

    if 2e-16 < (fabs.f64 x)

    1. Initial program 98.1%

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

      \[\leadsto \color{blue}{\mathsf{fma}\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)}, \frac{{\left(e^{x}\right)}^{\left(-x\right)}}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}, 1\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 98.1%

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

      \[\leadsto \color{blue}{1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x}^{2}}}}{\mathsf{fma}\left(0.3275911, x, 1\right)}} \]
    6. Step-by-step derivation
      1. fma-udef96.5%

        \[\leadsto 1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x}^{2}}}}{\color{blue}{0.3275911 \cdot x + 1}} \]
    7. Applied egg-rr96.5%

      \[\leadsto 1 + \frac{\frac{\frac{0.284496736}{\mathsf{fma}\left(0.3275911, x, 1\right)} + \left(\frac{1.453152027}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{3}} + \left(-0.254829592 - \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{4}} + \frac{1.421413741}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}}\right)\right)\right)}{e^{{x}^{2}}}}{\color{blue}{0.3275911 \cdot x + 1}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.7%

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

Alternative 3: 78.8% accurate, 0.8× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := \mathsf{fma}\left(0.3275911, \left|x\_m\right|, 1\right)\\ 1 - e^{-{x\_m}^{2}} \cdot \frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)}}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)}}{t\_0}}{t\_0}}{t\_0} \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m)
 :precision binary64
 (let* ((t_0 (fma 0.3275911 (fabs x_m) 1.0)))
   (-
    1.0
    (*
     (exp (- (pow x_m 2.0)))
     (/
      (+
       0.254829592
       (/
        (+
         -0.284496736
         (/
          (+
           1.421413741
           (/
            (+ -1.453152027 (/ 1.061405429 (fma 0.3275911 x_m 1.0)))
            (fma 0.3275911 x_m 1.0)))
          t_0))
        t_0))
      t_0)))))
x_m = fabs(x);
double code(double x_m) {
	double t_0 = fma(0.3275911, fabs(x_m), 1.0);
	return 1.0 - (exp(-pow(x_m, 2.0)) * ((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / fma(0.3275911, x_m, 1.0))) / fma(0.3275911, x_m, 1.0))) / t_0)) / t_0)) / t_0));
}
x_m = abs(x)
function code(x_m)
	t_0 = fma(0.3275911, abs(x_m), 1.0)
	return Float64(1.0 - Float64(exp(Float64(-(x_m ^ 2.0))) * Float64(Float64(0.254829592 + Float64(Float64(-0.284496736 + Float64(Float64(1.421413741 + Float64(Float64(-1.453152027 + Float64(1.061405429 / fma(0.3275911, x_m, 1.0))) / fma(0.3275911, x_m, 1.0))) / t_0)) / t_0)) / t_0)))
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[(0.3275911 * N[Abs[x$95$m], $MachinePrecision] + 1.0), $MachinePrecision]}, N[(1.0 - N[(N[Exp[(-N[Power[x$95$m, 2.0], $MachinePrecision])], $MachinePrecision] * N[(N[(0.254829592 + N[(N[(-0.284496736 + N[(N[(1.421413741 + N[(N[(-1.453152027 + N[(1.061405429 / N[(0.3275911 * x$95$m + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.3275911 * x$95$m + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(0.3275911, \left|x\_m\right|, 1\right)\\
1 - e^{-{x\_m}^{2}} \cdot \frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)}}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)}}{t\_0}}{t\_0}}{t\_0}
\end{array}
\end{array}
Derivation
  1. Initial program 79.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. Simplified79.6%

    \[\leadsto \color{blue}{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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. associate-*l/79.6%

      \[\leadsto 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 + \color{blue}{\frac{1 \cdot \left(-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)}{1 + 0.3275911 \cdot \left|x\right|}}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. *-un-lft-identity79.6%

      \[\leadsto 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{\color{blue}{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. +-commutative79.6%

      \[\leadsto 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.453152027 + \frac{1.061405429}{\color{blue}{0.3275911 \cdot \left|x\right| + 1}}}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. fma-udef79.6%

      \[\leadsto 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.453152027 + \frac{1.061405429}{\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. +-commutative79.6%

      \[\leadsto 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.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\color{blue}{0.3275911 \cdot \left|x\right| + 1}}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    6. fma-udef79.6%

      \[\leadsto 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.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    7. add-cube-cbrt76.9%

      \[\leadsto 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 \color{blue}{\left(\left(\sqrt[3]{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)}} \cdot \sqrt[3]{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)}}\right) \cdot \sqrt[3]{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)}}\right)}\right)\right)\right) \cdot e^{-x \cdot x} \]
    8. pow376.9%

      \[\leadsto 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 \color{blue}{{\left(\sqrt[3]{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)}}\right)}^{3}}\right)\right)\right) \cdot e^{-x \cdot x} \]
  5. Applied egg-rr76.2%

    \[\leadsto 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 \color{blue}{{\left(\sqrt[3]{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}\right)}^{3}}\right)\right)\right) \cdot e^{-x \cdot x} \]
  6. Applied egg-rr79.0%

    \[\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, \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) \cdot e^{-{x}^{2}}} \]
  7. Step-by-step derivation
    1. cancel-sign-sub-inv79.0%

      \[\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, \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 e^{-{x}^{2}}} \]
    2. *-commutative79.0%

      \[\leadsto 1 - \color{blue}{e^{-{x}^{2}} \cdot \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, \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)}} \]
  8. Simplified79.0%

    \[\leadsto \color{blue}{1 - e^{-{x}^{2}} \cdot \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, \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)}} \]
  9. Final simplification79.0%

    \[\leadsto 1 - e^{-{x}^{2}} \cdot \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, \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)} \]
  10. Add Preprocessing

Alternative 4: 78.8% accurate, 1.1× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := \frac{1}{1 + \left|x\_m\right| \cdot 0.3275911}\\ 1 - \left(t\_0 \cdot \left(0.254829592 + t\_0 \cdot \left(-0.284496736 + t\_0 \cdot \left(1.421413741 + t\_0 \cdot \left(-1.453152027 + \frac{1.061405429}{1 + \log \left(1 + \mathsf{expm1}\left(x\_m \cdot 0.3275911\right)\right)}\right)\right)\right)\right)\right) \cdot e^{x\_m \cdot \left(-x\_m\right)} \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m)
 :precision binary64
 (let* ((t_0 (/ 1.0 (+ 1.0 (* (fabs x_m) 0.3275911)))))
   (-
    1.0
    (*
     (*
      t_0
      (+
       0.254829592
       (*
        t_0
        (+
         -0.284496736
         (*
          t_0
          (+
           1.421413741
           (*
            t_0
            (+
             -1.453152027
             (/
              1.061405429
              (+ 1.0 (log (+ 1.0 (expm1 (* x_m 0.3275911))))))))))))))
     (exp (* x_m (- x_m)))))))
x_m = fabs(x);
double code(double x_m) {
	double t_0 = 1.0 / (1.0 + (fabs(x_m) * 0.3275911));
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (1.061405429 / (1.0 + log((1.0 + expm1((x_m * 0.3275911)))))))))))))) * exp((x_m * -x_m)));
}
x_m = Math.abs(x);
public static double code(double x_m) {
	double t_0 = 1.0 / (1.0 + (Math.abs(x_m) * 0.3275911));
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (1.061405429 / (1.0 + Math.log((1.0 + Math.expm1((x_m * 0.3275911)))))))))))))) * Math.exp((x_m * -x_m)));
}
x_m = math.fabs(x)
def code(x_m):
	t_0 = 1.0 / (1.0 + (math.fabs(x_m) * 0.3275911))
	return 1.0 - ((t_0 * (0.254829592 + (t_0 * (-0.284496736 + (t_0 * (1.421413741 + (t_0 * (-1.453152027 + (1.061405429 / (1.0 + math.log((1.0 + math.expm1((x_m * 0.3275911)))))))))))))) * math.exp((x_m * -x_m)))
x_m = abs(x)
function code(x_m)
	t_0 = Float64(1.0 / Float64(1.0 + Float64(abs(x_m) * 0.3275911)))
	return Float64(1.0 - Float64(Float64(t_0 * Float64(0.254829592 + Float64(t_0 * Float64(-0.284496736 + Float64(t_0 * Float64(1.421413741 + Float64(t_0 * Float64(-1.453152027 + Float64(1.061405429 / Float64(1.0 + log(Float64(1.0 + expm1(Float64(x_m * 0.3275911)))))))))))))) * exp(Float64(x_m * Float64(-x_m)))))
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[(1.0 / N[(1.0 + N[(N[Abs[x$95$m], $MachinePrecision] * 0.3275911), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(1.0 - N[(N[(t$95$0 * N[(0.254829592 + N[(t$95$0 * N[(-0.284496736 + N[(t$95$0 * N[(1.421413741 + N[(t$95$0 * N[(-1.453152027 + N[(1.061405429 / N[(1.0 + N[Log[N[(1.0 + N[(Exp[N[(x$95$m * 0.3275911), $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Exp[N[(x$95$m * (-x$95$m)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
t_0 := \frac{1}{1 + \left|x\_m\right| \cdot 0.3275911}\\
1 - \left(t\_0 \cdot \left(0.254829592 + t\_0 \cdot \left(-0.284496736 + t\_0 \cdot \left(1.421413741 + t\_0 \cdot \left(-1.453152027 + \frac{1.061405429}{1 + \log \left(1 + \mathsf{expm1}\left(x\_m \cdot 0.3275911\right)\right)}\right)\right)\right)\right)\right) \cdot e^{x\_m \cdot \left(-x\_m\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 79.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. Simplified79.6%

    \[\leadsto \color{blue}{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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. log1p-expm1-u78.9%

      \[\leadsto 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 + \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(0.3275911 \cdot \left|x\right|\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. log1p-udef78.9%

      \[\leadsto 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 + \color{blue}{\log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot \left|x\right|\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. add-sqr-sqrt40.9%

      \[\leadsto 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 + \log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. fabs-sqr40.9%

      \[\leadsto 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 + \log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. add-sqr-sqrt78.7%

      \[\leadsto 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 + \log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot \color{blue}{x}\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  5. Applied egg-rr78.9%

    \[\leadsto 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.061405429}{1 + \color{blue}{\log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot x\right)\right)}}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  6. Final simplification78.9%

    \[\leadsto 1 - \left(\frac{1}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(0.254829592 + \frac{1}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(-0.284496736 + \frac{1}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(1.421413741 + \frac{1}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(-1.453152027 + \frac{1.061405429}{1 + \log \left(1 + \mathsf{expm1}\left(x \cdot 0.3275911\right)\right)}\right)\right)\right)\right)\right) \cdot e^{x \cdot \left(-x\right)} \]
  7. Add Preprocessing

Alternative 5: 78.8% accurate, 1.1× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := 1 + \left|x\_m\right| \cdot 0.3275911\\ t_1 := \frac{1}{t\_0}\\ 1 + e^{x\_m \cdot \left(-x\_m\right)} \cdot \left(\left(0.254829592 + t\_1 \cdot \left(-0.284496736 + t\_1 \cdot \left(1.421413741 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{2}} + \frac{-1.453152027}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)}\right)\right)\right)\right) \cdot \frac{-1}{t\_0}\right) \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m)
 :precision binary64
 (let* ((t_0 (+ 1.0 (* (fabs x_m) 0.3275911))) (t_1 (/ 1.0 t_0)))
   (+
    1.0
    (*
     (exp (* x_m (- x_m)))
     (*
      (+
       0.254829592
       (*
        t_1
        (+
         -0.284496736
         (*
          t_1
          (+
           1.421413741
           (+
            (/ 1.061405429 (pow (fma 0.3275911 x_m 1.0) 2.0))
            (/ -1.453152027 (fma 0.3275911 x_m 1.0))))))))
      (/ -1.0 t_0))))))
x_m = fabs(x);
double code(double x_m) {
	double t_0 = 1.0 + (fabs(x_m) * 0.3275911);
	double t_1 = 1.0 / t_0;
	return 1.0 + (exp((x_m * -x_m)) * ((0.254829592 + (t_1 * (-0.284496736 + (t_1 * (1.421413741 + ((1.061405429 / pow(fma(0.3275911, x_m, 1.0), 2.0)) + (-1.453152027 / fma(0.3275911, x_m, 1.0)))))))) * (-1.0 / t_0)));
}
x_m = abs(x)
function code(x_m)
	t_0 = Float64(1.0 + Float64(abs(x_m) * 0.3275911))
	t_1 = Float64(1.0 / t_0)
	return Float64(1.0 + Float64(exp(Float64(x_m * Float64(-x_m))) * Float64(Float64(0.254829592 + Float64(t_1 * Float64(-0.284496736 + Float64(t_1 * Float64(1.421413741 + Float64(Float64(1.061405429 / (fma(0.3275911, x_m, 1.0) ^ 2.0)) + Float64(-1.453152027 / fma(0.3275911, x_m, 1.0)))))))) * Float64(-1.0 / t_0))))
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[(1.0 + N[(N[Abs[x$95$m], $MachinePrecision] * 0.3275911), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / t$95$0), $MachinePrecision]}, N[(1.0 + N[(N[Exp[N[(x$95$m * (-x$95$m)), $MachinePrecision]], $MachinePrecision] * N[(N[(0.254829592 + N[(t$95$1 * N[(-0.284496736 + N[(t$95$1 * N[(1.421413741 + N[(N[(1.061405429 / N[Power[N[(0.3275911 * x$95$m + 1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[(-1.453152027 / N[(0.3275911 * x$95$m + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
t_0 := 1 + \left|x\_m\right| \cdot 0.3275911\\
t_1 := \frac{1}{t\_0}\\
1 + e^{x\_m \cdot \left(-x\_m\right)} \cdot \left(\left(0.254829592 + t\_1 \cdot \left(-0.284496736 + t\_1 \cdot \left(1.421413741 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x\_m, 1\right)\right)}^{2}} + \frac{-1.453152027}{\mathsf{fma}\left(0.3275911, x\_m, 1\right)}\right)\right)\right)\right) \cdot \frac{-1}{t\_0}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 79.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. Simplified79.6%

    \[\leadsto \color{blue}{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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x}} \]
  3. Add Preprocessing
  4. Taylor expanded in x around 0 79.6%

    \[\leadsto 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 \color{blue}{\left(\left(1.421413741 + 1.061405429 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}}\right) - 1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)}\right)\right)\right) \cdot e^{-x \cdot x} \]
  5. Step-by-step derivation
    1. associate--l+79.6%

      \[\leadsto 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 \color{blue}{\left(1.421413741 + \left(1.061405429 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}} - 1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)}\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. sub-neg79.6%

      \[\leadsto 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 + \color{blue}{\left(1.061405429 \cdot \frac{1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. associate-*r/79.6%

      \[\leadsto 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 + \left(\color{blue}{\frac{1.061405429 \cdot 1}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. metadata-eval79.6%

      \[\leadsto 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 + \left(\frac{\color{blue}{1.061405429}}{{\left(1 + 0.3275911 \cdot \left|x\right|\right)}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. +-commutative79.6%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\color{blue}{\left(0.3275911 \cdot \left|x\right| + 1\right)}}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    6. fma-def79.6%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\color{blue}{\left(\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)\right)}}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    7. unpow179.6%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, \left|\color{blue}{{x}^{1}}\right|, 1\right)\right)}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    8. sqr-pow40.9%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, \left|\color{blue}{{x}^{\left(\frac{1}{2}\right)} \cdot {x}^{\left(\frac{1}{2}\right)}}\right|, 1\right)\right)}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    9. fabs-sqr40.9%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, \color{blue}{{x}^{\left(\frac{1}{2}\right)} \cdot {x}^{\left(\frac{1}{2}\right)}}, 1\right)\right)}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    10. sqr-pow78.7%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, \color{blue}{{x}^{1}}, 1\right)\right)}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    11. unpow178.7%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, \color{blue}{x}, 1\right)\right)}^{2}} + \left(-1.453152027 \cdot \frac{1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    12. associate-*r/78.7%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}} + \left(-\color{blue}{\frac{1.453152027 \cdot 1}{1 + 0.3275911 \cdot \left|x\right|}}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    13. metadata-eval78.7%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}} + \left(-\frac{\color{blue}{1.453152027}}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    14. distribute-neg-frac78.7%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}} + \color{blue}{\frac{-1.453152027}{1 + 0.3275911 \cdot \left|x\right|}}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    15. metadata-eval78.7%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}} + \frac{\color{blue}{-1.453152027}}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    16. +-commutative78.7%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}} + \frac{-1.453152027}{\color{blue}{0.3275911 \cdot \left|x\right| + 1}}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    17. fma-def78.7%

      \[\leadsto 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 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}} + \frac{-1.453152027}{\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  6. Simplified79.0%

    \[\leadsto 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 \color{blue}{\left(1.421413741 + \left(\frac{1.061405429}{{\left(\mathsf{fma}\left(0.3275911, x, 1\right)\right)}^{2}} + \frac{-1.453152027}{\mathsf{fma}\left(0.3275911, x, 1\right)}\right)\right)}\right)\right)\right) \cdot e^{-x \cdot x} \]
  7. Final simplification79.0%

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

Alternative 6: 78.8% accurate, 1.3× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := 1 + \left|x\_m\right| \cdot 0.3275911\\ t_1 := \frac{1}{t\_0}\\ 1 + e^{x\_m \cdot \left(-x\_m\right)} \cdot \left(t\_1 \cdot \left(t\_1 \cdot \left(\frac{1}{1 + \log \left(1 + \mathsf{expm1}\left(x\_m \cdot 0.3275911\right)\right)} \cdot \left(\left(-1.453152027 + \frac{1.061405429}{1 + x\_m \cdot 0.3275911}\right) \cdot \frac{-1}{t\_0} - 1.421413741\right) - -0.284496736\right) - 0.254829592\right)\right) \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m)
 :precision binary64
 (let* ((t_0 (+ 1.0 (* (fabs x_m) 0.3275911))) (t_1 (/ 1.0 t_0)))
   (+
    1.0
    (*
     (exp (* x_m (- x_m)))
     (*
      t_1
      (-
       (*
        t_1
        (-
         (*
          (/ 1.0 (+ 1.0 (log (+ 1.0 (expm1 (* x_m 0.3275911))))))
          (-
           (*
            (+ -1.453152027 (/ 1.061405429 (+ 1.0 (* x_m 0.3275911))))
            (/ -1.0 t_0))
           1.421413741))
         -0.284496736))
       0.254829592))))))
x_m = fabs(x);
double code(double x_m) {
	double t_0 = 1.0 + (fabs(x_m) * 0.3275911);
	double t_1 = 1.0 / t_0;
	return 1.0 + (exp((x_m * -x_m)) * (t_1 * ((t_1 * (((1.0 / (1.0 + log((1.0 + expm1((x_m * 0.3275911)))))) * (((-1.453152027 + (1.061405429 / (1.0 + (x_m * 0.3275911)))) * (-1.0 / t_0)) - 1.421413741)) - -0.284496736)) - 0.254829592)));
}
x_m = Math.abs(x);
public static double code(double x_m) {
	double t_0 = 1.0 + (Math.abs(x_m) * 0.3275911);
	double t_1 = 1.0 / t_0;
	return 1.0 + (Math.exp((x_m * -x_m)) * (t_1 * ((t_1 * (((1.0 / (1.0 + Math.log((1.0 + Math.expm1((x_m * 0.3275911)))))) * (((-1.453152027 + (1.061405429 / (1.0 + (x_m * 0.3275911)))) * (-1.0 / t_0)) - 1.421413741)) - -0.284496736)) - 0.254829592)));
}
x_m = math.fabs(x)
def code(x_m):
	t_0 = 1.0 + (math.fabs(x_m) * 0.3275911)
	t_1 = 1.0 / t_0
	return 1.0 + (math.exp((x_m * -x_m)) * (t_1 * ((t_1 * (((1.0 / (1.0 + math.log((1.0 + math.expm1((x_m * 0.3275911)))))) * (((-1.453152027 + (1.061405429 / (1.0 + (x_m * 0.3275911)))) * (-1.0 / t_0)) - 1.421413741)) - -0.284496736)) - 0.254829592)))
x_m = abs(x)
function code(x_m)
	t_0 = Float64(1.0 + Float64(abs(x_m) * 0.3275911))
	t_1 = Float64(1.0 / t_0)
	return Float64(1.0 + Float64(exp(Float64(x_m * Float64(-x_m))) * Float64(t_1 * Float64(Float64(t_1 * Float64(Float64(Float64(1.0 / Float64(1.0 + log(Float64(1.0 + expm1(Float64(x_m * 0.3275911)))))) * Float64(Float64(Float64(-1.453152027 + Float64(1.061405429 / Float64(1.0 + Float64(x_m * 0.3275911)))) * Float64(-1.0 / t_0)) - 1.421413741)) - -0.284496736)) - 0.254829592))))
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[(1.0 + N[(N[Abs[x$95$m], $MachinePrecision] * 0.3275911), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / t$95$0), $MachinePrecision]}, N[(1.0 + N[(N[Exp[N[(x$95$m * (-x$95$m)), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[(N[(t$95$1 * N[(N[(N[(1.0 / N[(1.0 + N[Log[N[(1.0 + N[(Exp[N[(x$95$m * 0.3275911), $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(-1.453152027 + N[(1.061405429 / N[(1.0 + N[(x$95$m * 0.3275911), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision] - 1.421413741), $MachinePrecision]), $MachinePrecision] - -0.284496736), $MachinePrecision]), $MachinePrecision] - 0.254829592), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
t_0 := 1 + \left|x\_m\right| \cdot 0.3275911\\
t_1 := \frac{1}{t\_0}\\
1 + e^{x\_m \cdot \left(-x\_m\right)} \cdot \left(t\_1 \cdot \left(t\_1 \cdot \left(\frac{1}{1 + \log \left(1 + \mathsf{expm1}\left(x\_m \cdot 0.3275911\right)\right)} \cdot \left(\left(-1.453152027 + \frac{1.061405429}{1 + x\_m \cdot 0.3275911}\right) \cdot \frac{-1}{t\_0} - 1.421413741\right) - -0.284496736\right) - 0.254829592\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 79.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. Simplified79.6%

    \[\leadsto \color{blue}{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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. expm1-log1p-u78.2%

      \[\leadsto 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 + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3275911 \cdot \left|x\right|\right)\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. expm1-udef78.2%

      \[\leadsto 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 + \color{blue}{\left(e^{\mathsf{log1p}\left(0.3275911 \cdot \left|x\right|\right)} - 1\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. log1p-udef78.2%

      \[\leadsto 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 + \left(e^{\color{blue}{\log \left(1 + 0.3275911 \cdot \left|x\right|\right)}} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. add-exp-log78.2%

      \[\leadsto 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 + \left(\color{blue}{\left(1 + 0.3275911 \cdot \left|x\right|\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. +-commutative78.2%

      \[\leadsto 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 + \left(\color{blue}{\left(0.3275911 \cdot \left|x\right| + 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    6. fma-udef78.2%

      \[\leadsto 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 + \left(\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    7. add-sqr-sqrt40.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    8. fabs-sqr40.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \color{blue}{\sqrt{x} \cdot \sqrt{x}}, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    9. add-sqr-sqrt78.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \color{blue}{x}, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  5. Applied egg-rr78.9%

    \[\leadsto 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.061405429}{1 + \color{blue}{\left(\mathsf{fma}\left(0.3275911, x, 1\right) - 1\right)}}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  6. Step-by-step derivation
    1. fma-udef78.1%

      \[\leadsto 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 + \left(\color{blue}{\left(0.3275911 \cdot x + 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. associate--l+78.1%

      \[\leadsto 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 + \color{blue}{\left(0.3275911 \cdot x + \left(1 - 1\right)\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. metadata-eval78.1%

      \[\leadsto 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 + \left(0.3275911 \cdot x + \color{blue}{0}\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. +-rgt-identity78.1%

      \[\leadsto 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 + \color{blue}{0.3275911 \cdot x}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  7. Simplified78.9%

    \[\leadsto 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.061405429}{1 + \color{blue}{0.3275911 \cdot x}}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  8. Step-by-step derivation
    1. log1p-expm1-u78.9%

      \[\leadsto 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 + \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(0.3275911 \cdot \left|x\right|\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. log1p-udef78.9%

      \[\leadsto 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 + \color{blue}{\log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot \left|x\right|\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. add-sqr-sqrt40.9%

      \[\leadsto 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 + \log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. fabs-sqr40.9%

      \[\leadsto 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 + \log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. add-sqr-sqrt78.7%

      \[\leadsto 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 + \log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot \color{blue}{x}\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  9. Applied egg-rr78.7%

    \[\leadsto 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 + \color{blue}{\log \left(1 + \mathsf{expm1}\left(0.3275911 \cdot x\right)\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 x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  10. Final simplification78.7%

    \[\leadsto 1 + e^{x \cdot \left(-x\right)} \cdot \left(\frac{1}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(\frac{1}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(\frac{1}{1 + \log \left(1 + \mathsf{expm1}\left(x \cdot 0.3275911\right)\right)} \cdot \left(\left(-1.453152027 + \frac{1.061405429}{1 + x \cdot 0.3275911}\right) \cdot \frac{-1}{1 + \left|x\right| \cdot 0.3275911} - 1.421413741\right) - -0.284496736\right) - 0.254829592\right)\right) \]
  11. Add Preprocessing

Alternative 7: 78.8% accurate, 1.9× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := 1 + x\_m \cdot 0.3275911\\ t_1 := 1 + \left|x\_m\right| \cdot 0.3275911\\ t_2 := \frac{1}{t\_1}\\ 1 + e^{x\_m \cdot \left(-x\_m\right)} \cdot \left(\left(0.254829592 + t\_2 \cdot \left(-0.284496736 + t\_2 \cdot \left(1.421413741 + \left(-1.453152027 + \frac{1.061405429}{t\_0}\right) \cdot \frac{1}{t\_0}\right)\right)\right) \cdot \frac{-1}{t\_1}\right) \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m)
 :precision binary64
 (let* ((t_0 (+ 1.0 (* x_m 0.3275911)))
        (t_1 (+ 1.0 (* (fabs x_m) 0.3275911)))
        (t_2 (/ 1.0 t_1)))
   (+
    1.0
    (*
     (exp (* x_m (- x_m)))
     (*
      (+
       0.254829592
       (*
        t_2
        (+
         -0.284496736
         (*
          t_2
          (+
           1.421413741
           (* (+ -1.453152027 (/ 1.061405429 t_0)) (/ 1.0 t_0)))))))
      (/ -1.0 t_1))))))
x_m = fabs(x);
double code(double x_m) {
	double t_0 = 1.0 + (x_m * 0.3275911);
	double t_1 = 1.0 + (fabs(x_m) * 0.3275911);
	double t_2 = 1.0 / t_1;
	return 1.0 + (exp((x_m * -x_m)) * ((0.254829592 + (t_2 * (-0.284496736 + (t_2 * (1.421413741 + ((-1.453152027 + (1.061405429 / t_0)) * (1.0 / t_0))))))) * (-1.0 / t_1)));
}
x_m = abs(x)
real(8) function code(x_m)
    real(8), intent (in) :: x_m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    t_0 = 1.0d0 + (x_m * 0.3275911d0)
    t_1 = 1.0d0 + (abs(x_m) * 0.3275911d0)
    t_2 = 1.0d0 / t_1
    code = 1.0d0 + (exp((x_m * -x_m)) * ((0.254829592d0 + (t_2 * ((-0.284496736d0) + (t_2 * (1.421413741d0 + (((-1.453152027d0) + (1.061405429d0 / t_0)) * (1.0d0 / t_0))))))) * ((-1.0d0) / t_1)))
end function
x_m = Math.abs(x);
public static double code(double x_m) {
	double t_0 = 1.0 + (x_m * 0.3275911);
	double t_1 = 1.0 + (Math.abs(x_m) * 0.3275911);
	double t_2 = 1.0 / t_1;
	return 1.0 + (Math.exp((x_m * -x_m)) * ((0.254829592 + (t_2 * (-0.284496736 + (t_2 * (1.421413741 + ((-1.453152027 + (1.061405429 / t_0)) * (1.0 / t_0))))))) * (-1.0 / t_1)));
}
x_m = math.fabs(x)
def code(x_m):
	t_0 = 1.0 + (x_m * 0.3275911)
	t_1 = 1.0 + (math.fabs(x_m) * 0.3275911)
	t_2 = 1.0 / t_1
	return 1.0 + (math.exp((x_m * -x_m)) * ((0.254829592 + (t_2 * (-0.284496736 + (t_2 * (1.421413741 + ((-1.453152027 + (1.061405429 / t_0)) * (1.0 / t_0))))))) * (-1.0 / t_1)))
x_m = abs(x)
function code(x_m)
	t_0 = Float64(1.0 + Float64(x_m * 0.3275911))
	t_1 = Float64(1.0 + Float64(abs(x_m) * 0.3275911))
	t_2 = Float64(1.0 / t_1)
	return Float64(1.0 + Float64(exp(Float64(x_m * Float64(-x_m))) * Float64(Float64(0.254829592 + Float64(t_2 * Float64(-0.284496736 + Float64(t_2 * Float64(1.421413741 + Float64(Float64(-1.453152027 + Float64(1.061405429 / t_0)) * Float64(1.0 / t_0))))))) * Float64(-1.0 / t_1))))
end
x_m = abs(x);
function tmp = code(x_m)
	t_0 = 1.0 + (x_m * 0.3275911);
	t_1 = 1.0 + (abs(x_m) * 0.3275911);
	t_2 = 1.0 / t_1;
	tmp = 1.0 + (exp((x_m * -x_m)) * ((0.254829592 + (t_2 * (-0.284496736 + (t_2 * (1.421413741 + ((-1.453152027 + (1.061405429 / t_0)) * (1.0 / t_0))))))) * (-1.0 / t_1)));
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[(1.0 + N[(x$95$m * 0.3275911), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(N[Abs[x$95$m], $MachinePrecision] * 0.3275911), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / t$95$1), $MachinePrecision]}, N[(1.0 + N[(N[Exp[N[(x$95$m * (-x$95$m)), $MachinePrecision]], $MachinePrecision] * N[(N[(0.254829592 + N[(t$95$2 * N[(-0.284496736 + N[(t$95$2 * N[(1.421413741 + N[(N[(-1.453152027 + N[(1.061405429 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
t_0 := 1 + x\_m \cdot 0.3275911\\
t_1 := 1 + \left|x\_m\right| \cdot 0.3275911\\
t_2 := \frac{1}{t\_1}\\
1 + e^{x\_m \cdot \left(-x\_m\right)} \cdot \left(\left(0.254829592 + t\_2 \cdot \left(-0.284496736 + t\_2 \cdot \left(1.421413741 + \left(-1.453152027 + \frac{1.061405429}{t\_0}\right) \cdot \frac{1}{t\_0}\right)\right)\right) \cdot \frac{-1}{t\_1}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 79.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. Simplified79.6%

    \[\leadsto \color{blue}{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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. expm1-log1p-u78.2%

      \[\leadsto 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 + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3275911 \cdot \left|x\right|\right)\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. expm1-udef78.2%

      \[\leadsto 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 + \color{blue}{\left(e^{\mathsf{log1p}\left(0.3275911 \cdot \left|x\right|\right)} - 1\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. log1p-udef78.2%

      \[\leadsto 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 + \left(e^{\color{blue}{\log \left(1 + 0.3275911 \cdot \left|x\right|\right)}} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. add-exp-log78.2%

      \[\leadsto 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 + \left(\color{blue}{\left(1 + 0.3275911 \cdot \left|x\right|\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. +-commutative78.2%

      \[\leadsto 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 + \left(\color{blue}{\left(0.3275911 \cdot \left|x\right| + 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    6. fma-udef78.2%

      \[\leadsto 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 + \left(\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    7. add-sqr-sqrt40.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    8. fabs-sqr40.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \color{blue}{\sqrt{x} \cdot \sqrt{x}}, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    9. add-sqr-sqrt78.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \color{blue}{x}, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  5. Applied egg-rr78.9%

    \[\leadsto 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.061405429}{1 + \color{blue}{\left(\mathsf{fma}\left(0.3275911, x, 1\right) - 1\right)}}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  6. Step-by-step derivation
    1. fma-udef78.1%

      \[\leadsto 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 + \left(\color{blue}{\left(0.3275911 \cdot x + 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. associate--l+78.1%

      \[\leadsto 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 + \color{blue}{\left(0.3275911 \cdot x + \left(1 - 1\right)\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. metadata-eval78.1%

      \[\leadsto 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 + \left(0.3275911 \cdot x + \color{blue}{0}\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. +-rgt-identity78.1%

      \[\leadsto 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 + \color{blue}{0.3275911 \cdot x}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  7. Simplified78.9%

    \[\leadsto 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.061405429}{1 + \color{blue}{0.3275911 \cdot x}}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  8. Step-by-step derivation
    1. expm1-log1p-u78.2%

      \[\leadsto 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 + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3275911 \cdot \left|x\right|\right)\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. expm1-udef78.2%

      \[\leadsto 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 + \color{blue}{\left(e^{\mathsf{log1p}\left(0.3275911 \cdot \left|x\right|\right)} - 1\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. log1p-udef78.2%

      \[\leadsto 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 + \left(e^{\color{blue}{\log \left(1 + 0.3275911 \cdot \left|x\right|\right)}} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. add-exp-log78.2%

      \[\leadsto 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 + \left(\color{blue}{\left(1 + 0.3275911 \cdot \left|x\right|\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. +-commutative78.2%

      \[\leadsto 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 + \left(\color{blue}{\left(0.3275911 \cdot \left|x\right| + 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    6. fma-udef78.2%

      \[\leadsto 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 + \left(\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    7. add-sqr-sqrt40.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    8. fabs-sqr40.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \color{blue}{\sqrt{x} \cdot \sqrt{x}}, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    9. add-sqr-sqrt78.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \color{blue}{x}, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  9. Applied egg-rr79.0%

    \[\leadsto 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 + \color{blue}{\left(\mathsf{fma}\left(0.3275911, x, 1\right) - 1\right)}} \cdot \left(-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  10. Step-by-step derivation
    1. fma-udef78.1%

      \[\leadsto 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 + \left(\color{blue}{\left(0.3275911 \cdot x + 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. associate--l+78.1%

      \[\leadsto 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 + \color{blue}{\left(0.3275911 \cdot x + \left(1 - 1\right)\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. metadata-eval78.1%

      \[\leadsto 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 + \left(0.3275911 \cdot x + \color{blue}{0}\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. +-rgt-identity78.1%

      \[\leadsto 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 + \color{blue}{0.3275911 \cdot x}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  11. Simplified79.0%

    \[\leadsto 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 + \color{blue}{0.3275911 \cdot x}} \cdot \left(-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot x}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
  12. Final simplification79.0%

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

Alternative 8: 77.8% accurate, 2.5× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ \begin{array}{l} t_0 := 1 + \left|x\_m\right| \cdot 0.3275911\\ 1 + e^{x\_m \cdot \left(-x\_m\right)} \cdot \left(\left(0.254829592 + \frac{1}{t\_0} \cdot \left(-0.284496736 + \frac{1}{1 + x\_m \cdot 0.3275911} \cdot 1.029667143\right)\right) \cdot \frac{-1}{t\_0}\right) \end{array} \end{array} \]
x_m = (fabs.f64 x)
(FPCore (x_m)
 :precision binary64
 (let* ((t_0 (+ 1.0 (* (fabs x_m) 0.3275911))))
   (+
    1.0
    (*
     (exp (* x_m (- x_m)))
     (*
      (+
       0.254829592
       (*
        (/ 1.0 t_0)
        (+ -0.284496736 (* (/ 1.0 (+ 1.0 (* x_m 0.3275911))) 1.029667143))))
      (/ -1.0 t_0))))))
x_m = fabs(x);
double code(double x_m) {
	double t_0 = 1.0 + (fabs(x_m) * 0.3275911);
	return 1.0 + (exp((x_m * -x_m)) * ((0.254829592 + ((1.0 / t_0) * (-0.284496736 + ((1.0 / (1.0 + (x_m * 0.3275911))) * 1.029667143)))) * (-1.0 / t_0)));
}
x_m = abs(x)
real(8) function code(x_m)
    real(8), intent (in) :: x_m
    real(8) :: t_0
    t_0 = 1.0d0 + (abs(x_m) * 0.3275911d0)
    code = 1.0d0 + (exp((x_m * -x_m)) * ((0.254829592d0 + ((1.0d0 / t_0) * ((-0.284496736d0) + ((1.0d0 / (1.0d0 + (x_m * 0.3275911d0))) * 1.029667143d0)))) * ((-1.0d0) / t_0)))
end function
x_m = Math.abs(x);
public static double code(double x_m) {
	double t_0 = 1.0 + (Math.abs(x_m) * 0.3275911);
	return 1.0 + (Math.exp((x_m * -x_m)) * ((0.254829592 + ((1.0 / t_0) * (-0.284496736 + ((1.0 / (1.0 + (x_m * 0.3275911))) * 1.029667143)))) * (-1.0 / t_0)));
}
x_m = math.fabs(x)
def code(x_m):
	t_0 = 1.0 + (math.fabs(x_m) * 0.3275911)
	return 1.0 + (math.exp((x_m * -x_m)) * ((0.254829592 + ((1.0 / t_0) * (-0.284496736 + ((1.0 / (1.0 + (x_m * 0.3275911))) * 1.029667143)))) * (-1.0 / t_0)))
x_m = abs(x)
function code(x_m)
	t_0 = Float64(1.0 + Float64(abs(x_m) * 0.3275911))
	return Float64(1.0 + Float64(exp(Float64(x_m * Float64(-x_m))) * Float64(Float64(0.254829592 + Float64(Float64(1.0 / t_0) * Float64(-0.284496736 + Float64(Float64(1.0 / Float64(1.0 + Float64(x_m * 0.3275911))) * 1.029667143)))) * Float64(-1.0 / t_0))))
end
x_m = abs(x);
function tmp = code(x_m)
	t_0 = 1.0 + (abs(x_m) * 0.3275911);
	tmp = 1.0 + (exp((x_m * -x_m)) * ((0.254829592 + ((1.0 / t_0) * (-0.284496736 + ((1.0 / (1.0 + (x_m * 0.3275911))) * 1.029667143)))) * (-1.0 / t_0)));
end
x_m = N[Abs[x], $MachinePrecision]
code[x$95$m_] := Block[{t$95$0 = N[(1.0 + N[(N[Abs[x$95$m], $MachinePrecision] * 0.3275911), $MachinePrecision]), $MachinePrecision]}, N[(1.0 + N[(N[Exp[N[(x$95$m * (-x$95$m)), $MachinePrecision]], $MachinePrecision] * N[(N[(0.254829592 + N[(N[(1.0 / t$95$0), $MachinePrecision] * N[(-0.284496736 + N[(N[(1.0 / N[(1.0 + N[(x$95$m * 0.3275911), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.029667143), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|

\\
\begin{array}{l}
t_0 := 1 + \left|x\_m\right| \cdot 0.3275911\\
1 + e^{x\_m \cdot \left(-x\_m\right)} \cdot \left(\left(0.254829592 + \frac{1}{t\_0} \cdot \left(-0.284496736 + \frac{1}{1 + x\_m \cdot 0.3275911} \cdot 1.029667143\right)\right) \cdot \frac{-1}{t\_0}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 79.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. Simplified79.6%

    \[\leadsto \color{blue}{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.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\right) \cdot e^{-x \cdot x}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. associate-*l/79.6%

      \[\leadsto 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 + \color{blue}{\frac{1 \cdot \left(-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}\right)}{1 + 0.3275911 \cdot \left|x\right|}}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. *-un-lft-identity79.6%

      \[\leadsto 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{\color{blue}{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. +-commutative79.6%

      \[\leadsto 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.453152027 + \frac{1.061405429}{\color{blue}{0.3275911 \cdot \left|x\right| + 1}}}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. fma-udef79.6%

      \[\leadsto 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.453152027 + \frac{1.061405429}{\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. +-commutative79.6%

      \[\leadsto 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.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\color{blue}{0.3275911 \cdot \left|x\right| + 1}}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    6. fma-udef79.6%

      \[\leadsto 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.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}{\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)}}\right)\right)\right)\right) \cdot e^{-x \cdot x} \]
    7. add-cube-cbrt76.9%

      \[\leadsto 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 \color{blue}{\left(\left(\sqrt[3]{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)}} \cdot \sqrt[3]{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)}}\right) \cdot \sqrt[3]{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)}}\right)}\right)\right)\right) \cdot e^{-x \cdot x} \]
    8. pow376.9%

      \[\leadsto 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 \color{blue}{{\left(\sqrt[3]{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)}}\right)}^{3}}\right)\right)\right) \cdot e^{-x \cdot x} \]
  5. Applied egg-rr76.2%

    \[\leadsto 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 \color{blue}{{\left(\sqrt[3]{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{\mathsf{fma}\left(0.3275911, x, 1\right)}}{\mathsf{fma}\left(0.3275911, x, 1\right)}}\right)}^{3}}\right)\right)\right) \cdot e^{-x \cdot x} \]
  6. Taylor expanded in x around 0 78.2%

    \[\leadsto 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 \color{blue}{1.029667143}\right)\right)\right) \cdot e^{-x \cdot x} \]
  7. Step-by-step derivation
    1. expm1-log1p-u78.2%

      \[\leadsto 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 + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.3275911 \cdot \left|x\right|\right)\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. expm1-udef78.2%

      \[\leadsto 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 + \color{blue}{\left(e^{\mathsf{log1p}\left(0.3275911 \cdot \left|x\right|\right)} - 1\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. log1p-udef78.2%

      \[\leadsto 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 + \left(e^{\color{blue}{\log \left(1 + 0.3275911 \cdot \left|x\right|\right)}} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. add-exp-log78.2%

      \[\leadsto 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 + \left(\color{blue}{\left(1 + 0.3275911 \cdot \left|x\right|\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    5. +-commutative78.2%

      \[\leadsto 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 + \left(\color{blue}{\left(0.3275911 \cdot \left|x\right| + 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    6. fma-udef78.2%

      \[\leadsto 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 + \left(\color{blue}{\mathsf{fma}\left(0.3275911, \left|x\right|, 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    7. add-sqr-sqrt40.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \left|\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right|, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    8. fabs-sqr40.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \color{blue}{\sqrt{x} \cdot \sqrt{x}}, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    9. add-sqr-sqrt78.1%

      \[\leadsto 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 + \left(\mathsf{fma}\left(0.3275911, \color{blue}{x}, 1\right) - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  8. Applied egg-rr78.1%

    \[\leadsto 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 + \color{blue}{\left(\mathsf{fma}\left(0.3275911, x, 1\right) - 1\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  9. Step-by-step derivation
    1. fma-udef78.1%

      \[\leadsto 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 + \left(\color{blue}{\left(0.3275911 \cdot x + 1\right)} - 1\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    2. associate--l+78.1%

      \[\leadsto 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 + \color{blue}{\left(0.3275911 \cdot x + \left(1 - 1\right)\right)}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    3. metadata-eval78.1%

      \[\leadsto 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 + \left(0.3275911 \cdot x + \color{blue}{0}\right)} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
    4. +-rgt-identity78.1%

      \[\leadsto 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 + \color{blue}{0.3275911 \cdot x}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  10. Simplified78.1%

    \[\leadsto 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 + \color{blue}{0.3275911 \cdot x}} \cdot 1.029667143\right)\right)\right) \cdot e^{-x \cdot x} \]
  11. Final simplification78.1%

    \[\leadsto 1 + e^{x \cdot \left(-x\right)} \cdot \left(\left(0.254829592 + \frac{1}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(-0.284496736 + \frac{1}{1 + x \cdot 0.3275911} \cdot 1.029667143\right)\right) \cdot \frac{-1}{1 + \left|x\right| \cdot 0.3275911}\right) \]
  12. Add Preprocessing

Reproduce

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