Average Error: 13.5 → 9.6
Time: 2.2m
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 - {\left(\frac{M}{\frac{2 \cdot d}{D}}\right)}^{2} \cdot \frac{h}{\ell}} \le +\infty:\\ \;\;\;\;w0 \cdot \sqrt{1 - {\left(\frac{M}{\frac{2 \cdot d}{D}}\right)}^{2} \cdot \frac{h}{\ell}}\\ \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

Derivation

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

    1. Initial program 9.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 associate-/l*8.9

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

    if +inf.0 < (sqrt (- 1 (* (pow (/ M (/ (* 2 d) D)) 2) (/ h l))))

    1. Initial program 61.1

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Taylor expanded around 0 17.5

      \[\leadsto \color{blue}{w0}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 2.2m)Debug logProfile

herbie shell --seed '#(1071246582 2318319007 2683472949 3810440501 3233274817 2724848749)' 
(FPCore (w0 M D h l d)
  :name "Henrywood and Agarwal, Equation (9a)"
  (* w0 (sqrt (- 1 (* (pow (/ (* M D) (* 2 d)) 2) (/ h l))))))