Average Error: 18.5 → 15.1
Time: 46.8s
Precision: 64
Internal Precision: 384
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
↓
\[\begin{array}{l}
\mathbf{if}\;A \le 9.4336116263587 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}\]
Derivation
- Split input into 2 regimes
if A < 9.4336116263587e-310
Initial program 19.0
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
- Using strategy
rm Applied add-sqr-sqrt19.0
\[\leadsto c0 \cdot \sqrt{\color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}}}\]
Applied sqrt-prod19.2
\[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)}\]
Taylor expanded around 0 19.2
\[\leadsto c0 \cdot \left(\sqrt{\sqrt{\color{blue}{\frac{A}{\ell \cdot V}}}} \cdot \sqrt{\sqrt{\frac{A}{V \cdot \ell}}}\right)\]
Applied simplify19.3
\[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}}\]
if 9.4336116263587e-310 < A
Initial program 18.0
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
- Using strategy
rm Applied sqrt-div11.0
\[\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 '#(1063154770 1824007522 645063331 41291047 494775821 1237684644)'
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
(* c0 (sqrt (/ A (* V l)))))