Average Error: 13.9 → 8.9
Time: 2.9m
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({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h\right) \cdot \frac{1}{\ell}} \le 4.6141443100120484 \cdot 10^{+129}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h\right) \cdot \frac{1}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}} \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}}\right) \cdot \sqrt[3]{\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}}\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

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 (* (* (pow (/ (* M D) (* 2 d)) 2) h) (/ 1 l)))) < 4.6141443100120484e+129

    1. Initial program 4.8

      \[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-inv4.8

      \[\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*0.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}}}\]

    if 4.6141443100120484e+129 < (sqrt (- 1 (* (* (pow (/ (* M D) (* 2 d)) 2) h) (/ 1 l))))

    1. Initial program 56.6

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

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

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

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

Runtime

Time bar (total: 2.9m)Debug logProfile

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