Average Error: 14.2 → 9.1
Time: 8.9s
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{\left(h \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{\frac{2 \cdot d}{M \cdot D}}}{\ell}}\]
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
w0 \cdot \sqrt{1 - \frac{\left(h \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{1}{\frac{2 \cdot d}{M \cdot D}}}{\ell}}
(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
    (/ (* (* h (/ (* M D) (* 2.0 d))) (/ 1.0 (/ (* 2.0 d) (* M D)))) 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 - (((h * ((M * D) / (2.0 * d))) * (1.0 / ((2.0 * d) / (M * D)))) / 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.2

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

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

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

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

    \[\leadsto w0 \cdot \sqrt{1 - \frac{\color{blue}{\left(h \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \frac{M \cdot D}{2 \cdot d}}}{\ell}}\]
  8. Using strategy rm
  9. Applied clear-num_binary64_14419.1

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

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

Reproduce

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