Average Error: 19.0 → 14.2
Time: 21.3s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} = -\infty:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}} \cdot c0\\ \mathbf{elif}\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \le -5.771404596462238 \cdot 10^{-208}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \le 0.0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \le 2.0451092951742008 \cdot 10^{+286}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{A}{V}} \cdot c0\right) \cdot \sqrt{\frac{1}{\ell}}\\ \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 4 regimes
  2. if (* c0 (sqrt (/ A (* V l)))) < -inf.0

    1. Initial program 61.0

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Initial simplification47.1

      \[\leadsto c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\]
    3. Using strategy rm
    4. Applied sqrt-div42.3

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

    if -inf.0 < (* c0 (sqrt (/ A (* V l)))) < -5.771404596462238e-208 or 0.0 < (* c0 (sqrt (/ A (* V l)))) < 2.0451092951742008e+286

    1. Initial program 0.8

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

    if -5.771404596462238e-208 < (* c0 (sqrt (/ A (* V l)))) < 0.0

    1. Initial program 31.1

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Initial simplification23.6

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

    if 2.0451092951742008e+286 < (* c0 (sqrt (/ A (* V l))))

    1. Initial program 56.4

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Initial simplification43.6

      \[\leadsto c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\]
    3. Using strategy rm
    4. Applied div-inv43.6

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} = -\infty:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}} \cdot c0\\ \mathbf{elif}\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \le -5.771404596462238 \cdot 10^{-208}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \le 0.0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \le 2.0451092951742008 \cdot 10^{+286}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{A}{V}} \cdot c0\right) \cdot \sqrt{\frac{1}{\ell}}\\ \end{array}\]

Runtime

Time bar (total: 21.3s)Debug logProfile

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