Average Error: 18.6 → 11.9
Time: 11.8s
Precision: 64
Internal Precision: 576
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.4233568820993158 \cdot 10^{+232}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -4.163200693932671 \cdot 10^{-220}:\\ \;\;\;\;\frac{\sqrt{1} \cdot c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 1.596533200198 \cdot 10^{-314}:\\ \;\;\;\;\frac{\sqrt{1} \cdot c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{1} \cdot c0}{\sqrt{\frac{1}{A}} \cdot \sqrt{V \cdot \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 (* V l) < -1.4233568820993158e+232

    1. Initial program 33.5

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Initial simplification22.8

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

    if -1.4233568820993158e+232 < (* V l) < -4.163200693932671e-220

    1. Initial program 8.3

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

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

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

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

    if -4.163200693932671e-220 < (* V l) < 1.596533200198e-314

    1. Initial program 48.2

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

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

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

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

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

    if 1.596533200198e-314 < (* V l)

    1. Initial program 14.2

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

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

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

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

      \[\leadsto \frac{c0 \cdot \sqrt{1}}{\sqrt{\color{blue}{\left(V \cdot \ell\right) \cdot \frac{1}{A}}}}\]
    9. Applied sqrt-prod6.7

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -1.4233568820993158 \cdot 10^{+232}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -4.163200693932671 \cdot 10^{-220}:\\ \;\;\;\;\frac{\sqrt{1} \cdot c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 1.596533200198 \cdot 10^{-314}:\\ \;\;\;\;\frac{\sqrt{1} \cdot c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{1} \cdot c0}{\sqrt{\frac{1}{A}} \cdot \sqrt{V \cdot \ell}}\\ \end{array}\]

Runtime

Time bar (total: 11.8s)Debug logProfile

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