Average Error: 18.4 → 12.2
Time: 32.7s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{if}\;V \cdot \ell \le -1.3025674732925813 \cdot 10^{-296}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\frac{\ell}{\frac{1}{V}}}}\\ \mathbf{if}\;V \cdot \ell \le 2.684820146419165 \cdot 10^{-152}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{if}\;V \cdot \ell \le 6.09578536432317 \cdot 10^{+301}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\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 (* V l) or -1.3025674732925813e-296 < (* V l) < 2.684820146419165e-152 or 6.09578536432317e+301 < (* V l)

    1. Initial program 39.9

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

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

    if (* V l) < -1.3025674732925813e-296

    1. Initial program 9.6

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

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

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

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

    if 2.684820146419165e-152 < (* V l) < 6.09578536432317e+301

    1. Initial program 7.7

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

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

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

Runtime

Time bar (total: 32.7s)Debug logProfile

herbie shell --seed '#(1064397287 3527694221 3797617954 1138343853 2854031332 1153838279)' 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))