Average Error: 18.6 → 12.7
Time: 16.1s
Precision: 64
Internal Precision: 576
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.834726847548682 \cdot 10^{-303}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 0.0:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \le 7.297548322330844 \cdot 10^{+277}:\\ \;\;\;\;\sqrt{A} \cdot \frac{c0}{\sqrt{V \cdot \ell}}\\ \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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if (* V l) < -1.834726847548682e-303

    1. Initial program 14.7

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

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

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

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

    if -1.834726847548682e-303 < (* V l) < 0.0

    1. Initial program 59.5

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}}\]
    4. Using strategy rm
    5. Applied sqrt-div59.3

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

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}}\]
    7. Using strategy rm
    8. Applied associate-/l*36.3

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

    if 0.0 < (* V l) < 7.297548322330844e+277

    1. Initial program 9.7

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

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

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

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}}\]
    7. Using strategy rm
    8. Applied sqrt-div0.7

      \[\leadsto \frac{c0 \cdot \sqrt{1}}{\color{blue}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}}\]
    9. Applied associate-/r/2.8

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

    if 7.297548322330844e+277 < (* V l)

    1. Initial program 38.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.834726847548682 \cdot 10^{-303}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 0.0:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \le 7.297548322330844 \cdot 10^{+277}:\\ \;\;\;\;\sqrt{A} \cdot \frac{c0}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \end{array}\]

Runtime

Time bar (total: 16.1s)Debug logProfile

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