Average Error: 19.0 → 12.9
Time: 1.0m
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;A \le 5.965239164266312 \cdot 10^{-292}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\ell}} \cdot \sqrt{\frac{\sqrt[3]{\frac{A}{V}}}{\frac{1}{\sqrt[3]{\frac{A}{V}}}}}\right)\\ \mathbf{if}\;A \le 9.753151510725795 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \mathbf{if}\;A \le 3.0005464551918174 \cdot 10^{+269}:\\ \;\;\;\;c0 \cdot \frac{\left|\sqrt[3]{\frac{A}{V}}\right|}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}\\ \mathbf{if}\;A \le 7.55641947668517 \cdot 10^{+303}:\\ \;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}} \cdot \sqrt{\sqrt{\frac{\frac{A}{V}}{\ell}}}\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 < 5.965239164266312e-292

    1. Initial program 18.8

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt19.3

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\left(\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}\right) \cdot \sqrt[3]{\frac{A}{V}}}}{\ell}}\]
    6. Applied associate-/l*19.3

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

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

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

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

    if 5.965239164266312e-292 < A < 9.753151510725795e-128 or 3.0005464551918174e+269 < A < 7.55641947668517e+303

    1. Initial program 21.2

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

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

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

    if 9.753151510725795e-128 < A < 3.0005464551918174e+269

    1. Initial program 18.0

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

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

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\left(\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}\right) \cdot \sqrt[3]{\frac{A}{V}}}}{\ell}}\]
    6. Applied associate-/l*18.5

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

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}}}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}}\]
    9. Applied simplify11.8

      \[\leadsto c0 \cdot \frac{\color{blue}{\left|\sqrt[3]{\frac{A}{V}}\right|}}{\sqrt{\frac{\ell}{\sqrt[3]{\frac{A}{V}}}}}\]

    if 7.55641947668517e+303 < A

    1. Initial program 31.8

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]
    4. Using strategy rm
    5. Applied add-sqr-sqrt34.2

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

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

Runtime

Time bar (total: 1.0m)Debug logProfile

herbie shell --seed '#(1063185673 2139736501 2393378123 1907444849 1070993796 1007244912)' 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  (* c0 (sqrt (/ A (* V l)))))