\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)\mathsf{expm1}\left(\mathsf{log1p}\left(\sin^{-1} \left(\sqrt{\frac{{1}^{3} - {\left({\left(\frac{Om}{Omc}\right)}^{2}\right)}^{3}}{\left({\left(\frac{Om}{Omc}\right)}^{2} \cdot \left({\left(\frac{Om}{Omc}\right)}^{2} + 1\right) + 1 \cdot 1\right) \cdot \left(1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}\right)}}\right)\right)\right)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) {
return expm1(log1p(asin(sqrt(((pow(1.0, 3.0) - pow(pow((Om / Omc), 2.0), 3.0)) / (((pow((Om / Omc), 2.0) * (pow((Om / Omc), 2.0) + 1.0)) + (1.0 * 1.0)) * (1.0 + (2.0 * pow((t / l), 2.0)))))))));
}



Bits error versus t



Bits error versus l



Bits error versus Om



Bits error versus Omc
Results
Initial program 10.9
rmApplied flip3--10.9
Applied associate-/l/10.9
Simplified10.9
rmApplied expm1-log1p-u10.9
Final simplification10.9
herbie shell --seed 2020057 +o rules:numerics
(FPCore (t l Om Omc)
:name "Toniolo and Linder, Equation (2)"
:precision binary64
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))))