\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 -4.4325947615188905 \cdot 10^{+44}:\\
\;\;\;\;\sin^{-1} \left(-\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 1.4406746718840184 \cdot 10^{+56}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot {\left(1 + 2 \cdot \left(t \cdot \frac{\frac{t}{\ell}}{\ell}\right)\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\sqrt{0.5}}{\frac{t}{\ell}}\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) -4.4325947615188905e+44)
(asin (- (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (sqrt 0.5) (/ t l)))))
(if (<= (/ t l) 1.4406746718840184e+56)
(asin
(*
(sqrt (- 1.0 (pow (/ Om Omc) 2.0)))
(pow (+ 1.0 (* 2.0 (* t (/ (/ t l) l)))) -0.5)))
(asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (sqrt 0.5) (/ t 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 tmp;
if ((t / l) <= -4.4325947615188905e+44) {
tmp = asin(-(sqrt(1.0 - pow((Om / Omc), 2.0)) * (sqrt(0.5) / (t / l))));
} else if ((t / l) <= 1.4406746718840184e+56) {
tmp = asin(sqrt(1.0 - pow((Om / Omc), 2.0)) * pow((1.0 + (2.0 * (t * ((t / l) / l)))), -0.5));
} else {
tmp = asin(sqrt(1.0 - pow((Om / Omc), 2.0)) * (sqrt(0.5) / (t / l)));
}
return tmp;
}












Bits error versus t












Bits error versus l












Bits error versus Om












Bits error versus Omc
Results
| Alternative 1 | |
|---|---|
| Error | 1.0 |
| Cost | 27714 |
| Alternative 2 | |
|---|---|
| Error | 1.0 |
| Cost | 27266 |
| Alternative 3 | |
|---|---|
| Error | 5.6 |
| Cost | 26817 |
| Alternative 4 | |
|---|---|
| Error | 10.1 |
| Cost | 20352 |
| Alternative 5 | |
|---|---|
| Error | 10.7 |
| Cost | 19840 |
| Alternative 6 | |
|---|---|
| Error | 29.7 |
| Cost | 13633 |
| Alternative 7 | |
|---|---|
| Error | 29.9 |
| Cost | 6785 |
| Alternative 8 | |
|---|---|
| Error | 49.6 |
| Cost | 706 |
| Alternative 9 | |
|---|---|
| Error | 56.0 |
| Cost | 64 |


if (/.f64 t l) < -4.43259476151889046e44Initial program 22.5
Taylor expanded around -inf 8.4
Simplified1.1
Simplified1.1
if -4.43259476151889046e44 < (/.f64 t l) < 1.44067467188401839e56Initial program 0.9
rmApplied div-inv_binary64_4160.9
Applied sqrt-prod_binary64_4350.9
rmApplied inv-pow_binary64_5040.9
Applied sqrt-pow1_binary64_4370.9
Simplified0.9
rmApplied *-un-lft-identity_binary64_4190.9
Applied add-sqr-sqrt_binary64_44132.7
Applied times-frac_binary64_42532.7
Applied unpow-prod-down_binary64_49832.8
Simplified32.8
Simplified1.3
Simplified1.3
if 1.44067467188401839e56 < (/.f64 t l) Initial program 22.9
Taylor expanded around inf 7.2
Simplified1.1
Simplified1.1
Final simplification1.2
herbie shell --seed 2021065
(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)))))))