Average Error: 18.8 → 11.1
Time: 12.0s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.9189134536583433 \cdot 10^{+130}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -3.9859643216413675 \cdot 10^{-197}:\\ \;\;\;\;\left(\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right) \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 3.4056157416065 \cdot 10^{-317} \lor \neg \left(V \cdot \ell \le 7.671988042045826 \cdot 10^{+285}\right):\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right) \cdot c0\\ \end{array}\]

Error

Bits error versus c0

Bits error versus A

Bits error versus V

Bits error versus l

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if (* V l) < -1.9189134536583433e+130 or -3.9859643216413675e-197 < (* V l) < 3.4056157416065e-317 or 7.671988042045826e+285 < (* V l)

    1. Initial program 34.8

      \[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}}}\]

    if -1.9189134536583433e+130 < (* V l) < -3.9859643216413675e-197

    1. Initial program 5.9

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

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

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

    if 3.4056157416065e-317 < (* V l) < 7.671988042045826e+285

    1. Initial program 9.7

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.9189134536583433 \cdot 10^{+130}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -3.9859643216413675 \cdot 10^{-197}:\\ \;\;\;\;\left(\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right) \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 3.4056157416065 \cdot 10^{-317} \lor \neg \left(V \cdot \ell \le 7.671988042045826 \cdot 10^{+285}\right):\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right) \cdot c0\\ \end{array}\]

Reproduce

herbie shell --seed 2019030 +o rules:numerics
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))