Average Error: 15.2 → 1.3
Time: 1.6m
Precision: 64
Internal Precision: 1664
\[\cos \left(\frac{K \cdot \left(m + n\right)}{2} - M\right) \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}\]
\[1 \cdot \left(\left(\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right) \cdot \sqrt[3]{e^{\left(-\left(\sqrt[3]{\frac{n + m}{2} - M} \cdot \left(\frac{n + m}{2} - M\right)\right) \cdot {\left(\sqrt[3]{\frac{m + n}{2} - M}\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right)\]

Error

Bits error versus K

Bits error versus m

Bits error versus n

Bits error versus M

Bits error versus l

Derivation

  1. Initial program 15.2

    \[\cos \left(\frac{K \cdot \left(m + n\right)}{2} - M\right) \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}\]
  2. Taylor expanded around 0 1.3

    \[\leadsto \color{blue}{1} \cdot e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt1.3

    \[\leadsto 1 \cdot \color{blue}{\left(\left(\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right) \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right)}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt1.3

    \[\leadsto 1 \cdot \left(\left(\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right) \cdot \sqrt[3]{e^{\left(-{\color{blue}{\left(\left(\sqrt[3]{\frac{m + n}{2} - M} \cdot \sqrt[3]{\frac{m + n}{2} - M}\right) \cdot \sqrt[3]{\frac{m + n}{2} - M}\right)}}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right)\]
  7. Applied unpow-prod-down1.3

    \[\leadsto 1 \cdot \left(\left(\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right) \cdot \sqrt[3]{e^{\left(-\color{blue}{{\left(\sqrt[3]{\frac{m + n}{2} - M} \cdot \sqrt[3]{\frac{m + n}{2} - M}\right)}^{2} \cdot {\left(\sqrt[3]{\frac{m + n}{2} - M}\right)}^{2}}\right) - \left(\ell - \left|m - n\right|\right)}}\right)\]
  8. Applied simplify1.3

    \[\leadsto 1 \cdot \left(\left(\sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}} \cdot \sqrt[3]{e^{\left(-{\left(\frac{m + n}{2} - M\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right) \cdot \sqrt[3]{e^{\left(-\color{blue}{\left(\sqrt[3]{\frac{n + m}{2} - M} \cdot \left(\frac{n + m}{2} - M\right)\right)} \cdot {\left(\sqrt[3]{\frac{m + n}{2} - M}\right)}^{2}\right) - \left(\ell - \left|m - n\right|\right)}}\right)\]

Runtime

Time bar (total: 1.6m)Debug logProfile

herbie shell --seed '#(1070706311 3771791028 4128836681 4194990999 2341756049 504035650)' 
(FPCore (K m n M l)
  :name "Maksimov and Kolovsky, Equation (32)"
  (* (cos (- (/ (* K (+ m n)) 2) M)) (exp (- (- (pow (- (/ (+ m n) 2) M) 2)) (- l (fabs (- m n)))))))