Average Error: 18.6 → 1.1
Time: 12.2s
Precision: binary64
\[[V, l]=\mathsf{sort}([V, l])\]
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
\[\begin{array}{l} t_0 := \frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}\\ \left(c0 \cdot \left|\frac{t_0}{\sqrt[3]{V}}\right|\right) \cdot \sqrt{\frac{1}{\frac{\sqrt[3]{V}}{t_0}}} \end{array} \]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
t_0 := \frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}\\
\left(c0 \cdot \left|\frac{t_0}{\sqrt[3]{V}}\right|\right) \cdot \sqrt{\frac{1}{\frac{\sqrt[3]{V}}{t_0}}}
\end{array}
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ (cbrt A) (cbrt l))))
   (* (* c0 (fabs (/ t_0 (cbrt V)))) (sqrt (/ 1.0 (/ (cbrt V) t_0))))))
double code(double c0, double A, double V, double l) {
	return c0 * sqrt(A / (V * l));
}
double code(double c0, double A, double V, double l) {
	double t_0 = cbrt(A) / cbrt(l);
	return (c0 * fabs(t_0 / cbrt(V))) * sqrt(1.0 / (cbrt(V) / t_0));
}

Error

Bits error versus c0

Bits error versus A

Bits error versus V

Bits error versus l

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 18.6

    \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
  2. Using strategy rm
  3. Applied clear-num_binary6419.0

    \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
  4. Simplified19.1

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

    \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V}{\frac{A}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}}} \]
  7. Applied add-cube-cbrt_binary6419.6

    \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V}{\frac{\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}}} \]
  8. Applied times-frac_binary6419.6

    \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V}{\color{blue}{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}}}}} \]
  9. Applied add-cube-cbrt_binary6419.7

    \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{\color{blue}{\left(\sqrt[3]{V} \cdot \sqrt[3]{V}\right) \cdot \sqrt[3]{V}}}{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}}}} \]
  10. Applied times-frac_binary6415.4

    \[\leadsto c0 \cdot \sqrt{\frac{1}{\color{blue}{\frac{\sqrt[3]{V} \cdot \sqrt[3]{V}}{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}} \cdot \frac{\sqrt[3]{V}}{\frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}}}}} \]
  11. Applied *-un-lft-identity_binary6415.4

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

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

    \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{\frac{1}{\frac{\sqrt[3]{V} \cdot \sqrt[3]{V}}{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}}} \cdot \sqrt{\frac{1}{\frac{\sqrt[3]{V}}{\frac{\sqrt[3]{A}}{\sqrt[3]{\ell}}}}}\right)} \]
  14. Applied associate-*r*_binary647.1

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

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

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

Reproduce

herbie shell --seed 2021196 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  :precision binary64
  (* c0 (sqrt (/ A (* V l)))))