Average Error: 58.3 → 28.1
Time: 4.0m
Precision: 64
Internal Precision: 6528
\[\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{M}{\sqrt[3]{\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} - \sqrt{\left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} + M\right) \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} - M\right)}} \cdot \sqrt[3]{\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} - \sqrt{\left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} + M\right) \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} - M\right)}}} \cdot \frac{M}{\sqrt[3]{\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{h}}{w} - \sqrt{\left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{h}}{w} + M\right) \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{h}}{w} - M\right)}}}\right) = -\infty:\\ \;\;\;\;\frac{c0}{\frac{w}{1}} \cdot \left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)\\ \mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(\frac{M}{\sqrt[3]{\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} - \sqrt{\left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} + M\right) \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} - M\right)}} \cdot \sqrt[3]{\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} - \sqrt{\left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} + M\right) \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h} - M\right)}}} \cdot \frac{M}{\sqrt[3]{\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{h}}{w} - \sqrt{\left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{h}}{w} + M\right) \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{h}}{w} - M\right)}}}\right) \le +\infty:\\ \;\;\;\;M \cdot \frac{\frac{c0}{w + w} \cdot M}{\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{h \cdot w} - \sqrt{\left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{h \cdot w} + M\right) \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{h \cdot w} - M\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)) (* (/ M (* (cbrt (- (* (* (/ d D) (/ d D)) (/ c0 (* w h))) (sqrt (* (+ (* (* (/ d D) (/ d D)) (/ c0 (* w h))) M) (- (* (* (/ d D) (/ d D)) (/ c0 (* w h))) M))))) (cbrt (- (* (* (/ d D) (/ d D)) (/ c0 (* w h))) (sqrt (* (+ (* (* (/ d D) (/ d D)) (/ c0 (* w h))) M) (- (* (* (/ d D) (/ d D)) (/ c0 (* w h))) M))))))) (/ M (cbrt (- (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) (sqrt (* (+ (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) M) (- (* (* (/ d D) (/ d D)) (/ (/ c0 h) w)) M)))))))) < -inf.0

    1. Initial program 44.5

      \[\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-+62.2

      \[\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 simplify61.1

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{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. Taylor expanded around 0 44.9

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\]
    6. Applied simplify12.9

      \[\leadsto \color{blue}{\frac{c0}{\frac{w}{1}} \cdot \left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)}\]

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

    1. Initial program 58.3

      \[\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-+60.4

      \[\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 simplify34.0

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{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 add-cbrt-cube34.5

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\sqrt[3]{\left(\frac{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}} \cdot \frac{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) \cdot \frac{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}}}}\]
    7. Applied simplify28.3

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \sqrt[3]{\color{blue}{{\left(\frac{M \cdot M}{\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \sqrt{\left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) + M\right) \cdot \left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - M\right)}}\right)}^{3}}}\]
    8. Taylor expanded around 0 35.3

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \sqrt[3]{{\left(\frac{M \cdot M}{\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - \sqrt{\left(\color{blue}{\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(h \cdot w\right)}} + M\right) \cdot \left(\frac{\frac{c0}{w}}{h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right) - M\right)}}\right)}^{3}}\]
    9. Applied simplify22.5

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

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

    1. Initial program 59.9

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

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

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

Runtime

Time bar (total: 4.0m)Debug logProfile

herbie shell --seed '#(1070227846 1561819246 480764335 4016816270 2602869839 2117310382)' 
(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))))))