\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 -8.210628599653104 \cdot 10^{+185}:\\
\;\;\;\;\sin^{-1} \left(\left(\sqrt{\frac{1}{1 - {\left(\frac{Om}{Omc}\right)}^{2}}} \cdot 0.125\right) \cdot \left(\frac{{\ell}^{3}}{\sqrt{0.5} \cdot {t}^{3}} - {\left(\frac{Om}{Omc}\right)}^{2} \cdot \frac{{\ell}^{3}}{\sqrt{0.5} \cdot {t}^{3}}\right) - \sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 3.0531447535757206 \cdot 10^{+112}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\left(1 + \frac{Om}{Omc}\right) \cdot \frac{1 - \frac{Om}{Omc}}{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) -8.210628599653104e+185)
(asin
(-
(*
(* (sqrt (/ 1.0 (- 1.0 (pow (/ Om Omc) 2.0)))) 0.125)
(-
(/ (pow l 3.0) (* (sqrt 0.5) (pow t 3.0)))
(* (pow (/ Om Omc) 2.0) (/ (pow l 3.0) (* (sqrt 0.5) (pow t 3.0))))))
(* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (* l (sqrt 0.5)) t))))
(if (<= (/ t l) 3.0531447535757206e+112)
(asin
(sqrt
(*
(+ 1.0 (/ Om Omc))
(/ (- 1.0 (/ Om Omc)) (+ 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) <= -8.210628599653104e+185) {
tmp = asin(((sqrt(1.0 / (1.0 - pow((Om / Omc), 2.0))) * 0.125) * ((pow(l, 3.0) / (sqrt(0.5) * pow(t, 3.0))) - (pow((Om / Omc), 2.0) * (pow(l, 3.0) / (sqrt(0.5) * pow(t, 3.0)))))) - (sqrt(1.0 - pow((Om / Omc), 2.0)) * ((l * sqrt(0.5)) / t)));
} else if ((t / l) <= 3.0531447535757206e+112) {
tmp = asin(sqrt((1.0 + (Om / Omc)) * ((1.0 - (Om / Omc)) / (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) < -8.21062859965310352e185Initial program 29.7
Taylor expanded around -inf 9.5
Simplified0.6
if -8.21062859965310352e185 < (/.f64 t l) < 3.05314475357572065e112Initial program 2.4
rmApplied *-un-lft-identity_binary64_782.4
Applied sqr-pow_binary64_502.4
Applied *-un-lft-identity_binary64_782.4
Applied difference-of-squares_binary64_472.5
Applied times-frac_binary64_842.5
if 3.05314475357572065e112 < (/.f64 t l) Initial program 30.2
Taylor expanded around inf 7.5
Simplified0.3
Final simplification1.9
herbie shell --seed 2021084
(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)))))))