Average Error: 14.0 → 13.2
Time: 34.2s
Precision: binary64
\[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|}\]
\[\frac{1 - \sqrt{{\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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}} \cdot \sqrt{{\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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}}}{1 + \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^{{\left(\left|x\right|\right)}^{2}}} \cdot \left(1 + \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^{{\left(\left|x\right|\right)}^{2}}}\right)}\]
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|}
\frac{1 - \sqrt{{\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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}} \cdot \sqrt{{\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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}}}{1 + \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^{{\left(\left|x\right|\right)}^{2}}} \cdot \left(1 + \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^{{\left(\left|x\right|\right)}^{2}}}\right)}
(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
 (/
  (-
   1.0
   (*
    (sqrt
     (pow
      (/
       (+
        0.254829592
        (/
         (+
          -0.284496736
          (/
           (+
            1.421413741
            (/
             (+ -1.453152027 (/ 1.061405429 (+ 1.0 (* 0.3275911 (fabs x)))))
             (+ 1.0 (* 0.3275911 (fabs x)))))
           (+ 1.0 (* 0.3275911 (fabs x)))))
         (+ 1.0 (* 0.3275911 (fabs x)))))
       (* (+ 1.0 (* 0.3275911 (fabs x))) (exp (pow (fabs x) 2.0))))
      3.0))
    (sqrt
     (pow
      (/
       (+
        0.254829592
        (/
         (+
          -0.284496736
          (/
           (+
            1.421413741
            (/
             (+ -1.453152027 (/ 1.061405429 (+ 1.0 (* 0.3275911 (fabs x)))))
             (+ 1.0 (* 0.3275911 (fabs x)))))
           (+ 1.0 (* 0.3275911 (fabs x)))))
         (+ 1.0 (* 0.3275911 (fabs x)))))
       (* (+ 1.0 (* 0.3275911 (fabs x))) (exp (pow (fabs x) 2.0))))
      3.0))))
  (+
   1.0
   (*
    (/
     (+
      0.254829592
      (/
       (+
        -0.284496736
        (/
         (+
          1.421413741
          (/
           (+ -1.453152027 (/ 1.061405429 (+ 1.0 (* 0.3275911 (fabs x)))))
           (+ 1.0 (* 0.3275911 (fabs x)))))
         (+ 1.0 (* 0.3275911 (fabs x)))))
       (+ 1.0 (* 0.3275911 (fabs x)))))
     (* (+ 1.0 (* 0.3275911 (fabs x))) (exp (pow (fabs x) 2.0))))
    (+
     1.0
     (/
      (+
       0.254829592
       (/
        (+
         -0.284496736
         (/
          (+
           1.421413741
           (/
            (+ -1.453152027 (/ 1.061405429 (+ 1.0 (* 0.3275911 (fabs x)))))
            (+ 1.0 (* 0.3275911 (fabs x)))))
          (+ 1.0 (* 0.3275911 (fabs x)))))
        (+ 1.0 (* 0.3275911 (fabs x)))))
      (* (+ 1.0 (* 0.3275911 (fabs x))) (exp (pow (fabs x) 2.0)))))))))
double code(double x) {
	return 1.0 - (((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (0.254829592 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (-0.284496736 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (1.421413741 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * (-1.453152027 + ((1.0 / (1.0 + (0.3275911 * fabs(x)))) * 1.061405429))))))))) * exp(-(fabs(x) * fabs(x))));
}
double code(double x) {
	return (1.0 - (sqrt(pow(((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / ((1.0 + (0.3275911 * fabs(x))) * exp(pow(fabs(x), 2.0)))), 3.0)) * sqrt(pow(((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / ((1.0 + (0.3275911 * fabs(x))) * exp(pow(fabs(x), 2.0)))), 3.0)))) / (1.0 + (((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / ((1.0 + (0.3275911 * fabs(x))) * exp(pow(fabs(x), 2.0)))) * (1.0 + ((0.254829592 + ((-0.284496736 + ((1.421413741 + ((-1.453152027 + (1.061405429 / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / (1.0 + (0.3275911 * fabs(x))))) / ((1.0 + (0.3275911 * fabs(x))) * exp(pow(fabs(x), 2.0)))))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

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

    \[\leadsto \color{blue}{1 - \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^{\left|x\right| \cdot \left|x\right|}}}\]
  3. Using strategy rm
  4. Applied flip3--_binary6414.0

    \[\leadsto \color{blue}{\frac{{1}^{3} - {\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^{\left|x\right| \cdot \left|x\right|}}\right)}^{3}}{1 \cdot 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^{\left|x\right| \cdot \left|x\right|}} \cdot \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^{\left|x\right| \cdot \left|x\right|}} + 1 \cdot \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^{\left|x\right| \cdot \left|x\right|}}\right)}}\]
  5. Simplified14.0

    \[\leadsto \frac{\color{blue}{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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}}}{1 \cdot 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^{\left|x\right| \cdot \left|x\right|}} \cdot \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^{\left|x\right| \cdot \left|x\right|}} + 1 \cdot \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^{\left|x\right| \cdot \left|x\right|}}\right)}\]
  6. Simplified14.0

    \[\leadsto \frac{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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}}{\color{blue}{1 + \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^{{\left(\left|x\right|\right)}^{2}}} \cdot \left(1 + \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^{{\left(\left|x\right|\right)}^{2}}}\right)}}\]
  7. Using strategy rm
  8. Applied add-sqr-sqrt_binary6413.2

    \[\leadsto \frac{1 - \color{blue}{\sqrt{{\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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}} \cdot \sqrt{{\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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}}}}{1 + \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^{{\left(\left|x\right|\right)}^{2}}} \cdot \left(1 + \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^{{\left(\left|x\right|\right)}^{2}}}\right)}\]
  9. Final simplification13.2

    \[\leadsto \frac{1 - \sqrt{{\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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}} \cdot \sqrt{{\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^{{\left(\left|x\right|\right)}^{2}}}\right)}^{3}}}{1 + \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^{{\left(\left|x\right|\right)}^{2}}} \cdot \left(1 + \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^{{\left(\left|x\right|\right)}^{2}}}\right)}\]

Reproduce

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