Average Error: 18.8 → 15.1
Time: 8.5s
Precision: 64
Internal precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
⬇
\[\begin{array}{l}
\mathbf{if}\;\ell \le 6.538295639751805 \cdot 10^{-292}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{1}{\ell}}\right)\\
\end{array}\]
Derivation
- Split input into 2 regimes.
-
if l < 6.538295639751805e-292
Initial program 19.6
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
- Using strategy
rm
Applied associate-/r* 19.1
\[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]
if 6.538295639751805e-292 < l
Initial program 18.0
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
- Using strategy
rm
Applied associate-/r* 17.9
\[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}}\]
- Using strategy
rm
Applied div-inv 17.9
\[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{A}{V} \cdot \frac{1}{\ell}}}\]
Applied sqrt-prod 10.9
\[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{1}{\ell}}\right)}\]
- Recombined 2 regimes into one program.
- Removed slow pow expressions
Runtime
Please include this information when filing a bug report:
herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
(* c0 (sqrt (/ A (* V l)))))