Average Error: 13.8 → 8.7
Time: 2.3m
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 - \frac{D \cdot M}{\frac{2 \cdot d}{h}} \cdot \frac{\frac{D \cdot M}{2 \cdot d}}{\ell}} \le 9.779739713127985 \cdot 10^{+127}:\\ \;\;\;\;\sqrt{1 - \frac{D \cdot M}{\frac{2 \cdot d}{h}} \cdot \frac{\frac{D \cdot M}{2 \cdot d}}{\ell}} \cdot w0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 - h \cdot \frac{\frac{D \cdot M}{2 \cdot d} \cdot \frac{D \cdot M}{2 \cdot 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 (* (/ (/ (* M D) (* d 2)) l) (/ (* D M) (/ (* d 2) h))))) < 9.779739713127985e+127

    1. Initial program 6.3

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

      \[\leadsto \sqrt{1 - \frac{\frac{M \cdot D}{d \cdot 2} \cdot \frac{M \cdot D}{d \cdot 2}}{\frac{\ell}{h}}} \cdot w0\]
    3. Using strategy rm
    4. Applied div-inv5.9

      \[\leadsto \sqrt{1 - \frac{\frac{M \cdot D}{d \cdot 2} \cdot \frac{M \cdot D}{d \cdot 2}}{\color{blue}{\ell \cdot \frac{1}{h}}}} \cdot w0\]
    5. Applied times-frac0.1

      \[\leadsto \sqrt{1 - \color{blue}{\frac{\frac{M \cdot D}{d \cdot 2}}{\ell} \cdot \frac{\frac{M \cdot D}{d \cdot 2}}{\frac{1}{h}}}} \cdot w0\]
    6. Simplified0.3

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

    if 9.779739713127985e+127 < (sqrt (- 1 (* (/ (/ (* M D) (* d 2)) l) (/ (* D M) (/ (* d 2) h)))))

    1. Initial program 49.2

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

      \[\leadsto \sqrt{1 - \frac{\frac{M \cdot D}{d \cdot 2} \cdot \frac{M \cdot D}{d \cdot 2}}{\frac{\ell}{h}}} \cdot w0\]
    3. Using strategy rm
    4. Applied associate-/r/48.4

      \[\leadsto \sqrt{1 - \color{blue}{\frac{\frac{M \cdot D}{d \cdot 2} \cdot \frac{M \cdot D}{d \cdot 2}}{\ell} \cdot h}} \cdot w0\]
  3. Recombined 2 regimes into one program.
  4. Final simplification8.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{1 - \frac{D \cdot M}{\frac{2 \cdot d}{h}} \cdot \frac{\frac{D \cdot M}{2 \cdot d}}{\ell}} \le 9.779739713127985 \cdot 10^{+127}:\\ \;\;\;\;\sqrt{1 - \frac{D \cdot M}{\frac{2 \cdot d}{h}} \cdot \frac{\frac{D \cdot M}{2 \cdot d}}{\ell}} \cdot w0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 - h \cdot \frac{\frac{D \cdot M}{2 \cdot d} \cdot \frac{D \cdot M}{2 \cdot d}}{\ell}} \cdot w0\\ \end{array}\]

Runtime

Time bar (total: 2.3m)Debug logProfile

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