?

Average Error: 13.1 → 0.2
Time: 23.8s
Precision: binary64
Cost: 96580

?

\[1 - \left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(0.254829592 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-0.284496736 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1.421413741 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-1.453152027 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|} \]
\[\begin{array}{l} t_0 := 1 + 0.3275911 \cdot \left|x\right|\\ t_1 := \frac{1}{t_0}\\ t_2 := e^{x \cdot \left(-x\right)}\\ \mathbf{if}\;\left(t_1 \cdot \left(0.254829592 + t_1 \cdot \left(-0.284496736 + t_1 \cdot \left(1.421413741 + t_1 \cdot \left(-1.453152027 + t_1 \cdot 1.061405429\right)\right)\right)\right)\right) \cdot t_2 \leq 0.99995:\\ \;\;\;\;1 + t_1 \cdot \left(t_2 \cdot \left(-0.254829592 + t_1 \cdot \left(0.284496736 + t_1 \cdot \left(-1.421413741 + \log \left(e^{-1.453152027 + \frac{1.061405429}{t_0}}\right) \cdot \frac{-1}{t_0}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x \cdot x\right) \cdot 1.2732557730789702 + -1 \cdot 10^{-18}}{\sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)} + -1 \cdot 10^{-9}}\\ \end{array} \]
(FPCore (x)
 :precision binary64
 (-
  1.0
  (*
   (*
    (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
    (+
     0.254829592
     (*
      (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
      (+
       -0.284496736
       (*
        (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
        (+
         1.421413741
         (*
          (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
          (+
           -1.453152027
           (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) 1.061405429)))))))))
   (exp (- (* (fabs x) (fabs x)))))))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (+ 1.0 (* 0.3275911 (fabs x))))
        (t_1 (/ 1.0 t_0))
        (t_2 (exp (* x (- x)))))
   (if (<=
        (*
         (*
          t_1
          (+
           0.254829592
           (*
            t_1
            (+
             -0.284496736
             (*
              t_1
              (+ 1.421413741 (* t_1 (+ -1.453152027 (* t_1 1.061405429)))))))))
         t_2)
        0.99995)
     (+
      1.0
      (*
       t_1
       (*
        t_2
        (+
         -0.254829592
         (*
          t_1
          (+
           0.284496736
           (*
            t_1
            (+
             -1.421413741
             (*
              (log (exp (+ -1.453152027 (/ 1.061405429 t_0))))
              (/ -1.0 t_0))))))))))
     (/
      (+ (* (* x x) 1.2732557730789702) -1e-18)
      (+ (sqrt (* x (* x 1.2732557730789702))) -1e-9)))))
