Average Error: 13.4 → 7.8
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}\;\sqrt{1 - \left(\left(\sqrt[3]{\frac{M}{d} \cdot \left(\left(h \cdot D\right) \cdot \frac{1}{2}\right)} \cdot \sqrt[3]{\frac{M}{d} \cdot \left(\left(h \cdot D\right) \cdot \frac{1}{2}\right)}\right) \cdot \sqrt[3]{\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 = -\infty:\\ \;\;\;\;\left(\sqrt[3]{w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}} \cdot \sqrt[3]{w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}}\right) \cdot \sqrt[3]{w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}}\\ \mathbf{if}\;\sqrt{1 - \left(\left(\sqrt[3]{\frac{M}{d} \cdot \left(\left(h \cdot D\right) \cdot \frac{1}{2}\right)} \cdot \sqrt[3]{\frac{M}{d} \cdot \left(\left(h \cdot D\right) \cdot \frac{1}{2}\right)}\right) \cdot \sqrt[3]{\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 \le 2.404442561858821 \cdot 10^{+303}:\\ \;\;\;\;\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\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{d}{\frac{h}{2}}}}{\left(2 \cdot d\right) \cdot \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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if (* (sqrt (- 1 (* (* (* (cbrt (* (/ M d) (* (* h D) 1/2))) (cbrt (* (/ M d) (* (* h D) 1/2)))) (cbrt (* (/ M d) (* (* h D) 1/2)))) (/ (* (/ D 2) (/ M d)) l)))) w0) < -inf.0

    1. Initial program 51.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 add-cube-cbrt52.0

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

    if -inf.0 < (* (sqrt (- 1 (* (* (* (cbrt (* (/ M d) (* (* h D) 1/2))) (cbrt (* (/ M d) (* (* h D) 1/2)))) (cbrt (* (/ M d) (* (* h D) 1/2)))) (/ (* (/ D 2) (/ M d)) l)))) w0) < 2.404442561858821e+303

    1. Initial program 7.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 div-inv7.1

      \[\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*3.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 unpow23.2

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

      \[\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 2.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 simplify0.3

      \[\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}\]

    if 2.404442561858821e+303 < (* (sqrt (- 1 (* (* (* (cbrt (* (/ M d) (* (* h D) 1/2))) (cbrt (* (/ M d) (* (* h D) 1/2)))) (cbrt (* (/ M d) (* (* h D) 1/2)))) (/ (* (/ D 2) (/ M d)) l)))) w0)

    1. Initial program 37.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 div-inv37.2

      \[\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*36.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 unpow236.2

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

      \[\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 associate-*l/35.7

      \[\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)}{2 \cdot d}} \cdot \frac{1}{\ell}}\]
    10. Applied frac-times35.6

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

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

Runtime

Time bar (total: 2.6m)Debug logProfile

herbie shell --seed '#(1072936661 1621281212 3440817831 3219514234 460296804 1258167384)' 
(FPCore (w0 M D h l d)
  :name "Henrywood and Agarwal, Equation (9a)"
  (* w0 (sqrt (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l))))))