Average Error: 13.7 → 8.3
Time: 2.6m
Precision: 64
Internal Precision: 576
\[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
\[\begin{array}{l} \mathbf{if}\;\frac{h}{\ell} = -\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h\right) \cdot \frac{1}{\ell}}\\ \mathbf{if}\;\frac{h}{\ell} \le -1.1998277694987128 \cdot 10^{-269}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot h} \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot h}\right) \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot h}\right)\right) \cdot \frac{1}{\ell}}\\ \end{array}\]

Error

Bits error versus w0

Bits error versus M

Bits error versus D

Bits error versus h

Bits error versus l

Bits error versus d

Derivation

  1. Split input into 3 regimes
  2. if (/ h l) < -inf.0

    1. Initial program 61.6

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Using strategy rm
    3. Applied div-inv61.6

      \[\leadsto w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\left(h \cdot \frac{1}{\ell}\right)}}\]
    4. Applied associate-*r*24.6

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h\right) \cdot \frac{1}{\ell}}}\]

    if -inf.0 < (/ h l) < -1.1998277694987128e-269

    1. Initial program 13.6

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Using strategy rm
    3. Applied unpow213.6

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{h}{\ell}}\]
    4. Applied associate-*l*12.0

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)}}\]

    if -1.1998277694987128e-269 < (/ h l)

    1. Initial program 8.3

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Using strategy rm
    3. Applied div-inv8.3

      \[\leadsto w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\left(h \cdot \frac{1}{\ell}\right)}}\]
    4. Applied associate-*r*5.0

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h\right) \cdot \frac{1}{\ell}}}\]
    5. Using strategy rm
    6. Applied unpow25.0

      \[\leadsto w0 \cdot \sqrt{1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot h\right) \cdot \frac{1}{\ell}}\]
    7. Applied associate-*l*3.2

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot h\right)\right)} \cdot \frac{1}{\ell}}\]
    8. Using strategy rm
    9. Applied add-cube-cbrt3.2

      \[\leadsto w0 \cdot \sqrt{1 - \left(\frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot h} \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot h}\right) \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot h}\right)}\right) \cdot \frac{1}{\ell}}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 2.6m)Debug logProfile

herbie shell --seed '#(1071948828 1180510430 2986424009 997076509 406109801 420189285)' 
(FPCore (w0 M D h l d)
  :name "Henrywood and Agarwal, Equation (9a)"
  (* w0 (sqrt (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l))))))