\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}
t_1 := {\left(\frac{Om}{Omc}\right)}^{2}\\
\mathbf{if}\;\frac{t}{\ell} \leq -4.240875889051068 \cdot 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - t_1} \cdot \left(-\frac{\ell \cdot \sqrt{0.5}}{t}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_2 := 1 - {\left(\frac{Om}{Omc}\right)}^{4}\\
\mathbf{if}\;\frac{t}{\ell} \leq 1.3677435741571983 \cdot 10^{+22}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{t_2}{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right) \cdot \left(1 + t_1\right)}\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{t_2}}{\mathsf{hypot}\left(1, \frac{Om}{Omc}\right) \cdot \frac{t \cdot \sqrt{2}}{\ell}}\right)\\
\end{array}\\
\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
(let* ((t_1 (pow (/ Om Omc) 2.0)))
(if (<= (/ t l) -4.240875889051068e+154)
(asin (* (sqrt (- 1.0 t_1)) (- (/ (* l (sqrt 0.5)) t))))
(let* ((t_2 (- 1.0 (pow (/ Om Omc) 4.0))))
(if (<= (/ t l) 1.3677435741571983e+22)
(asin
(sqrt
(log1p
(expm1 (/ t_2 (* (fma 2.0 (pow (/ t l) 2.0) 1.0) (+ 1.0 t_1)))))))
(asin
(/
(sqrt t_2)
(* (hypot 1.0 (/ Om Omc)) (/ (* t (sqrt 2.0)) l)))))))))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 t_1 = pow((Om / Omc), 2.0);
double tmp;
if ((t / l) <= -4.240875889051068e+154) {
tmp = asin(sqrt(1.0 - t_1) * -((l * sqrt(0.5)) / t));
} else {
double t_2 = 1.0 - pow((Om / Omc), 4.0);
double tmp_1;
if ((t / l) <= 1.3677435741571983e+22) {
tmp_1 = asin(sqrt(log1p(expm1(t_2 / (fma(2.0, pow((t / l), 2.0), 1.0) * (1.0 + t_1))))));
} else {
tmp_1 = asin(sqrt(t_2) / (hypot(1.0, (Om / Omc)) * ((t * sqrt(2.0)) / l)));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus Om



Bits error versus Omc
if (/.f64 t l) < -4.240875889051068e154Initial program 34.2
Simplified34.2
Taylor expanded in t around -inf 7.5
Simplified0.3
if -4.240875889051068e154 < (/.f64 t l) < 1.3677435741571983e22Initial program 1.0
Simplified1.0
Applied flip--_binary641.0
Applied associate-/l/_binary641.0
Applied log1p-expm1-u_binary641.0
Simplified1.0
if 1.3677435741571983e22 < (/.f64 t l) Initial program 20.3
Simplified20.3
Applied flip--_binary6420.3
Applied associate-/l/_binary6420.3
Applied sqrt-div_binary6420.4
Simplified20.4
Taylor expanded in t around inf 8.2
Simplified1.0
Final simplification0.9
herbie shell --seed 2022096
(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)))))))