Average Error: 13.5 → 8.1
Time: 1.1m
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}\;{\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \le 2.3387083622927177 \cdot 10^{-212} \lor \neg \left({\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2} \le 1.6728176871449792 \cdot 10^{+263}\right):\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\left(M \cdot \frac{D}{d}\right) \cdot h}{2 \cdot \ell} \cdot \left(\frac{M}{2} \cdot \frac{D}{d}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{D \cdot M}{2 \cdot d}\right)}^{2}}\\ \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 (pow (/ (* M D) (* 2 d)) 2) < 2.3387083622927177e-212 or 1.6728176871449792e+263 < (pow (/ (* M D) (* 2 d)) 2)

    1. Initial program 16.9

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

      \[\leadsto \sqrt{1 - \left(\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \left(\frac{M}{2} \cdot \frac{D}{d}\right)\right) \cdot \frac{h}{\ell}} \cdot w0\]
    3. Using strategy rm
    4. Applied associate-*l*14.5

      \[\leadsto \sqrt{1 - \color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \left(\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \frac{h}{\ell}\right)}} \cdot w0\]
    5. Using strategy rm
    6. Applied associate-*l/14.5

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

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

    if 2.3387083622927177e-212 < (pow (/ (* M D) (* 2 d)) 2) < 1.6728176871449792e+263

    1. Initial program 5.3

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

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

Runtime

Time bar (total: 1.1m)Debug logProfile

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