\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 -1.4397610098885724 \cdot 10^{+75}:\\
\;\;\;\;\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 4.0699161400542827 \cdot 10^{+55}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 - 4 \cdot {\left(\frac{t}{\ell}\right)}^{4}} \cdot \left(1 - 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}\right)}\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) -1.4397610098885724e+75)
(asin (- (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (sqrt 0.5) (/ t l)))))
(if (<= (/ t l) 4.0699161400542827e+55)
(asin
(sqrt
(*
(/ (- 1.0 (pow (/ Om Omc) 2.0)) (- 1.0 (* 4.0 (pow (/ t l) 4.0))))
(- 1.0 (* 2.0 (pow (/ t l) 2.0))))))
(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) <= -1.4397610098885724e+75) {
tmp = asin(-(sqrt(1.0 - pow((Om / Omc), 2.0)) * (sqrt(0.5) / (t / l))));
} else if ((t / l) <= 4.0699161400542827e+55) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 - (4.0 * pow((t / l), 4.0)))) * (1.0 - (2.0 * pow((t / l), 2.0)))));
} 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 | 27266 |
| Alternative 2 | |
|---|---|
| Error | 1.0 |
| Cost | 27266 |
| Alternative 3 | |
|---|---|
| Error | 5.9 |
| Cost | 26817 |
| Alternative 4 | |
|---|---|
| Error | 10.2 |
| Cost | 20352 |
| Alternative 5 | |
|---|---|
| Error | 10.7 |
| Cost | 19840 |
| Alternative 6 | |
|---|---|
| Error | 27.1 |
| Cost | 20226 |
| Alternative 7 | |
|---|---|
| Error | 49.6 |
| Cost | 706 |
| Alternative 8 | |
|---|---|
| Error | 55.9 |
| Cost | 64 |

if (/.f64 t l) < -1.4397610098885724e75Initial program 25.2
Taylor expanded around -inf 7.1
Simplified1.1
Simplified1.1
if -1.4397610098885724e75 < (/.f64 t l) < 4.0699161400542827e55Initial program 1.0
rmApplied flip-+_binary64_521.0
Applied associate-/r/_binary64_241.0
Simplified1.0
Simplified1.0
if 4.0699161400542827e55 < (/.f64 t l) Initial program 22.7
Taylor expanded around inf 8.5
Simplified1.0
Simplified1.0
Final simplification1.0
herbie shell --seed 2021044
(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)))))))