Average Error: 13.8 → 8.3
Time: 3.3m
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}\;\sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \frac{\left(M \cdot D\right) \cdot h}{\left(2 \cdot d\right) \cdot \ell}} \le 3.408413623699342 \cdot 10^{+149}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \frac{\left(M \cdot D\right) \cdot h}{\left(2 \cdot d\right) \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(\left(\sqrt[3]{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h} \cdot \sqrt[3]{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h}\right) \cdot \sqrt[3]{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot h}\right) \cdot \frac{1}{\ell}}\\ \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) (* 2 d)) (/ (* (* M D) h) (* (* 2 d) l))))) < 3.408413623699342e+149

    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 unpow26.4

      \[\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*5.0

      \[\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 frac-times0.2

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

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

    1. Initial program 46.5

      \[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-inv46.6

      \[\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*44.4

      \[\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 add-cube-cbrt44.4

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

Runtime

Time bar (total: 3.3m)Debug logProfile

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