Average Error: 18.5 → 11.4
Time: 10.6s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -1.8712132552540234 \cdot 10^{-118}:\\ \;\;\;\;\sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 5.98200702246031 \cdot 10^{+244}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \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) < -inf.0 or -1.8712132552540234e-118 < (* V l) < -0.0 or 5.98200702246031e+244 < (* V l)

    1. Initial program 36.5

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

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

    if -inf.0 < (* V l) < -1.8712132552540234e-118

    1. Initial program 7.7

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

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

    if -0.0 < (* V l) < 5.98200702246031e+244

    1. Initial program 9.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -1.8712132552540234 \cdot 10^{-118}:\\ \;\;\;\;\sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -0.0:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 5.98200702246031 \cdot 10^{+244}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \end{array}\]

Reproduce

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