Average Error: 14.1 → 14.1
Time: 2.0m
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|}\]
\[e^{\log \left(\log \left(e^{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 \log \left(e^{(\left(\frac{\frac{1}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*}}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*}\right) \cdot \left(\frac{1.061405429}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*} + -1.453152027\right) + \left(\frac{1.421413741}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*} + -0.284496736\right))_*}\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}}\right)\right)}\]

Error

Bits error versus x

Derivation

  1. Initial program 14.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. Using strategy rm
  3. Applied add-log-exp14.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 \color{blue}{\log \left(e^{-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|}\]
  4. Applied simplify14.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 \log \color{blue}{\left(e^{(\left(\frac{\frac{1}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*}}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*}\right) \cdot \left(\frac{1.061405429}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*} + -1.453152027\right) + \left(\frac{1.421413741}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*} + -0.284496736\right))_*}\right)}\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}\]
  5. Using strategy rm
  6. Applied add-log-exp14.1

    \[\leadsto \color{blue}{\log \left(e^{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 \log \left(e^{(\left(\frac{\frac{1}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*}}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*}\right) \cdot \left(\frac{1.061405429}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*} + -1.453152027\right) + \left(\frac{1.421413741}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*} + -0.284496736\right))_*}\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}}\right)}\]
  7. Using strategy rm
  8. Applied add-exp-log14.1

    \[\leadsto \color{blue}{e^{\log \left(\log \left(e^{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 \log \left(e^{(\left(\frac{\frac{1}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*}}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*}\right) \cdot \left(\frac{1.061405429}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*} + -1.453152027\right) + \left(\frac{1.421413741}{(\left(\left|x\right|\right) \cdot 0.3275911 + 1)_*} + -0.284496736\right))_*}\right)\right)\right) \cdot e^{-\left|x\right| \cdot \left|x\right|}}\right)\right)}}\]

Runtime

Time bar (total: 2.0m)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' +o rules:numerics
(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)))))))