Average Error: 18.9 → 13.7
Time: 28.8s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;\frac{A}{\ell} = -\infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{if}\;\frac{A}{\ell} \le -3.7332799346494 \cdot 10^{-315}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{if}\;\frac{A}{\ell} \le 3.131276323748482 \cdot 10^{-308}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{A}{\ell}} \cdot \sqrt{\frac{1}{V}}\right)\\ \end{array}\]

Error

Bits error versus c0

Bits error versus A

Bits error versus V

Bits error versus l

Derivation

  1. Split input into 4 regimes
  2. if (/ A l) < -inf.0

    1. Initial program 33.6

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

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

    if -inf.0 < (/ A l) < -3.7332799346494e-315

    1. Initial program 16.0

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}}}\]
    4. Applied sqrt-prod16.2

      \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)}\]
    5. Taylor expanded around 0 16.2

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

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

    if -3.7332799346494e-315 < (/ A l) < 3.131276323748482e-308

    1. Initial program 24.6

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

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

    if 3.131276323748482e-308 < (/ A l)

    1. Initial program 18.0

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}}}\]
    4. Applied sqrt-prod18.2

      \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)}\]
    5. Taylor expanded around 0 18.2

      \[\leadsto c0 \cdot \left(\sqrt{\sqrt{\color{blue}{\frac{A}{\ell \cdot V}}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)\]
    6. Applied simplify14.9

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

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

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

Runtime

Time bar (total: 28.8s)Debug logProfile

herbie shell --seed '#(1070991898 1055468627 4280279443 640792587 928206309 3646738750)' 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))