Average Error: 13.7 → 9.2
Time: 3.3m
Precision: 64
Internal Precision: 384
\[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{\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{d}{\frac{h}{2}}}}{\left(2 \cdot d\right) \cdot \ell}} \le 5.376649159136409 \cdot 10^{+136}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{\frac{d}{\frac{h}{2}}}}{\left(2 \cdot d\right) \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M}{\frac{d}{\frac{1}{2}}} \cdot \left(\frac{D}{\ell} \cdot h\right)\right)}\\ \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 (/ (/ (* (* D M) (* D M)) (/ d (/ h 2))) (* (* 2 d) l)))) < 5.376649159136409e+136

    1. Initial program 6.4

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Using strategy rm
    3. Applied div-inv6.4

      \[\leadsto w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\left(h \cdot \frac{1}{\ell}\right)}}\]
    4. Applied associate-*r*1.9

      \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h\right) \cdot \frac{1}{\ell}}}\]
    5. Using strategy rm
    6. Applied unpow21.9

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

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

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

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

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

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

    1. Initial program 34.4

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
    2. Using strategy rm
    3. Applied div-inv34.4

      \[\leadsto w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \color{blue}{\left(h \cdot \frac{1}{\ell}\right)}}\]
    4. Applied associate-*r*34.5

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

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

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

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

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

Runtime

Time bar (total: 3.3m)Debug logProfile

herbie shell --seed '#(1070991898 1055468627 4280279443 640792587 928206309 3646738750)' +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))))))