double code(double x) {
	return 1.0 - (((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * 1.061405429))))))))) * exp(-(fabs(x) * fabs(x))));
}
double code(double x) {
	double t_0 = 1.0 + (0.3275911 * fabs(x));
	double t_1 = 1.0 / t_0;
	double t_2 = exp((x * -x));
	double tmp;
	if (((t_1 * (0.254829592 + (t_1 * (-0.284496736 + (t_1 * (1.421413741 + (t_1 * (-1.453152027 + (t_1 * 1.061405429))))))))) * t_2) <= 0.99995) {
		tmp = 1.0 + (t_1 * (t_2 * (-0.254829592 + (t_1 * (0.284496736 + (t_1 * (-1.421413741 + (log(exp((-1.453152027 + (1.061405429 / t_0)))) * (-1.0 / t_0)))))))));
	} else {
		tmp = (((x * x) * 1.2732557730789702) + -1e-18) / (sqrt((x * (x * 1.2732557730789702))) + -1e-9);
	}
	return tmp;
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 1.0d0 - (((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * (0.254829592d0 + ((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * ((-0.284496736d0) + ((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * (1.421413741d0 + ((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * ((-1.453152027d0) + ((1.0d0 / (1.0d0 + (0.3275911d0 * abs(x)))) * 1.061405429d0))))))))) * exp(-(abs(x) * abs(x))))
end function
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = 1.0d0 + (0.3275911d0 * abs(x))
    t_1 = 1.0d0 / t_0
    t_2 = exp((x * -x))
    if (((t_1 * (0.254829592d0 + (t_1 * ((-0.284496736d0) + (t_1 * (1.421413741d0 + (t_1 * ((-1.453152027d0) + (t_1 * 1.061405429d0))))))))) * t_2) <= 0.99995d0) then
        tmp = 1.0d0 + (t_1 * (t_2 * ((-0.254829592d0) + (t_1 * (0.284496736d0 + (t_1 * ((-1.421413741d0) + (log(exp(((-1.453152027d0) + (1.061405429d0 / t_0)))) * ((-1.0d0) / t_0)))))))))
    else
        tmp = (((x * x) * 1.2732557730789702d0) + (-1d-18)) / (sqrt((x * (x * 1.2732557730789702d0))) + (-1d-9))
    end if
    code = tmp
end function
public static double code(double x) {
	return 1.0 - (((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * Math.abs(x)))) * 1.061405429))))))))) * Math.exp(-(Math.abs(x) * Math.abs(x))));
}
public static double code(double x) {
	double t_0 = 1.0 + (0.3275911 * Math.abs(x));
	double t_1 = 1.0 / t_0;
	double t_2 = Math.exp((x * -x));
	double tmp;
	if (((t_1 * (0.254829592 + (t_1 * (-0.284496736 + (t_1 * (1.421413741 + (t_1 * (-1.453152027 + (t_1 * 1.061405429))))))))) * t_2) <= 0.99995) {
		tmp = 1.0 + (t_1 * (t_2 * (-0.254829592 + (t_1 * (0.284496736 + (t_1 * (-1.421413741 + (Math.log(Math.exp((-1.453152027 + (1.061405429 / t_0)))) * (-1.0 / t_0)))))))));
	} else {
		tmp = (((x * x) * 1.2732557730789702) + -1e-18) / (Math.sqrt((x * (x * 1.2732557730789702))) + -1e-9);
	}
	return tmp;
}
def code(x):
	return 1.0 - (((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * math.fabs(x)))) * 1.061405429))))))))) * math.exp(-(math.fabs(x) * math.fabs(x))))
def code(x):
	t_0 = 1.0 + (0.3275911 * math.fabs(x))
	t_1 = 1.0 / t_0
	t_2 = math.exp((x * -x))
	tmp = 0
	if ((t_1 * (0.254829592 + (t_1 * (-0.284496736 + (t_1 * (1.421413741 + (t_1 * (-1.453152027 + (t_1 * 1.061405429))))))))) * t_2) <= 0.99995:
		tmp = 1.0 + (t_1 * (t_2 * (-0.254829592 + (t_1 * (0.284496736 + (t_1 * (-1.421413741 + (math.log(math.exp((-1.453152027 + (1.061405429 / t_0)))) * (-1.0 / t_0)))))))))
	else:
		tmp = (((x * x) * 1.2732557730789702) + -1e-18) / (math.sqrt((x * (x * 1.2732557730789702))) + -1e-9)
	return tmp
function code(x)
	return Float64(1.0 - Float64(Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(0.254829592 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(-0.284496736 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(1.421413741 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(-1.453152027 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * 1.061405429))))))))) * exp(Float64(-Float64(abs(x) * abs(x))))))
end
function code(x)
	t_0 = Float64(1.0 + Float64(0.3275911 * abs(x)))
	t_1 = Float64(1.0 / t_0)
	t_2 = exp(Float64(x * Float64(-x)))
	tmp = 0.0
	if (Float64(Float64(t_1 * Float64(0.254829592 + Float64(t_1 * Float64(-0.284496736 + Float64(t_1 * Float64(1.421413741 + Float64(t_1 * Float64(-1.453152027 + Float64(t_1 * 1.061405429))))))))) * t_2) <= 0.99995)
		tmp = Float64(1.0 + Float64(t_1 * Float64(t_2 * Float64(-0.254829592 + Float64(t_1 * Float64(0.284496736 + Float64(t_1 * Float64(-1.421413741 + Float64(log(exp(Float64(-1.453152027 + Float64(1.061405429 / t_0)))) * Float64(-1.0 / t_0))))))))));
	else
		tmp = Float64(Float64(Float64(Float64(x * x) * 1.2732557730789702) + -1e-18) / Float64(sqrt(Float64(x * Float64(x * 1.2732557730789702))) + -1e-9));
	end
	return tmp
