Average Error: 13.9 → 8.6
Time: 8.2s
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{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{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{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{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
    (*
     (/ (cbrt h) (cbrt l))
     (*
      (* (/ (* M D) (* 2.0 d)) (/ (cbrt h) (cbrt l)))
      (* (/ (* M D) (* 2.0 d)) (/ (cbrt 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 - ((cbrt(h) / cbrt(l)) * ((((M * D) / (2.0 * d)) * (cbrt(h) / cbrt(l))) * (((M * D) / (2.0 * d)) * (cbrt(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.9

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

    \[\leadsto w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}\]
  4. Applied add-cube-cbrt_binary6414.0

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

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

    \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{\sqrt[3]{h} \cdot \sqrt[3]{h}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}}\]
  7. Using strategy rm
  8. Applied times-frac_binary6411.2

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

    \[\leadsto w0 \cdot \sqrt{1 - \left({\color{blue}{\left(\sqrt{\frac{M \cdot D}{2 \cdot d}} \cdot \sqrt{\frac{M \cdot D}{2 \cdot d}}\right)}}^{2} \cdot \left(\frac{\sqrt[3]{h}}{\sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
  10. Applied unpow-prod-down_binary6428.4

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

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

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

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

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

Reproduce

herbie shell --seed 2020219 
(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))))))