Average Error: 19.0 → 11.7
Time: 18.6s
Precision: 64
Internal Precision: 128
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \le -2.1865608548786573 \cdot 10^{+269}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -1.1651236929952695 \cdot 10^{-184}:\\ \;\;\;\;\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 6.3621263052089 \cdot 10^{-317}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{A \cdot \frac{1}{\ell}}}{\sqrt{V}}\\ \mathbf{elif}\;V \cdot \ell \le 3.255291010794447 \cdot 10^{+300}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{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 4 regimes
  2. if (* V l) < -2.1865608548786573e+269 or 3.255291010794447e+300 < (* V l)

    1. Initial program 39.3

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

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

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

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

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

    if -2.1865608548786573e+269 < (* V l) < -1.1651236929952695e-184

    1. Initial program 7.5

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

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

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

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

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

    if -1.1651236929952695e-184 < (* V l) < 6.3621263052089e-317

    1. Initial program 45.6

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

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

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

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

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

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

    if 6.3621263052089e-317 < (* V l) < 3.255291010794447e+300

    1. Initial program 9.9

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \le -2.1865608548786573 \cdot 10^{+269}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le -1.1651236929952695 \cdot 10^{-184}:\\ \;\;\;\;\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\\ \mathbf{elif}\;V \cdot \ell \le 6.3621263052089 \cdot 10^{-317}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{A \cdot \frac{1}{\ell}}}{\sqrt{V}}\\ \mathbf{elif}\;V \cdot \ell \le 3.255291010794447 \cdot 10^{+300}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0\\ \end{array}\]

Runtime

Time bar (total: 18.6s)Debug logProfile

herbie shell --seed 2018278 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))