Average Error: 19.1 → 15.8
Time: 57.9s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
↓
\[\begin{array}{l}
\mathbf{if}\;A \le 1.232099879448477 \cdot 10^{-293}:\\
\;\;\;\;\left(c0 \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right) \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}\]
Derivation
- Split input into 2 regimes
if A < 1.232099879448477e-293
Initial program 19.2
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
- Using strategy
rm Applied add-sqr-sqrt19.2
\[\leadsto c0 \cdot \sqrt{\color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}}}\]
Applied sqrt-prod19.4
\[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)}\]
Applied associate-*r*19.4
\[\leadsto \color{blue}{\left(c0 \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right) \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}}\]
if 1.232099879448477e-293 < A
Initial program 19.0
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
- Using strategy
rm Applied sqrt-div11.9
\[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}}}\]
- Recombined 2 regimes into one program.
- Removed slow
pow expressions.
Runtime
herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
(* c0 (sqrt (/ A (* V l)))))