Average Error: 13.8 → 8.4
Time: 3.4m
Precision: 64
Internal Precision: 320
\[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
\[\begin{array}{l} \mathbf{if}\;\sqrt{1 - \frac{\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot h\right)}{\ell \cdot \left(2 \cdot d\right)}} \le 4.67316943187834 \cdot 10^{+146}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot h\right)}{\ell \cdot \left(2 \cdot d\right)}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt[3]{(\left(\frac{-M}{\frac{\ell}{D}}\right) \cdot \left(\frac{D}{d \cdot 2} \cdot \frac{M \cdot h}{d \cdot 2}\right) + 1)_* \cdot \sqrt{(\left(\frac{-M}{\frac{\ell}{D}}\right) \cdot \left(\frac{D}{d \cdot 2} \cdot \frac{M \cdot h}{d \cdot 2}\right) + 1)_*}}\\ \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 2 regimes
  2. if (sqrt (- 1 (/ (* (* M D) (* (/ (* M D) (* 2 d)) h)) (* l (* 2 d))))) < 4.67316943187834e+146

    1. Initial program 6.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 associate-*r/2.4

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

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

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

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

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

    if 4.67316943187834e+146 < (sqrt (- 1 (/ (* (* M D) (* (/ (* M D) (* 2 d)) h)) (* l (* 2 d)))))

    1. Initial program 47.1

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

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

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

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

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

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\left(M \cdot D\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot h\right)}{\ell \cdot \left(2 \cdot d\right)}}}\]
    10. Using strategy rm
    11. Applied add-cbrt-cube61.3

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

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

Runtime

Time bar (total: 3.4m)Debug logProfile

herbie shell --seed 2018214 +o rules:numerics
(FPCore (w0 M D h l d)
  :name "Henrywood and Agarwal, Equation (9a)"
  (* w0 (sqrt (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l))))))