Average Error: 18.7 → 14.1
Time: 15.6s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.9826716176515314 \cdot 10^{-200}:\\ \;\;\;\;\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 5.4347221042537 \cdot 10^{-323}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{V \cdot \ell}} \cdot \left(\sqrt{A} \cdot c0\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) < -1.9826716176515314e-200

    1. Initial program 13.6

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

    if -1.9826716176515314e-200 < (* V l) < 5.4347221042537e-323

    1. Initial program 45.7

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

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

    if 5.4347221042537e-323 < (* V l)

    1. Initial program 15.3

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.9826716176515314 \cdot 10^{-200}:\\ \;\;\;\;\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 5.4347221042537 \cdot 10^{-323}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{V \cdot \ell}} \cdot \left(\sqrt{A} \cdot c0\right)\\ \end{array}\]

Reproduce

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