Average Error: 18.7 → 11.6
Time: 13.7s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}\\ \mathbf{elif}\;V \cdot \ell \le -1.8986014487090691 \cdot 10^{-177}:\\ \;\;\;\;\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 1.2995097584247 \cdot 10^{-314}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}\\ \mathbf{elif}\;V \cdot \ell \le 1.73207946493412 \cdot 10^{+299}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}} \cdot c0}{\sqrt{\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) < -inf.0 or -1.8986014487090691e-177 < (* V l) < 1.2995097584247e-314

    1. Initial program 43.2

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

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

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

    if -inf.0 < (* V l) < -1.8986014487090691e-177

    1. Initial program 7.9

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

    if 1.2995097584247e-314 < (* V l) < 1.73207946493412e+299

    1. Initial program 9.4

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

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

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

    if 1.73207946493412e+299 < (* V l)

    1. Initial program 38.8

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}\\ \mathbf{elif}\;V \cdot \ell \le -1.8986014487090691 \cdot 10^{-177}:\\ \;\;\;\;\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 1.2995097584247 \cdot 10^{-314}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}\\ \mathbf{elif}\;V \cdot \ell \le 1.73207946493412 \cdot 10^{+299}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}} \cdot c0}{\sqrt{\ell}}\\ \end{array}\]

Runtime

Time bar (total: 13.7s)Debug logProfile

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