?

Average Error: 79.3% → 98.7%
Time: 39.0s
Precision: binary64
Cost: 156484.00

?

\[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 := e^{x \cdot x}\\ t_1 := 1 + \left|x\right| \cdot 0.3275911\\ t_2 := \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{t_1}}{t_1}}{t_1}}{t_1}}{t_0}}{t_1}\\ \mathbf{if}\;\left|x\right| \leq 10^{-18}:\\ \;\;\;\;10^{-9}\\ \mathbf{else}:\\ \;\;\;\;\frac{\log \left(e^{1 - {\left(\frac{0.254829592 + \frac{-0.284496736 + \frac{\left(1.421413741 + 1.061405429 \cdot \frac{1}{{t_1}^{2}}\right) + 1.453152027 \cdot \frac{-1}{t_1}}{t_1}}{t_1}}{t_1 \cdot t_0}\right)}^{3}}\right)}{1 + t_2 \cdot \left(1 + t_2\right)}\\ \end{array} \]
(FPCore (x)
 :precision binary64
 (-
  1.0
  (*
   (*
    (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
    (+
     0.254829592
     (*
      (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
      (+
       -0.284496736
       (*
        (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
        (+
         1.421413741
         (*
          (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x))))
          (+
           -1.453152027
           (* (/ 1.0 (+ 1.0 (* 0.3275911 (fabs x)))) 1.061405429)))))))))
   (exp (- (* (fabs x) (fabs x)))))))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (exp (* x x)))
        (t_1 (+ 1.0 (* (fabs x) 0.3275911)))
        (t_2
         (/
          (/
           (+
            0.254829592
            (/
             (+
              -0.284496736
              (/
               (+ 1.421413741 (/ (+ -1.453152027 (/ 1.061405429 t_1)) t_1))
               t_1))
             t_1))
           t_0)
          t_1)))
   (if (<= (fabs x) 1e-18)
     1e-9
     (/
      (log
       (exp
        (-
         1.0
         (pow
          (/
           (+
            0.254829592
            (/
             (+
              -0.284496736
              (/
               (+
                (+ 1.421413741 (* 1.061405429 (/ 1.0 (pow t_1 2.0))))
                (* 1.453152027 (/ -1.0 t_1)))
               t_1))
             t_1))
           (* t_1 t_0))
          3.0))))
      (+ 1.0 (* t_2 (+ 1.0 t_2)))))))
double code(double x) {
	return 1.0 - (((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * 1.061405429))))))))) * exp(-(fabs(x) * fabs(x))));
}
double code(double x) {
	double t_0 = exp((x * x));
	double t_1 = 1.0 + (fabs(x) * 0.3275911);
	double t_2 = ((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / t_1)) / t_1)) / t_1)) / t_1)) / t_0) / t_1;
	double tmp;
	if (fabs(x) <= 1e-18) {
		tmp = 1e-9;
	} else {
		tmp = log(exp((1.0 - pow(((0.254829592 + ((-0.284496736 + (((1.421413741 + (1.061405429 * (1.0 / pow(t_1, 2.0)))) + (1.453152027 * (-1.0 / t_1))) / t_1)) / t_1)) / (t_1 * t_0)), 3.0)))) / (1.0 + (t_2 * (1.0 + t_2)));
	}
	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 = exp((x * x))
    t_1 = 1.0d0 + (abs(x) * 0.3275911d0)
    t_2 = ((0.254829592d0 + (((-0.284496736d0) + ((1.421413741d0 + (((-1.453152027d0) + (1.061405429d0 / t_1)) / t_1)) / t_1)) / t_1)) / t_0) / t_1
    if (abs(x) <= 1d-18) then
        tmp = 1d-9
    else
        tmp = log(exp((1.0d0 - (((0.254829592d0 + (((-0.284496736d0) + (((1.421413741d0 + (1.061405429d0 * (1.0d0 / (t_1 ** 2.0d0)))) + (1.453152027d0 * ((-1.0d0) / t_1))) / t_1)) / t_1)) / (t_1 * t_0)) ** 3.0d0)))) / (1.0d0 + (t_2 * (1.0d0 + t_2)))
    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 = Math.exp((x * x));
	double t_1 = 1.0 + (Math.abs(x) * 0.3275911);
	double t_2 = ((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / t_1)) / t_1)) / t_1)) / t_1)) / t_0) / t_1;
	double tmp;
	if (Math.abs(x) <= 1e-18) {
		tmp = 1e-9;
	} else {
		tmp = Math.log(Math.exp((1.0 - Math.pow(((0.254829592 + ((-0.284496736 + (((1.421413741 + (1.061405429 * (1.0 / Math.pow(t_1, 2.0)))) + (1.453152027 * (-1.0 / t_1))) / t_1)) / t_1)) / (t_1 * t_0)), 3.0)))) / (1.0 + (t_2 * (1.0 + t_2)));
	}
	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 = math.exp((x * x))
	t_1 = 1.0 + (math.fabs(x) * 0.3275911)
	t_2 = ((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / t_1)) / t_1)) / t_1)) / t_1)) / t_0) / t_1
	tmp = 0
	if math.fabs(x) <= 1e-18:
		tmp = 1e-9
	else:
		tmp = math.log(math.exp((1.0 - math.pow(((0.254829592 + ((-0.284496736 + (((1.421413741 + (1.061405429 * (1.0 / math.pow(t_1, 2.0)))) + (1.453152027 * (-1.0 / t_1))) / t_1)) / t_1)) / (t_1 * t_0)), 3.0)))) / (1.0 + (t_2 * (1.0 + t_2)))
	return tmp
