Average Error: 13.7 → 8.1
Time: 1.4m
Precision: 64
Internal Precision: 384
\[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} \le -5.0818564674687 \cdot 10^{-316}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot h\right) \cdot \frac{1}{\ell}\right)}\\ \mathbf{if}\;\frac{h}{\ell} \le 5.263874672394614 \cdot 10^{-209}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{D}{\ell} \cdot M}{d + d} \cdot \left(\frac{1}{2} \cdot \left(\frac{M}{d} \cdot \left(h \cdot D\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot h\right) \cdot \frac{1}{\ell}\right)}\\ \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) < -5.0818564674687e-316

    1. Initial program 19.2

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

      \[\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*17.3

      \[\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)}}\]
    5. Using strategy rm
    6. Applied div-inv17.3

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

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

    if -5.0818564674687e-316 < (/ h l) < 5.263874672394614e-209

    1. Initial program 9.8

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

      \[\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*6.8

      \[\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)}}\]
    5. Using strategy rm
    6. Applied div-inv6.8

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

      \[\leadsto w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot h\right) \cdot \frac{1}{\ell}\right)}}\]
    8. Taylor expanded around 0 4.5

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

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

    if 5.263874672394614e-209 < (/ h l)

    1. Initial program 5.7

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

      \[\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*5.7

      \[\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)}}\]
    5. Using strategy rm
    6. Applied div-inv5.7

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

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

Runtime

Time bar (total: 1.4m)Debug logProfile

herbie shell --seed '#(1070100504 930361288 1279167582 284574201 1450237281 2578255382)' 
(FPCore (w0 M D h l d)
  :name "Henrywood and Agarwal, Equation (9a)"
  (* w0 (sqrt (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l))))))