Average Error: 18.3 → 11.3
Time: 38.4s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;\frac{A}{V} \le -1.0079960285198898 \cdot 10^{-155}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{if}\;\frac{A}{V} \le 7.5441286598801 \cdot 10^{-316}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{if}\;\frac{A}{V} \le 5.162176802186508 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{1}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{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 3 regimes
  2. if (/ A V) < -1.0079960285198898e-155

    1. Initial program 18.3

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

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

    if -1.0079960285198898e-155 < (/ A V) < 7.5441286598801e-316 or 5.162176802186508e+304 < (/ A V)

    1. Initial program 22.7

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

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

      \[\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 22.8

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

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

    if 7.5441286598801e-316 < (/ A V) < 5.162176802186508e+304

    1. Initial program 15.5

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

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

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

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

Runtime

Time bar (total: 38.4s)Debug logProfile

herbie shell --seed '#(1070386091 2509006183 1430610344 1025408621 36622005 1425925650)' 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))