Average Error: 58.3 → 30.4
Time: 5.8m
Precision: 64
Internal Precision: 6784
\[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\]
\[\begin{array}{l} \mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(\frac{\left|M\right|}{1} \cdot \frac{\left|M\right|}{\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \left|\sqrt[3]{(\left(\frac{\frac{d}{D} \cdot c0}{\frac{w \cdot h}{\frac{d}{D}}}\right) \cdot \left(\frac{\frac{d}{D} \cdot c0}{\frac{w \cdot h}{\frac{d}{D}}}\right) + \left(-M \cdot M\right))_*}\right| \cdot \sqrt{\sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}}}\right) \le -3.714403415678511 \cdot 10^{-139}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \sqrt[3]{{\left(\sqrt{(\left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(-M \cdot M\right))_*} + \frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)}^{3}}\\ \mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(\frac{\left|M\right|}{1} \cdot \frac{\left|M\right|}{\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \left|\sqrt[3]{(\left(\frac{\frac{d}{D} \cdot c0}{\frac{w \cdot h}{\frac{d}{D}}}\right) \cdot \left(\frac{\frac{d}{D} \cdot c0}{\frac{w \cdot h}{\frac{d}{D}}}\right) + \left(-M \cdot M\right))_*}\right| \cdot \sqrt{\sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}}}\right) \le +\infty:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{\left|M\right|}{1} \cdot \frac{\left|M\right|}{\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \left|\sqrt[3]{(\left(\frac{\frac{d}{D} \cdot c0}{\frac{w \cdot h}{\frac{d}{D}}}\right) \cdot \left(\frac{\frac{d}{D} \cdot c0}{\frac{w \cdot h}{\frac{d}{D}}}\right) + \left(-M \cdot M\right))_*}\right| \cdot \sqrt{\sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}}}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]

Error

Bits error versus c0

Bits error versus w

Bits error versus h

Bits error versus D

Bits error versus d

Bits error versus M

Derivation

  1. Split input into 3 regimes
  2. if (* (/ c0 (* 2 w)) (* (/ (fabs M) 1) (/ (fabs M) (- (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (fabs (cbrt (fma (/ (* (/ d D) c0) (/ (* w h) (/ d D))) (/ (* (/ d D) c0) (/ (* w h) (/ d D))) (- (* M M))))) (sqrt (cbrt (fma (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (- M) M))))))))) < -3.714403415678511e-139

    1. Initial program 49.2

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\]
    2. Using strategy rm
    3. Applied add-cbrt-cube51.9

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\sqrt[3]{\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}}\]
    4. Applied simplify34.1

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \sqrt[3]{\color{blue}{{\left(\sqrt{(\left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(-M \cdot M\right))_*} + \frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)}^{3}}}\]

    if -3.714403415678511e-139 < (* (/ c0 (* 2 w)) (* (/ (fabs M) 1) (/ (fabs M) (- (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (fabs (cbrt (fma (/ (* (/ d D) c0) (/ (* w h) (/ d D))) (/ (* (/ d D) c0) (/ (* w h) (/ d D))) (- (* M M))))) (sqrt (cbrt (fma (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (- M) M))))))))) < +inf.0

    1. Initial program 56.4

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\]
    2. Using strategy rm
    3. Applied flip-+59.8

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M} \cdot \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}}}\]
    4. Applied simplify30.6

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0 + M \cdot M}}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity30.6

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\color{blue}{1 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}}\]
    7. Applied add-sqr-sqrt30.6

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\sqrt{0 + M \cdot M} \cdot \sqrt{0 + M \cdot M}}}{1 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\]
    8. Applied times-frac30.6

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{\sqrt{0 + M \cdot M}}{1} \cdot \frac{\sqrt{0 + M \cdot M}}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}}\right)}\]
    9. Applied simplify30.6

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{\left|M\right|}{1}} \cdot \frac{\sqrt{0 + M \cdot M}}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}}\right)\]
    10. Applied simplify21.5

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{\left|M\right|}{1} \cdot \color{blue}{\frac{\left|M\right|}{\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \sqrt{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}}}\right)\]
    11. Using strategy rm
    12. Applied add-cube-cbrt21.1

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{\left|M\right|}{1} \cdot \frac{\left|M\right|}{\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \sqrt{\color{blue}{\left(\sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*} \cdot \sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}\right) \cdot \sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}}}}\right)\]
    13. Applied sqrt-prod21.1

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{\left|M\right|}{1} \cdot \frac{\left|M\right|}{\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \color{blue}{\sqrt{\sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*} \cdot \sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}} \cdot \sqrt{\sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}}}}\right)\]
    14. Applied simplify21.1

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{\left|M\right|}{1} \cdot \frac{\left|M\right|}{\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \color{blue}{\left|\sqrt[3]{(\left(\frac{\frac{d}{D} \cdot c0}{\frac{w \cdot h}{\frac{d}{D}}}\right) \cdot \left(\frac{\frac{d}{D} \cdot c0}{\frac{w \cdot h}{\frac{d}{D}}}\right) + \left(-M \cdot M\right))_*}\right|} \cdot \sqrt{\sqrt[3]{(\left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right) + \left(\left(-M\right) \cdot M\right))_*}}}\right)\]

    if +inf.0 < (* (/ c0 (* 2 w)) (* (/ (fabs M) 1) (/ (fabs M) (- (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (fabs (cbrt (fma (/ (* (/ d D) c0) (/ (* w h) (/ d D))) (/ (* (/ d D) c0) (/ (* w h) (/ d D))) (- (* M M))))) (sqrt (cbrt (fma (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (/ c0 (* h w)) (* (/ d D) (/ d D))) (* (- M) M)))))))))

    1. Initial program 61.2

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\]
    2. Taylor expanded around inf 49.8

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{0}\]
    3. Applied simplify40.8

      \[\leadsto \color{blue}{0}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 5.8m)Debug logProfile

herbie shell --seed '#(1070578969 3140398606 632207097 462683394 1189254563 964980650)' +o rules:numerics
(FPCore (c0 w h D d M)
  :name "Henrywood and Agarwal, Equation (13)"
  (* (/ c0 (* 2 w)) (+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))))