function code(x)
	return Float64(1.0 - Float64(Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(0.254829592 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(-0.284496736 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(1.421413741 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * Float64(-1.453152027 + Float64(Float64(1.0 / Float64(1.0 + Float64(0.3275911 * abs(x)))) * 1.061405429))))))))) * exp(Float64(-Float64(abs(x) * abs(x))))))
end
function code(x)
	t_0 = exp(Float64(x * x))
	t_1 = Float64(1.0 + Float64(abs(x) * 0.3275911))
	t_2 = Float64(Float64(Float64(0.254829592 + Float64(Float64(-0.284496736 + Float64(Float64(1.421413741 + Float64(Float64(-1.453152027 + Float64(1.061405429 / t_1)) / t_1)) / t_1)) / t_1)) / t_0) / t_1)
	tmp = 0.0
	if (abs(x) <= 1e-18)
		tmp = 1e-9;
	else
		tmp = Float64(log(exp(Float64(1.0 - (Float64(Float64(0.254829592 + Float64(Float64(-0.284496736 + Float64(Float64(Float64(1.421413741 + Float64(1.061405429 * Float64(1.0 / (t_1 ^ 2.0)))) + Float64(1.453152027 * Float64(-1.0 / t_1))) / t_1)) / t_1)) / Float64(t_1 * t_0)) ^ 3.0)))) / Float64(1.0 + Float64(t_2 * Float64(1.0 + t_2))));
	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 = exp((x * x));
	t_1 = 1.0 + (abs(x) * 0.3275911);
	t_2 = ((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / t_1)) / t_1)) / t_1)) / t_1)) / t_0) / t_1;
	tmp = 0.0;
	if (abs(x) <= 1e-18)
		tmp = 1e-9;
	else
		tmp = log(exp((1.0 - (((0.254829592 + ((-0.284496736 + (((1.421413741 + (1.061405429 * (1.0 / (t_1 ^ 2.0)))) + (1.453152027 * (-1.0 / t_1))) / t_1)) / t_1)) / (t_1 * t_0)) ^ 3.0)))) / (1.0 + (t_2 * (1.0 + t_2)));
	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[Exp[N[(x * x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(N[Abs[x], $MachinePrecision] * 0.3275911), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(0.254829592 + N[(N[(-0.284496736 + N[(N[(1.421413741 + N[(N[(-1.453152027 + N[(1.061405429 / t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[Abs[x], $MachinePrecision], 1e-18], 1e-9, N[(N[Log[N[Exp[N[(1.0 - N[Power[N[(N[(0.254829592 + N[(N[(-0.284496736 + N[(N[(N[(1.421413741 + N[(1.061405429 * N[(1.0 / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.453152027 * N[(-1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / N[(1.0 + N[(t$95$2 * N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
1 - \left(\frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(0.254829592 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-0.284496736 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(1.421413741 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot \left(-1.453152027 + \frac{1}{1 + 0.3275911 \cdot \left|x\right|} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}
\begin{array}{l}
t_0 := e^{x \cdot x}\\
t_1 := 1 + \left|x\right| \cdot 0.3275911\\
t_2 := \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{t_1}}{t_1}}{t_1}}{t_1}}{t_0}}{t_1}\\
\mathbf{if}\;\left|x\right| \leq 10^{-18}:\\
\;\;\;\;10^{-9}\\

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


\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 (fabs.f64 x) < 1.0000000000000001e-18

    1. Initial program 57.8

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

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

      [Start]57.8

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

      associate-*l* [=>]57.8

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

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

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

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

      [Start]57.8

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

      distribute-frac-neg [=>]57.8

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

      sub-neg [<=]57.8

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

      \[\leadsto \color{blue}{10^{-9}} \]

    if 1.0000000000000001e-18 < (fabs.f64 x)

    1. Initial program 97.9

      \[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. Simplified97.9

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

      \[ 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* [=>]97.9

      \[ 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-rr97.9

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 10^{-18}:\\ \;\;\;\;10^{-9}\\ \mathbf{else}:\\ \;\;\;\;\frac{\log \left(e^{1 - {\left(\frac{0.254829592 + \frac{-0.284496736 + \frac{\left(1.421413741 + 1.061405429 \cdot \frac{1}{{\left(1 + \left|x\right| \cdot 0.3275911\right)}^{2}}\right) + 1.453152027 \cdot \frac{-1}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{\left(1 + \left|x\right| \cdot 0.3275911\right) \cdot e^{x \cdot x}}\right)}^{3}}\right)}{1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{e^{x \cdot x}}}{1 + \left|x\right| \cdot 0.3275911} \cdot \left(1 + \frac{\frac{0.254829592 + \frac{-0.284496736 + \frac{1.421413741 + \frac{-1.453152027 + \frac{1.061405429}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{1 + \left|x\right| \cdot 0.3275911}}{e^{x \cdot x}}}{1 + \left|x\right| \cdot 0.3275911}\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error98.7%
Cost143556.00
\[\begin{array}{l} t_0 := 1 + \left|x\right| \cdot 0.3275911\\ t_1 := \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_2 := \frac{t_1}{t_0}\\ \mathbf{if}\;\left|x\right| \leq 10^{-18}:\\ \;\;\;\;10^{-9}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1}{\frac{{t_0}^{3}}{{t_1}^{3}}}}{1 + t_2 \cdot \left(1 + t_2\right)}\\ \end{array} \]
Alternative 2
Error98.7%
Cost60612.00
\[\begin{array}{l} t_0 := 1 + \left|x\right| \cdot 0.3275911\\ \mathbf{if}\;\left|x\right| \leq 10^{-18}:\\ \;\;\;\;10^{-9}\\ \mathbf{else}:\\ \;\;\;\;\log \left(e^{1 + \frac{\frac{-0.254829592 + \frac{0.284496736 + \frac{-1.421413741 + \frac{1.453152027 + \frac{-1.061405429}{t_0}}{t_0}}{t_0}}{t_0}}{e^{x \cdot x}}}{t_0}}\right)\\ \end{array} \]
Alternative 3
Error98.0%
Cost41412.00
\[\begin{array}{l} t_0 := 1 + \left|x\right| \cdot 0.3275911\\ \mathbf{if}\;x \leq -3.4 \cdot 10^{-16}:\\ \;\;\;\;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 2.8 \cdot 10^{-5}:\\ \;\;\;\;10^{-9}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 4
Error97.6%
Cost28612.00
\[\begin{array}{l} t_0 := 1 + x \cdot 0.3275911\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{-9}:\\ \;\;\;\;\sqrt{{\left(1 + \frac{-0.254829592 + \frac{0.284496736 + \frac{-1.421413741 + \frac{1.453152027 + \frac{-1.061405429}{t_0}}{t_0}}{t_0}}{t_0}}{t_0 \cdot {\left(e^{x}\right)}^{x}}\right)}^{2}}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-5}:\\ \;\;\;\;10^{-9}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 5
Error97.4%
Cost328.00
\[\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 6
Error52.6%
Cost64.00
\[10^{-9} \]

Error

Reproduce?

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