Average Error: 18.5 → 13.3
Time: 12.5s
Precision: 64
Internal Precision: 576
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le -1.2396230748310597 \cdot 10^{-181}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 4.4232076767945 \cdot 10^{-311}:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{V}}}{\sqrt{\frac{\ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 1.2463764972620927 \cdot 10^{+268}:\\ \;\;\;\;\left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right) \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\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 5 regimes
  2. if (* V l) < -inf.0

    1. Initial program 40.2

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

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

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

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

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{V}{\frac{A}{\ell}}}}}\]
    9. Using strategy rm
    10. Applied associate-/r/22.7

      \[\leadsto \frac{c0 \cdot \sqrt{1}}{\sqrt{\color{blue}{\frac{V}{A} \cdot \ell}}}\]
    11. Applied sqrt-prod37.7

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

    if -inf.0 < (* V l) < -1.2396230748310597e-181

    1. Initial program 8.5

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

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

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

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

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{V}{\frac{A}{\ell}}}}}\]
    9. Taylor expanded around inf 8.8

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

    if -1.2396230748310597e-181 < (* V l) < 4.4232076767945e-311

    1. Initial program 45.0

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

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

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

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

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{1}}{\sqrt{\frac{V}{\frac{A}{\ell}}}}}\]
    9. Using strategy rm
    10. Applied div-inv29.5

      \[\leadsto \frac{c0 \cdot \sqrt{1}}{\sqrt{\color{blue}{V \cdot \frac{1}{\frac{A}{\ell}}}}}\]
    11. Applied sqrt-prod38.5

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

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

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

    if 4.4232076767945e-311 < (* V l) < 1.2463764972620927e+268

    1. Initial program 9.2

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

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

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

    if 1.2463764972620927e+268 < (* V l)

    1. Initial program 34.3

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell = -\infty:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \le -1.2396230748310597 \cdot 10^{-181}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 4.4232076767945 \cdot 10^{-311}:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{V}}}{\sqrt{\frac{\ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \le 1.2463764972620927 \cdot 10^{+268}:\\ \;\;\;\;\left(\sqrt{\frac{1}{V \cdot \ell}} \cdot \sqrt{A}\right) \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \end{array}\]

Runtime

Time bar (total: 12.5s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes18.513.35.213.239.1%
herbie shell --seed 2018296 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))