Average Error: 19.4 → 6.4
Time: 6.4s
Precision: binary64
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;V \leq 5.565384703489568 \cdot 10^{+142}:\\ \;\;\;\;c0 \cdot \left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V}}\right| \cdot \sqrt{\frac{\sqrt[3]{A}}{\sqrt[3]{V} \cdot \ell}}\right)\\ \mathbf{elif}\;V \leq 8.068698780946028 \cdot 10^{+215}:\\ \;\;\;\;\left(c0 \cdot \sqrt{\frac{{\left(\sqrt[3]{A}\right)}^{2}}{V}}\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(c0 \cdot \left|\frac{\sqrt[3]{A}}{\sqrt[3]{V}}\right|\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\frac{\sqrt[3]{V}}{\frac{1}{\ell}}}}\\ \end{array}\]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
\mathbf{if}\;V \leq 5.565384703489568 \cdot 10^{+142}:\\
\;\;\;\;c0 \cdot \left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V}}\right| \cdot \sqrt{\frac{\sqrt[3]{A}}{\sqrt[3]{V} \cdot \ell}}\right)\\

\mathbf{elif}\;V \leq 8.068698780946028 \cdot 10^{+215}:\\
\;\;\;\;\left(c0 \cdot \sqrt{\frac{{\left(\sqrt[3]{A}\right)}^{2}}{V}}\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot \left|\frac{\sqrt[3]{A}}{\sqrt[3]{V}}\right|\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\frac{\sqrt[3]{V}}{\frac{1}{\ell}}}}\\

\end{array}
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
(FPCore (c0 A V l)
 :precision binary64
 (if (<= V 5.565384703489568e+142)
   (* c0 (* (fabs (/ (cbrt A) (cbrt V))) (sqrt (/ (cbrt A) (* (cbrt V) l)))))
   (if (<= V 8.068698780946028e+215)
     (* (* c0 (sqrt (/ (pow (cbrt A) 2.0) V))) (sqrt (/ (cbrt A) l)))
     (*
      (* c0 (fabs (/ (cbrt A) (cbrt V))))
      (sqrt (/ (cbrt A) (/ (cbrt V) (/ 1.0 l))))))))
double code(double c0, double A, double V, double l) {
	return ((double) (c0 * ((double) sqrt((A / ((double) (V * l)))))));
}
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V <= 5.565384703489568e+142)) {
		tmp = ((double) (c0 * ((double) (((double) fabs((((double) cbrt(A)) / ((double) cbrt(V))))) * ((double) sqrt((((double) cbrt(A)) / ((double) (((double) cbrt(V)) * l)))))))));
	} else {
		double tmp_1;
		if ((V <= 8.068698780946028e+215)) {
			tmp_1 = ((double) (((double) (c0 * ((double) sqrt((((double) pow(((double) cbrt(A)), 2.0)) / V))))) * ((double) sqrt((((double) cbrt(A)) / l)))));
		} else {
			tmp_1 = ((double) (((double) (c0 * ((double) fabs((((double) cbrt(A)) / ((double) cbrt(V))))))) * ((double) sqrt((((double) cbrt(A)) / (((double) cbrt(V)) / (1.0 / l)))))));
		}
		tmp = tmp_1;
	}
	return tmp;
}

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. Split input into 3 regimes
  2. if V < 5.56538470348956816e142

    1. Initial program 19.1

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt_binary6419.4

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}}}{V \cdot \ell}}\]
    4. Applied associate-/l*_binary6419.4

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\frac{V \cdot \ell}{\sqrt[3]{A}}}}}\]
    5. Simplified17.8

      \[\leadsto c0 \cdot \sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\color{blue}{\frac{V}{\frac{\sqrt[3]{A}}{\ell}}}}}\]
    6. Using strategy rm
    7. Applied div-inv_binary6417.8

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

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

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

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

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

      \[\leadsto c0 \cdot \left(\color{blue}{\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V}}\right|} \cdot \sqrt{\frac{\sqrt[3]{A}}{\frac{\sqrt[3]{V}}{\frac{1}{\ell}}}}\right)\]
    13. Simplified5.9

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

    if 5.56538470348956816e142 < V < 8.0686987809460277e215

    1. Initial program 20.5

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt_binary6420.8

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}}}{V \cdot \ell}}\]
    4. Applied associate-/l*_binary6420.8

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

      \[\leadsto c0 \cdot \sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\color{blue}{\frac{V}{\frac{\sqrt[3]{A}}{\ell}}}}}\]
    6. Using strategy rm
    7. Applied associate-/r/_binary6419.0

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

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{A}}{\frac{V}{\sqrt[3]{A}}} \cdot \frac{\sqrt[3]{A}}{\ell}}}\]
    9. Applied sqrt-prod_binary649.0

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

      \[\leadsto \color{blue}{\left(c0 \cdot \sqrt{\frac{\sqrt[3]{A}}{\frac{V}{\sqrt[3]{A}}}}\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}}\]
    11. Simplified10.7

      \[\leadsto \color{blue}{\left(\sqrt{\frac{{\left(\sqrt[3]{A}\right)}^{2}}{V}} \cdot c0\right)} \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}\]

    if 8.0686987809460277e215 < V

    1. Initial program 22.8

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

      \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}}}{V \cdot \ell}}\]
    4. Applied associate-/l*_binary6423.0

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\frac{V \cdot \ell}{\sqrt[3]{A}}}}}\]
    5. Simplified22.7

      \[\leadsto c0 \cdot \sqrt{\frac{\sqrt[3]{A} \cdot \sqrt[3]{A}}{\color{blue}{\frac{V}{\frac{\sqrt[3]{A}}{\ell}}}}}\]
    6. Using strategy rm
    7. Applied div-inv_binary6422.7

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V}}\right| \cdot c0\right)} \cdot \sqrt{\frac{\sqrt[3]{A}}{\frac{\sqrt[3]{V}}{\frac{1}{\ell}}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification6.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \leq 5.565384703489568 \cdot 10^{+142}:\\ \;\;\;\;c0 \cdot \left(\left|\frac{\sqrt[3]{A}}{\sqrt[3]{V}}\right| \cdot \sqrt{\frac{\sqrt[3]{A}}{\sqrt[3]{V} \cdot \ell}}\right)\\ \mathbf{elif}\;V \leq 8.068698780946028 \cdot 10^{+215}:\\ \;\;\;\;\left(c0 \cdot \sqrt{\frac{{\left(\sqrt[3]{A}\right)}^{2}}{V}}\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(c0 \cdot \left|\frac{\sqrt[3]{A}}{\sqrt[3]{V}}\right|\right) \cdot \sqrt{\frac{\sqrt[3]{A}}{\frac{\sqrt[3]{V}}{\frac{1}{\ell}}}}\\ \end{array}\]

Reproduce

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