end
function tmp = code(x)
	tmp = 1.0 - (((1.0 / (1.0 + (0.3275911 * abs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * abs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * abs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * abs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * abs(x)))) * 1.061405429))))))))) * exp(-(abs(x) * abs(x))));
end
function tmp_2 = code(x)
	t_0 = 1.0 + (0.3275911 * abs(x));
	t_1 = 1.0 / t_0;
	t_2 = exp((x * -x));
	tmp = 0.0;
	if (((t_1 * (0.254829592 + (t_1 * (-0.284496736 + (t_1 * (1.421413741 + (t_1 * (-1.453152027 + (t_1 * 1.061405429))))))))) * t_2) <= 0.99995)
		tmp = 1.0 + (t_1 * (t_2 * (-0.254829592 + (t_1 * (0.284496736 + (t_1 * (-1.421413741 + (log(exp((-1.453152027 + (1.061405429 / t_0)))) * (-1.0 / t_0)))))))));
	else
		tmp = (((x * x) * 1.2732557730789702) + -1e-18) / (sqrt((x * (x * 1.2732557730789702))) + -1e-9);
	end
	tmp_2 = tmp;
end
code[x_] := N[(1.0 - N[(N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.254829592 + N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.284496736 + N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.421413741 + N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.453152027 + N[(N[(1.0 / N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.061405429), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Exp[(-N[(N[Abs[x], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_] := Block[{t$95$0 = N[(1.0 + N[(0.3275911 * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(x * (-x)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(t$95$1 * N[(0.254829592 + N[(t$95$1 * N[(-0.284496736 + N[(t$95$1 * N[(1.421413741 + N[(t$95$1 * N[(-1.453152027 + N[(t$95$1 * 1.061405429), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], 0.99995], N[(1.0 + N[(t$95$1 * N[(t$95$2 * N[(-0.254829592 + N[(t$95$1 * N[(0.284496736 + N[(t$95$1 * N[(-1.421413741 + N[(N[Log[N[Exp[N[(-1.453152027 + N[(1.061405429 / t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * 1.2732557730789702), $MachinePrecision] + -1e-18), $MachinePrecision] / N[(N[Sqrt[N[(x * N[(x * 1.2732557730789702), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + -1e-9), $MachinePrecision]), $MachinePrecision]]]]]
1 - \left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(0.254829592 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-0.284496736 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1.421413741 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-1.453152027 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}
\begin{array}{l}
t_0 := 1 + 0.3275911 \cdot \left|x\right|\\
t_1 := \frac{1}{t_0}\\
t_2 := e^{x \cdot \left(-x\right)}\\
\mathbf{if}\;\left(t_1 \cdot \left(0.254829592 + t_1 \cdot \left(-0.284496736 + t_1 \cdot \left(1.421413741 + t_1 \cdot \left(-1.453152027 + t_1 \cdot 1.061405429\right)\right)\right)\right)\right) \cdot t_2 \leq 0.99995:\\
\;\;\;\;1 + t_1 \cdot \left(t_2 \cdot \left(-0.254829592 + t_1 \cdot \left(0.284496736 + t_1 \cdot \left(-1.421413741 + \log \left(e^{-1.453152027 + \frac{1.061405429}{t_0}}\right) \cdot \frac{-1}{t_0}\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(x \cdot x\right) \cdot 1.2732557730789702 + -1 \cdot 10^{-18}}{\sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)} + -1 \cdot 10^{-9}}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) (+.f64 31853699/125000000 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) (+.f64 -8890523/31250000 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) (+.f64 1421413741/1000000000 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) (+.f64 -1453152027/1000000000 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) 1061405429/1000000000))))))))) (exp.f64 (neg.f64 (*.f64 (fabs.f64 x) (fabs.f64 x))))) < 0.999950000000000006

    1. Initial program 0.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. Simplified0.1

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

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

      associate-*l* [=>]0.1

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

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

    if 0.999950000000000006 < (*.f64 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) (+.f64 31853699/125000000 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) (+.f64 -8890523/31250000 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) (+.f64 1421413741/1000000000 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) (+.f64 -1453152027/1000000000 (*.f64 (/.f64 1 (+.f64 1 (*.f64 3275911/10000000 (fabs.f64 x)))) 1061405429/1000000000))))))))) (exp.f64 (neg.f64 (*.f64 (fabs.f64 x) (fabs.f64 x)))))

    1. Initial program 27.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. Simplified27.0

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

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

      associate-*l/ [=>]27.0

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

      associate-*l/ [=>]27.0

      \[ 1 - \color{blue}{\frac{\left(1 \cdot \left(0.254829592 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-0.284496736 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1.421413741 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-1.453152027 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}}{1 + 0.3275911 \cdot \left|x\right|}} \]
    3. Applied egg-rr27.5

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

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

      [Start]27.5

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

      *-lft-identity [=>]27.5

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

      *-commutative [=>]27.5

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

      exp-prod [<=]27.5

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

      \[\leadsto \color{blue}{10^{-9} + 1.128386358070218 \cdot x} \]
    6. Applied egg-rr1.3

      \[\leadsto \color{blue}{\frac{1.2732557730789702 \cdot \left(x \cdot x\right) - 10^{-18}}{1.128386358070218 \cdot x - 10^{-9}}} \]
    7. Applied egg-rr0.3

      \[\leadsto \frac{1.2732557730789702 \cdot \left(x \cdot x\right) - 10^{-18}}{\color{blue}{\sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)}} - 10^{-9}} \]
    8. Simplified0.3

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

      [Start]0.3

      \[ \frac{1.2732557730789702 \cdot \left(x \cdot x\right) - 10^{-18}}{\sqrt{1.2732557730789702 \cdot \left(x \cdot x\right)} - 10^{-9}} \]

      *-commutative [=>]0.3

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

      associate-*l* [=>]0.3

      \[ \frac{1.2732557730789702 \cdot \left(x \cdot x\right) - 10^{-18}}{\sqrt{\color{blue}{x \cdot \left(x \cdot 1.2732557730789702\right)}} - 10^{-9}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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^{x \cdot \left(-x\right)} \leq 0.99995:\\ \;\;\;\;1 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(e^{x \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 + \log \left(e^{-1.453152027 + \frac{1.061405429}{1 + 0.3275911 \cdot \left|x\right|}}\right) \cdot \frac{-1}{1 + 0.3275911 \cdot \left|x\right|}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x \cdot x\right) \cdot 1.2732557730789702 + -1 \cdot 10^{-18}}{\sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)} + -1 \cdot 10^{-9}}\\ \end{array} \]

Alternatives

Alternative 1
Error0.3
Cost41412
\[\begin{array}{l} t_0 := 1 + 0.3275911 \cdot \left|x\right|\\ \mathbf{if}\;x \leq -1.3 \cdot 10^{-6}:\\ \;\;\;\;1 + \frac{\frac{-0.254829592 + \frac{0.284496736 - \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{t_0}}{t_0}}{t_0}}{t_0}}{e^{x \cdot x}}}{t_0}\\ \mathbf{elif}\;x \leq 0.88:\\ \;\;\;\;\frac{\left(x \cdot x\right) \cdot 1.2732557730789702 + -1 \cdot 10^{-18}}{\sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)} + -1 \cdot 10^{-9}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 2
Error0.4
Cost7624
\[\begin{array}{l} \mathbf{if}\;x \leq -0.9:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.88:\\ \;\;\;\;\frac{\left(x \cdot x\right) \cdot 1.2732557730789702 + -1 \cdot 10^{-18}}{\sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)} + -1 \cdot 10^{-9}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 3
Error0.4
Cost7112
\[\begin{array}{l} \mathbf{if}\;x \leq -0.9:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.88:\\ \;\;\;\;\sqrt{x \cdot \left(x \cdot 1.2732557730789702\right)} + 10^{-9}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 4
Error1.0
Cost6856
\[\begin{array}{l} \mathbf{if}\;x \leq -0.9:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{-10}:\\ \;\;\;\;\mathsf{fma}\left(x, -1.128386358070218, 10^{-9}\right)\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 5
Error0.9
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -9 \cdot 10^{-10}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 0.88:\\ \;\;\;\;10^{-9} + x \cdot 1.128386358070218\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 6
Error1.0
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -0.9:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{-10}:\\ \;\;\;\;10^{-9} + x \cdot -1.128386358070218\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 7
Error1.5
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -2.8 \cdot 10^{-5}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-5}:\\ \;\;\;\;10^{-9}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 8
Error30.5
Cost64
\[10^{-9} \]

Error

Reproduce?

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