Average Error: 19.1 → 11.0
Time: 37.9s
Precision: 64
Internal Precision: 576
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;\ell \cdot V \le -1.772391271384325 \cdot 10^{+308}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{if}\;\ell \cdot V \le -5.526743248543021 \cdot 10^{-195}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{\ell \cdot V}{A}}}\\ \mathbf{if}\;\ell \cdot V \le 6.8031775938109 \cdot 10^{-310} \lor \neg \left(\ell \cdot V \le 1.7830995791781726 \cdot 10^{+308}\right):\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{1}}{\sqrt{\ell \cdot V} \cdot \sqrt{\frac{1}{A}}}\\ \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.772391271384325e+308 or -5.526743248543021e-195 < (* V l) < 6.8031775938109e-310 or 1.7830995791781726e+308 < (* V l)

    1. Initial program 42.4

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

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

    if -1.772391271384325e+308 < (* V l) < -5.526743248543021e-195

    1. Initial program 9.1

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

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

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

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

    if 6.8031775938109e-310 < (* V l) < 1.7830995791781726e+308

    1. Initial program 10.0

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

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

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

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

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

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

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;\ell \cdot V \le -1.772391271384325 \cdot 10^{+308}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{if}\;\ell \cdot V \le -5.526743248543021 \cdot 10^{-195}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{\ell \cdot V}{A}}}\\ \mathbf{if}\;\ell \cdot V \le 6.8031775938109 \cdot 10^{-310} \lor \neg \left(\ell \cdot V \le 1.7830995791781726 \cdot 10^{+308}\right):\\ \;\;\;\;\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{1}}{\sqrt{\ell \cdot V} \cdot \sqrt{\frac{1}{A}}}\\ \end{array}}\]

Runtime

Time bar (total: 37.9s)Debug logProfile

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