Average Error: 18.7 → 10.9
Time: 9.6s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -2.981828721021837 \cdot 10^{+129}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le -9.068987324779088 \cdot 10^{-175}:\\ \;\;\;\;\sqrt{\frac{A}{\frac{\ell}{\frac{1}{V}}}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 5.6529934834504 \cdot 10^{-311}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le 4.935700522300168 \cdot 10^{+277}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \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) < -2.981828721021837e+129 or -9.068987324779088e-175 < (* V l) < 5.6529934834504e-311 or 4.935700522300168e+277 < (* V l)

    1. Initial program 34.9

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

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

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

    if -2.981828721021837e+129 < (* V l) < -9.068987324779088e-175

    1. Initial program 4.7

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

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

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

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

    if 5.6529934834504e-311 < (* V l) < 4.935700522300168e+277

    1. Initial program 9.4

      \[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.
  4. Final simplification10.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -2.981828721021837 \cdot 10^{+129}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le -9.068987324779088 \cdot 10^{-175}:\\ \;\;\;\;\sqrt{\frac{A}{\frac{\ell}{\frac{1}{V}}}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 5.6529934834504 \cdot 10^{-311}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le 4.935700522300168 \cdot 10^{+277}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array}\]

Reproduce

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