Average Error: 18.6 → 12.5
Time: 44.0s
Precision: 64
Internal Precision: 576
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -2.8007857470045065 \cdot 10^{+109}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{if}\;V \cdot \ell \le -1.658524568498766 \cdot 10^{-136}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{1}{V \cdot \ell}}{\frac{1}{A}}}\\ \mathbf{if}\;V \cdot \ell \le -0.0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{1}}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array}\]

Error

Bits error versus c0

Bits error versus A

Bits error versus V

Bits error versus l

Derivation

  1. Split input into 3 regimes
  2. if (* V l) < -2.8007857470045065e+109 or -1.658524568498766e-136 < (* V l) < -0.0

    1. Initial program 31.0

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied associate-/r*23.6

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]

    if -2.8007857470045065e+109 < (* V l) < -1.658524568498766e-136

    1. Initial program 4.8

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied clear-num5.2

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}}\]
    4. Using strategy rm
    5. Applied div-inv5.2

      \[\leadsto c0 \cdot \sqrt{\frac{1}{\color{blue}{\left(V \cdot \ell\right) \cdot \frac{1}{A}}}}\]
    6. Applied associate-/r*4.9

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{V \cdot \ell}}{\frac{1}{A}}}}\]

    if -0.0 < (* V l)

    1. Initial program 14.5

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied clear-num14.7

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}}\]
    4. Using strategy rm
    5. Applied sqrt-div14.6

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}}\]
    6. Applied associate-*r/14.5

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}}\]
    7. Using strategy rm
    8. Applied sqrt-div6.9

      \[\leadsto \frac{c0 \cdot \sqrt{1}}{\color{blue}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 44.0s)Debug logProfile

herbie shell --seed '#(1071821486 549052472 3784827256 1559736200 3548510075 881134285)' 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))