Average Error: 13.9 → 8.2
Time: 20.3s
Precision: 64
Internal precision: 384
\[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 \frac{\frac{M \cdot D}{2 \cdot d} \cdot h}{\ell}}\]

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

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 square-mult 13.9

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

    \[\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 associate-*r/ 8.2

    \[\leadsto w0 \cdot \sqrt{1 - \frac{M \cdot D}{2 \cdot d} \cdot \color{blue}{\frac{\frac{M \cdot D}{2 \cdot d} \cdot h}{\ell}}}\]
  7. Removed slow pow expressions

Runtime

Time bar (total: 20.3s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(FPCore (w0 M D h l d)
  :name "Henrywood and Agarwal, Equation (9a)"
  (* w0 (sqrt (- 1 (* (sqr (/ (* M D) (* 2 d))) (/ h l))))))