Average Error: 14.4 → 8.5
Time: 1.4min
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(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{\sqrt[3]{h} \cdot \sqrt[3]{h}}}{\sqrt[3]{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}}\right) \cdot \frac{\sqrt[3]{\sqrt[3]{h}}}{\sqrt[3]{\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(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{\sqrt[3]{h} \cdot \sqrt[3]{h}}}{\sqrt[3]{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}}\right) \cdot \frac{\sqrt[3]{\sqrt[3]{h}}}{\sqrt[3]{\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 (* (cbrt h) (cbrt h))) (* (cbrt (cbrt l)) (cbrt (cbrt l)))))
       (/ (cbrt (cbrt h)) (cbrt (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(cbrt(h) * cbrt(h)) / (cbrt(cbrt(l)) * cbrt(cbrt(l))))) * (cbrt(cbrt(h)) / cbrt(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 14.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 add-cube-cbrt_binary64_79514.5

    \[\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_binary64_79514.5

    \[\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_binary64_76614.5

    \[\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*_binary64_70011.5

    \[\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_binary64_76611.5

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

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

    \[\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_binary64_72826.4

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

    \[\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.5

    \[\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. Using strategy rm
  15. Applied add-cube-cbrt_binary64_7958.5

    \[\leadsto w0 \cdot \sqrt{1 - \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}}{\color{blue}{\left(\sqrt[3]{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}\right) \cdot \sqrt[3]{\sqrt[3]{\ell}}}}\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
  16. Applied add-cube-cbrt_binary64_7958.5

    \[\leadsto w0 \cdot \sqrt{1 - \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]{\color{blue}{\left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right) \cdot \sqrt[3]{h}}}}{\left(\sqrt[3]{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}\right) \cdot \sqrt[3]{\sqrt[3]{\ell}}}\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
  17. Applied cbrt-prod_binary64_7918.5

    \[\leadsto w0 \cdot \sqrt{1 - \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{\color{blue}{\sqrt[3]{\sqrt[3]{h} \cdot \sqrt[3]{h}} \cdot \sqrt[3]{\sqrt[3]{h}}}}{\left(\sqrt[3]{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}\right) \cdot \sqrt[3]{\sqrt[3]{\ell}}}\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
  18. Applied times-frac_binary64_7668.5

    \[\leadsto w0 \cdot \sqrt{1 - \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 \color{blue}{\left(\frac{\sqrt[3]{\sqrt[3]{h} \cdot \sqrt[3]{h}}}{\sqrt[3]{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}} \cdot \frac{\sqrt[3]{\sqrt[3]{h}}}{\sqrt[3]{\sqrt[3]{\ell}}}\right)}\right)\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
  19. Applied associate-*r*_binary64_7008.5

    \[\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(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{\sqrt[3]{h} \cdot \sqrt[3]{h}}}{\sqrt[3]{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}}\right) \cdot \frac{\sqrt[3]{\sqrt[3]{h}}}{\sqrt[3]{\sqrt[3]{\ell}}}\right)}\right) \cdot \frac{\sqrt[3]{h}}{\sqrt[3]{\ell}}}\]
  20. Final simplification8.5

    \[\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(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{\sqrt[3]{\sqrt[3]{h} \cdot \sqrt[3]{h}}}{\sqrt[3]{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sqrt[3]{\ell}}}\right) \cdot \frac{\sqrt[3]{\sqrt[3]{h}}}{\sqrt[3]{\sqrt[3]{\ell}}}\right)\right)}\]

Reproduce

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