Average Error: 18.9 → 4.4
Time: 8.9s
Precision: binary64
\[[V, l]=\mathsf{sort}([V, l])\]
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
\[\begin{array}{l} t_0 := \sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}\\ \mathbf{if}\;\ell \leq -9.463703661952438 \cdot 10^{-308}:\\ \;\;\;\;c0 \cdot \frac{\frac{\sqrt{A}}{\sqrt{\ell \cdot \sqrt[3]{V}}}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\frac{\sqrt{A \cdot \frac{1}{\sqrt[3]{V}}}}{\sqrt{\ell}}}{t_0}\\ \end{array} \]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
t_0 := \sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}\\
\mathbf{if}\;\ell \leq -9.463703661952438 \cdot 10^{-308}:\\
\;\;\;\;c0 \cdot \frac{\frac{\sqrt{A}}{\sqrt{\ell \cdot \sqrt[3]{V}}}}{t_0}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\frac{\sqrt{A \cdot \frac{1}{\sqrt[3]{V}}}}{\sqrt{\ell}}}{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 (sqrt (* (cbrt V) (cbrt V)))))
   (if (<= l -9.463703661952438e-308)
     (* c0 (/ (/ (sqrt A) (sqrt (* l (cbrt V)))) t_0))
     (* c0 (/ (/ (sqrt (* A (/ 1.0 (cbrt V)))) (sqrt l)) 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 = sqrt(cbrt(V) * cbrt(V));
	double tmp;
	if (l <= -9.463703661952438e-308) {
		tmp = c0 * ((sqrt(A) / sqrt(l * cbrt(V))) / t_0);
	} else {
		tmp = c0 * ((sqrt(A * (1.0 / cbrt(V))) / sqrt(l)) / t_0);
	}
	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 2 regimes
  2. if l < -9.46370366195243773e-308

    1. Initial program 18.0

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Applied *-un-lft-identity_binary6418.0

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

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

      \[\leadsto c0 \cdot \sqrt{\frac{1}{\color{blue}{\left(\sqrt[3]{V} \cdot \sqrt[3]{V}\right) \cdot \sqrt[3]{V}}} \cdot \frac{A}{\ell}} \]
    5. Applied *-un-lft-identity_binary6419.7

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

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

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

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

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

      \[\leadsto c0 \cdot \frac{\sqrt{1 \cdot \color{blue}{\frac{1 \cdot A}{\sqrt[3]{V} \cdot \ell}}}}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}} \]
    11. Applied associate-*r/_binary6413.2

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

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

      \[\leadsto c0 \cdot \frac{\frac{\color{blue}{\sqrt{A}}}{\sqrt{\sqrt[3]{V} \cdot \ell}}}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}} \]
    14. Simplified3.9

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

    if -9.46370366195243773e-308 < l

    1. Initial program 19.2

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Applied *-un-lft-identity_binary6419.2

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

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

      \[\leadsto c0 \cdot \sqrt{\frac{1}{\color{blue}{\left(\sqrt[3]{V} \cdot \sqrt[3]{V}\right) \cdot \sqrt[3]{V}}} \cdot \frac{A}{\ell}} \]
    5. Applied *-un-lft-identity_binary6419.7

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

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

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

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

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

      \[\leadsto c0 \cdot \frac{\sqrt{1 \cdot \color{blue}{\frac{\frac{1}{\sqrt[3]{V}} \cdot A}{\ell}}}}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}} \]
    11. Applied associate-*r/_binary6413.3

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -9.463703661952438 \cdot 10^{-308}:\\ \;\;\;\;c0 \cdot \frac{\frac{\sqrt{A}}{\sqrt{\ell \cdot \sqrt[3]{V}}}}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\frac{\sqrt{A \cdot \frac{1}{\sqrt[3]{V}}}}{\sqrt{\ell}}}{\sqrt{\sqrt[3]{V} \cdot \sqrt[3]{V}}}\\ \end{array} \]

Reproduce

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