Average Error: 13.5 → 9.4
Time: 43.8s
Precision: 64
Internal Precision: 128
\[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
\[\begin{array}{l} \mathbf{if}\;1 - \frac{h}{\ell} \cdot {\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \le 1.7714561890128288 \cdot 10^{+308}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2}}\\ \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 (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l))) < 1.7714561890128288e+308

    1. Initial program 0.2

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

    if 1.7714561890128288e+308 < (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l)))

    1. Initial program 61.5

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

      \[\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. Using strategy rm
    4. Applied *-un-lft-identity59.7

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

      \[\leadsto \sqrt{(\left(\color{blue}{\frac{1}{\frac{\frac{d}{D}}{\frac{M}{2}}}} \cdot \frac{\frac{M}{2}}{\frac{d}{D}}\right) \cdot \left(-\frac{h}{\ell}\right) + 1)_*} \cdot w0\]
    6. Taylor expanded around inf 42.7

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

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

Runtime

Time bar (total: 43.8s)Debug logProfile

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