Average Error: 18.5 → 10.9
Time: 14.8s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -2.821003596854944 \cdot 10^{+233}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;V \cdot \ell \le -3.2397204536276 \cdot 10^{-313}:\\ \;\;\;\;\sqrt{\frac{A}{\frac{\ell}{\frac{1}{V}}}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 0.0:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le 2.3783141537124378 \cdot 10^{+285}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\ell} \cdot \frac{A}{V}} \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 5 regimes
  2. if (* V l) < -2.821003596854944e+233

    1. Initial program 32.7

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Initial simplification21.3

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

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

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

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

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

    if -2.821003596854944e+233 < (* V l) < -3.2397204536276e-313

    1. Initial program 9.0

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

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

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A \cdot \frac{1}{V}}}{\ell}}\]
    5. Applied associate-/l*9.1

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

    if -3.2397204536276e-313 < (* V l) < 0.0

    1. Initial program 59.8

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

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

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

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

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

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

    if 0.0 < (* V l) < 2.3783141537124378e+285

    1. Initial program 10.1

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Initial simplification16.0

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

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

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

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

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

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

    if 2.3783141537124378e+285 < (* V l)

    1. Initial program 38.6

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -2.821003596854944 \cdot 10^{+233}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;V \cdot \ell \le -3.2397204536276 \cdot 10^{-313}:\\ \;\;\;\;\sqrt{\frac{A}{\frac{\ell}{\frac{1}{V}}}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 0.0:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le 2.3783141537124378 \cdot 10^{+285}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\ell} \cdot \frac{A}{V}} \cdot c0\\ \end{array}\]

Runtime

Time bar (total: 14.8s)Debug logProfile

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