Average Error: 13.6 → 9.5
Time: 47.7s
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(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \cdot w0 \le 3.022424182880061 \cdot 10^{+304}:\\ \;\;\;\;\sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \cdot w0\\ \mathbf{else}:\\ \;\;\;\;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 (* w0 (sqrt (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l))))) < 3.022424182880061e+304

    1. Initial program 4.9

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

    if 3.022424182880061e+304 < (* w0 (sqrt (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l)))))

    1. Initial program 60.7

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Initial simplification58.4

      \[\leadsto \sqrt{(\left(\frac{\frac{M}{2}}{\frac{d}{D}} \cdot \frac{\frac{M}{2}}{\frac{d}{D}}\right) \cdot \left(-\frac{h}{\ell}\right) + 1)_*} \cdot w0\]
    3. Taylor expanded around 0 34.4

      \[\leadsto \color{blue}{1} \cdot w0\]
  3. Recombined 2 regimes into one program.
  4. Final simplification9.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \cdot w0 \le 3.022424182880061 \cdot 10^{+304}:\\ \;\;\;\;\sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \cdot w0\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array}\]

Runtime

Time bar (total: 47.7s)Debug logProfile

herbie shell --seed 2018252 +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))))))