Average Error: 13.6 → 9.1
Time: 7.5s
Precision: binary64
\[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}\]
\[w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\sqrt[3]{\ell}}\right)\right)}\]
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{1}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\sqrt[3]{\ell}}\right)\right)}
(FPCore (w0 M D h l d)
 :precision binary64
 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
(FPCore (w0 M D h l d)
 :precision binary64
 (*
  w0
  (sqrt
   (-
    1.0
    (*
     (/ (* M D) (* 2.0 d))
     (*
      (/ 1.0 (* (cbrt l) (cbrt l)))
      (* (/ (* M D) (* 2.0 d)) (/ h (cbrt l)))))))))
double code(double w0, double M, double D, double h, double l, double d) {
	return w0 * sqrt(1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l)));
}
double code(double w0, double M, double D, double h, double l, double d) {
	return w0 * sqrt(1.0 - (((M * D) / (2.0 * d)) * ((1.0 / (cbrt(l) * cbrt(l))) * (((M * D) / (2.0 * d)) * (h / cbrt(l))))));
}

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. Initial program 13.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 unpow2_binary6413.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*_binary6412.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. Simplified12.0

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

    \[\leadsto w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{h}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\]
  8. Applied *-un-lft-identity_binary6412.1

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

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

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

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

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

Reproduce

herbie shell --seed 2020220 
(FPCore (w0 M D h l d)
  :name "Henrywood and Agarwal, Equation (9a)"
  :precision binary64
  (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))