Average Error: 18.4 → 13.6
Time: 28.1s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le 0.0:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 2.8174139075600974 \cdot 10^{+301}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\sqrt{A}}{\ell}} \cdot \left(c0 \cdot \sqrt{\frac{\sqrt{A}}{V}}\right)\\ \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) < 0.0

    1. Initial program 21.2

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

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

    if 0.0 < (* V l) < 2.8174139075600974e+301

    1. Initial program 10.0

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity10.0

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}}\]
    4. Applied times-frac16.2

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

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

      \[\leadsto \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \cdot c0\]
    9. Applied sqrt-div0.8

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

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

    if 2.8174139075600974e+301 < (* V l)

    1. Initial program 39.2

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

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\sqrt{A} \cdot \sqrt{A}}}{V \cdot \ell}}\]
    4. Applied times-frac21.1

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt{A}}{V} \cdot \frac{\sqrt{A}}{\ell}}}\]
    5. Applied sqrt-prod34.5

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

      \[\leadsto \color{blue}{\left(c0 \cdot \sqrt{\frac{\sqrt{A}}{V}}\right) \cdot \sqrt{\frac{\sqrt{A}}{\ell}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification13.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le 0.0:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 2.8174139075600974 \cdot 10^{+301}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\sqrt{A}}{\ell}} \cdot \left(c0 \cdot \sqrt{\frac{\sqrt{A}}{V}}\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019094 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))