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

Error

Bits error versus x

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. Using strategy rm
  3. Applied add-log-exp14.0

    \[\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 \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|}}\right)}\]
  4. Using strategy rm
  5. Applied add-exp-log14.0

    \[\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 \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|}}\right)\right)}}\]
  6. Using strategy rm
  7. Applied add-log-exp14.0

    \[\leadsto \color{blue}{\log \left(e^{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 \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|}}\right)\right)}}\right)}\]
  8. Applied simplify14.0

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

Runtime

Time bar (total: 5.2m)Debug logProfile

herbie shell --seed '#(1063027428 1192549564 1443466578 604016274 3637110559 1698629644)' 
(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)))))))