Average Error: 13.4 → 7.9
Time: 2.9m
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 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}} \le 2.4200885555955457 \cdot 10^{+137}:\\ \;\;\;\;w0 \cdot \sqrt{1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 - \left(\frac{M}{d} \cdot \left(\left(h \cdot D\right) \cdot \frac{1}{2}\right)\right) \cdot \frac{\frac{D}{2} \cdot \frac{M}{d}}{\ell}} \cdot w0\\ \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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (sqrt (- 1 (* (pow (* (/ M 2) (/ D d)) 2) (/ h l)))) < 2.4200885555955457e+137

    1. Initial program 0.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 times-frac0.1

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

    if 2.4200885555955457e+137 < (sqrt (- 1 (* (pow (* (/ M 2) (/ D d)) 2) (/ h l))))

    1. Initial program 57.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-inv57.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*41.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}}}\]
    5. Using strategy rm
    6. Applied unpow241.6

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

      \[\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. Taylor expanded around 0 38.8

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

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

Runtime

Time bar (total: 2.9m)Debug logProfile

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