Average Error: 19.0 → 15.4
Time: 49.2s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;\ell \le -2.3271613852402163 \cdot 10^{+128}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\ \mathbf{if}\;\ell \le 1.30454768034364 \cdot 10^{-302}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\frac{\ell}{\frac{1}{V}}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \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 l < -2.3271613852402163e+128

    1. Initial program 21.6

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

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

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

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

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

    if -2.3271613852402163e+128 < l < 1.30454768034364e-302

    1. Initial program 18.2

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

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

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

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

    if 1.30454768034364e-302 < l

    1. Initial program 18.8

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

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

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}}\]
  3. Recombined 3 regimes into one program.
  4. Removed slow pow expressions.

Runtime

Time bar (total: 49.2s)Debug logProfile

herbie shell --seed '#(1063313015 2771194459 1594909340 1344785158 2223560818 546365448)' 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))