\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1.4377169794853728 \cdot 10^{+142}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(-\frac{\ell \cdot \sqrt{0.5}}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2.097052792833422 \cdot 10^{+35}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \log \left(e^{{\left(\frac{Om}{Omc}\right)}^{2}}\right)}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1.4377169794853728e+142)
(asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (- (/ (* l (sqrt 0.5)) t))))
(if (<= (/ t l) 2.097052792833422e+35)
(asin
(sqrt
(/
(- 1.0 (log (exp (pow (/ Om Omc) 2.0))))
(+ 1.0 (* 2.0 (pow (/ t l) 2.0))))))
(asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (* l (sqrt 0.5)) t))))))double code(double t, double l, double Om, double Omc) {
return asin(sqrt((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0)))));
}
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1.4377169794853728e+142) {
tmp = asin(sqrt(1.0 - pow((Om / Omc), 2.0)) * -((l * sqrt(0.5)) / t));
} else if ((t / l) <= 2.097052792833422e+35) {
tmp = asin(sqrt((1.0 - log(exp(pow((Om / Omc), 2.0)))) / (1.0 + (2.0 * pow((t / l), 2.0)))));
} else {
tmp = asin(sqrt(1.0 - pow((Om / Omc), 2.0)) * ((l * sqrt(0.5)) / t));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus Om



Bits error versus Omc
Results
if (/.f64 t l) < -1.4377169794853728e142Initial program 34.1
Taylor expanded around -inf 8.7
Simplified0.3
if -1.4377169794853728e142 < (/.f64 t l) < 2.0970527928334218e35Initial program 0.9
rmApplied add-log-exp_binary64_1170.9
rmApplied pow1_binary64_1390.9
Applied log-pow_binary64_1670.9
if 2.0970527928334218e35 < (/.f64 t l) Initial program 22.0
Taylor expanded around inf 8.4
Simplified0.3
Final simplification0.7
herbie shell --seed 2021075
(FPCore (t l Om Omc)
:name "Toniolo and Linder, Equation (2)"
:precision binary64
(asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))