Average Error: 13.8 → 9.1
Time: 1.3m
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 -4.149629949840013 \cdot 10^{+45}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot h\right) \cdot \frac{1}{\ell}}\\ \mathbf{if}\;\frac{h}{\ell} \le -6.007851510399425 \cdot 10^{-162}:\\ \;\;\;\;w0 \cdot \sqrt{1 - {\left(\sqrt[3]{\frac{M \cdot D}{2 \cdot d}} \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d}}\right)}^{2} \cdot \left({\left(\sqrt[3]{\frac{M \cdot D}{2 \cdot d}}\right)}^{2} \cdot \frac{h}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \sqrt[3]{{\left(\frac{h \cdot \frac{D \cdot M}{d + d}}{\frac{\ell}{\frac{D \cdot M}{d + d}}}\right)}^{3}}}\\ \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) < -4.149629949840013e+45

    1. Initial program 27.5

      \[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-inv27.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*18.4

      \[\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 times-frac18.3

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

    if -4.149629949840013e+45 < (/ h l) < -6.007851510399425e-162

    1. Initial program 12.0

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

      \[\leadsto w0 \cdot \sqrt{1 - {\color{blue}{\left(\left(\sqrt[3]{\frac{M \cdot D}{2 \cdot d}} \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d}}\right) \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d}}\right)}}^{2} \cdot \frac{h}{\ell}}\]
    4. Applied unpow-prod-down12.1

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

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

    if -6.007851510399425e-162 < (/ h l)

    1. Initial program 8.9

      \[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.9

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

      \[\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 add-cbrt-cube6.2

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

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

Runtime

Time bar (total: 1.3m)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' +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))))))