Average Error: 18.6 → 11.5
Time: 13.6s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -9.900301782096841 \cdot 10^{-176}:\\ \;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \le 6.1715518458355 \cdot 10^{-316}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 1.1986894149050468 \cdot 10^{+299}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}} \cdot \left(\sqrt{\sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}} \cdot c0\right)\\ \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) < -9.900301782096841e-176

    1. Initial program 13.7

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

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

    if -9.900301782096841e-176 < (* V l) < 6.1715518458355e-316

    1. Initial program 43.3

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

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

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

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

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

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

    if 6.1715518458355e-316 < (* V l) < 1.1986894149050468e+299

    1. Initial program 10.2

      \[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 *-commutative16.0

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0}\]
    5. Using strategy rm
    6. Applied div-inv16.0

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

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

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

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

    if 1.1986894149050468e+299 < (* V l)

    1. Initial program 39.7

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -9.900301782096841 \cdot 10^{-176}:\\ \;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \le 6.1715518458355 \cdot 10^{-316}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 1.1986894149050468 \cdot 10^{+299}:\\ \;\;\;\;\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}} \cdot \left(\sqrt{\sqrt{\frac{1}{\ell} \cdot \frac{A}{V}}} \cdot c0\right)\\ \end{array}\]

Runtime

Time bar (total: 13.6s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes18.611.55.113.452.7%
herbie shell --seed 2018354 +o rules:numerics
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))