Average Error: 18.5 → 14.9
Time: 57.8s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
↓
\[\begin{array}{l}
\mathbf{if}\;A \le 2.727869072918322 \cdot 10^{-305}:\\
\;\;\;\;c0 \cdot \sqrt{A \cdot \frac{1}{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}\]
Derivation
- Split input into 2 regimes
if A < 2.727869072918322e-305
Initial program 18.0
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
- Using strategy
rm Applied div-inv18.2
\[\leadsto c0 \cdot \sqrt{\color{blue}{A \cdot \frac{1}{V \cdot \ell}}}\]
if 2.727869072918322e-305 < A
Initial program 19.0
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
- Using strategy
rm Applied sqrt-div11.5
\[\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 '#(1063027428 1192549564 1443466578 604016274 3637110559 1698629644)'
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
(* c0 (sqrt (/ A (* V l)))))