Average Error: 18.3 → 10.8
Time: 40.5s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.9628000619737582 \cdot 10^{+279}:\\ \;\;\;\;\left(c0 \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\right) \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\\ \mathbf{if}\;V \cdot \ell \le -2.544925979059478 \cdot 10^{-208}:\\ \;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\ \mathbf{if}\;V \cdot \ell \le 4.1872034300588 \cdot 10^{-314}:\\ \;\;\;\;\left(c0 \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\right) \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\\ \mathbf{if}\;V \cdot \ell \le 1.5990882657450854 \cdot 10^{+238}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(c0 \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\right) \cdot \sqrt{\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) < -1.9628000619737582e+279 or -2.544925979059478e-208 < (* V l) < 4.1872034300588e-314 or 1.5990882657450854e+238 < (* V l)

    1. Initial program 39.4

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

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}}}\]
    6. Applied sqrt-prod25.4

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

      \[\leadsto \color{blue}{\left(c0 \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\right) \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}}\]

    if -1.9628000619737582e+279 < (* V l) < -2.544925979059478e-208

    1. Initial program 8.0

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

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

    if 4.1872034300588e-314 < (* V l) < 1.5990882657450854e+238

    1. Initial program 9.2

      \[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}}}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 40.5s)Debug logProfile

herbie shell --seed '#(1070864556 424010669 783715395 1203517814 4070606583 4107618214)' +o rules:numerics
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))