Average Error: 13.8 → 13.8
Time: 46.2s
Precision: 64
Internal Precision: 384
\[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|}\]
\[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{\frac{1}{\sqrt{1 + 0.3275911 \cdot \left|x\right|}}}{\sqrt{1 + 0.3275911 \cdot \left|x\right|}} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}\]

Error

Bits error versus x

Derivation

  1. Initial program 13.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. Using strategy rm
  3. Applied add-sqr-sqrt13.8

    \[\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}{\color{blue}{\sqrt{1 + 0.3275911 \cdot \left|x\right|} \cdot \sqrt{1 + 0.3275911 \cdot \left|x\right|}}} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}\]
  4. Applied associate-/r*13.8

    \[\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 + \color{blue}{\frac{\frac{1}{\sqrt{1 + 0.3275911 \cdot \left|x\right|}}}{\sqrt{1 + 0.3275911 \cdot \left|x\right|}}} \cdot 1.061405429\right)\right)\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}\]
  5. Removed slow pow expressions.

Runtime

Time bar (total: 46.2s)Debug logProfile

herbie shell --seed '#(1063313015 2771194459 1594909340 1344785158 2223560818 546365448)' 
(FPCore (x)
  :name "Jmat.Real.erf"
  (- 1 (* (* (/ 1 (+ 1 (* 0.3275911 (fabs x)))) (+ 0.254829592 (* (/ 1 (+ 1 (* 0.3275911 (fabs x)))) (+ -0.284496736 (* (/ 1 (+ 1 (* 0.3275911 (fabs x)))) (+ 1.421413741 (* (/ 1 (+ 1 (* 0.3275911 (fabs x)))) (+ -1.453152027 (* (/ 1 (+ 1 (* 0.3275911 (fabs x)))) 1.061405429))))))))) (exp (- (* (fabs x) (fabs x)))))))