\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 := \sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -9.428800306587746 \cdot 10^{+153}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \left(-\frac{\ell \cdot \sqrt{0.5}}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 1.175308461442342 \cdot 10^{+146}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\left(1 + \frac{Om}{Omc}\right) \cdot \frac{1 - \frac{Om}{Omc}}{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_2 := t \cdot \sqrt{2}\\
\sin^{-1} \left(\left|\frac{t_1}{\mathsf{fma}\left(0.5, \frac{\ell}{t_2}, \frac{t_2}{\ell}\right)}\right|\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 (sqrt (- 1.0 (pow (/ Om Omc) 2.0)))))
(if (<= (/ t l) -9.428800306587746e+153)
(asin (* t_1 (- (/ (* l (sqrt 0.5)) t))))
(if (<= (/ t l) 1.175308461442342e+146)
(asin
(sqrt
(*
(+ 1.0 (/ Om Omc))
(/ (- 1.0 (/ Om Omc)) (fma 2.0 (pow (/ t l) 2.0) 1.0)))))
(let* ((t_2 (* t (sqrt 2.0))))
(asin (fabs (/ t_1 (fma 0.5 (/ l t_2) (/ t_2 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 = sqrt(1.0 - pow((Om / Omc), 2.0));
double tmp;
if ((t / l) <= -9.428800306587746e+153) {
tmp = asin(t_1 * -((l * sqrt(0.5)) / t));
} else if ((t / l) <= 1.175308461442342e+146) {
tmp = asin(sqrt((1.0 + (Om / Omc)) * ((1.0 - (Om / Omc)) / fma(2.0, pow((t / l), 2.0), 1.0))));
} else {
double t_2 = t * sqrt(2.0);
tmp = asin(fabs(t_1 / fma(0.5, (l / t_2), (t_2 / l))));
}
return tmp;
}



Bits error versus t



Bits error versus l



Bits error versus Om



Bits error versus Omc
if (/.f64 t l) < -9.428800306587746e153Initial program 36.0
Simplified36.0
Taylor expanded in t around -inf 8.0
Simplified0.3
if -9.428800306587746e153 < (/.f64 t l) < 1.17530846144234201e146Initial program 0.8
Simplified0.8
Applied *-un-lft-identity_binary640.8
Applied add-sqr-sqrt_binary6425.4
Applied unpow-prod-down_binary6425.4
Applied add-sqr-sqrt_binary6425.4
Applied difference-of-squares_binary6425.4
Applied times-frac_binary6425.4
Simplified25.4
Simplified0.9
if 1.17530846144234201e146 < (/.f64 t l) Initial program 33.3
Simplified33.3
Applied add-sqr-sqrt_binary6433.3
Applied add-sqr-sqrt_binary6433.3
Applied times-frac_binary6433.3
Applied rem-sqrt-square_binary6433.3
Taylor expanded in t around inf 1.1
Simplified1.1
Final simplification0.9
herbie shell --seed 2021352
(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)))))))