Average Error: 18.6 → 11.5
Time: 43.3s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;\frac{1}{V \cdot \ell} \le -2.5028730722970293 \cdot 10^{+285}:\\ \;\;\;\;\left(c0 \cdot \sqrt{\frac{A}{V}}\right) \cdot \sqrt{\frac{1}{\ell}}\\ \mathbf{if}\;\frac{1}{V \cdot \ell} \le -7.060445653803138 \cdot 10^{-90}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;\frac{1}{V \cdot \ell} \le 1.0975874925765622 \cdot 10^{-288}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{\ell}{\frac{A}{V}}}}\\ \mathbf{if}\;\frac{1}{V \cdot \ell} \le 3.8597096233509033 \cdot 10^{+287}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{1}{\frac{\ell}{\frac{A}{V}}}}\\ \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 (/ 1 (* V l)) < -2.5028730722970293e+285

    1. Initial program 53.6

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied associate-/r*33.6

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

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

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

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

    if -2.5028730722970293e+285 < (/ 1 (* V l)) < -7.060445653803138e-90

    1. Initial program 8.4

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

    if -7.060445653803138e-90 < (/ 1 (* V l)) < 1.0975874925765622e-288 or 3.8597096233509033e+287 < (/ 1 (* V l))

    1. Initial program 32.0

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied associate-/r*21.1

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]
    4. Using strategy rm
    5. Applied clear-num21.7

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

    if 1.0975874925765622e-288 < (/ 1 (* V l)) < 3.8597096233509033e+287

    1. Initial program 8.9

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

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

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

Runtime

Time bar (total: 43.3s)Debug logProfile

herbie shell --seed '#(1070131407 1246090267 3027482374 2150728003 2026520792 2347815650)' 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))