Toniolo and Linder, Equation (2)

Percentage Accurate: 83.8% → 98.9%
Time: 15.6s
Alternatives: 13
Speedup: 1.9×

Specification

?
\[\begin{array}{l} \\ \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\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)))))))
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))))));
}
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
	return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc):
	return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc)
	return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0))))))
end
function tmp = code(t, l, Om, Omc)
	tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0))))));
end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 83.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\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)))))))
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))))));
}
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
	return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc):
	return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc)
	return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0))))))
end
function tmp = code(t, l, Om, Omc)
	tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0))))));
end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}

Alternative 1: 98.9% accurate, 1.0× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} t_1 := \sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}\\ \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+48}:\\ \;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{-\ell}{\frac{t}{\sqrt{0.5}}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (let* ((t_1 (sqrt (- 1.0 (pow (/ Om Omc) 2.0)))))
   (if (<= (/ t l) -2e+48)
     (asin (* t_1 (/ (- l) (/ t (sqrt 0.5)))))
     (if (<= (/ t l) 2e+152)
       (asin
        (sqrt
         (/
          (- 1.0 (* (/ Om Omc) (/ Om Omc)))
          (+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
       (asin (* t_1 (/ (/ l t) (sqrt 2.0))))))))
t = abs(t);
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) <= -2e+48) {
		tmp = asin((t_1 * (-l / (t / sqrt(0.5)))));
	} else if ((t / l) <= 2e+152) {
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = asin((t_1 * ((l / t) / sqrt(2.0))));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: t_1
    real(8) :: tmp
    t_1 = sqrt((1.0d0 - ((om / omc) ** 2.0d0)))
    if ((t / l) <= (-2d+48)) then
        tmp = asin((t_1 * (-l / (t / sqrt(0.5d0)))))
    else if ((t / l) <= 2d+152) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
    else
        tmp = asin((t_1 * ((l / t) / sqrt(2.0d0))))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double t_1 = Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0)));
	double tmp;
	if ((t / l) <= -2e+48) {
		tmp = Math.asin((t_1 * (-l / (t / Math.sqrt(0.5)))));
	} else if ((t / l) <= 2e+152) {
		tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = Math.asin((t_1 * ((l / t) / Math.sqrt(2.0))));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	t_1 = math.sqrt((1.0 - math.pow((Om / Omc), 2.0)))
	tmp = 0
	if (t / l) <= -2e+48:
		tmp = math.asin((t_1 * (-l / (t / math.sqrt(0.5)))))
	elif (t / l) <= 2e+152:
		tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))))
	else:
		tmp = math.asin((t_1 * ((l / t) / math.sqrt(2.0))))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	t_1 = sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)))
	tmp = 0.0
	if (Float64(t / l) <= -2e+48)
		tmp = asin(Float64(t_1 * Float64(Float64(-l) / Float64(t / sqrt(0.5)))));
	elseif (Float64(t / l) <= 2e+152)
		tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t)))))));
	else
		tmp = asin(Float64(t_1 * Float64(Float64(l / t) / sqrt(2.0))));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	t_1 = sqrt((1.0 - ((Om / Omc) ^ 2.0)));
	tmp = 0.0;
	if ((t / l) <= -2e+48)
		tmp = asin((t_1 * (-l / (t / sqrt(0.5)))));
	elseif ((t / l) <= 2e+152)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	else
		tmp = asin((t_1 * ((l / t) / sqrt(2.0))));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -2e+48], N[ArcSin[N[(t$95$1 * N[((-l) / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+152], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(t$95$1 * N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := \sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+48}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{-\ell}{\frac{t}{\sqrt{0.5}}}\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+152}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -2.00000000000000009e48

    1. Initial program 59.1%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Taylor expanded in t around -inf 88.5%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \left(\frac{\sqrt{0.5} \cdot \ell}{t} \cdot \sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-neg88.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\sqrt{0.5} \cdot \ell}{t} \cdot \sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)} \]
      2. *-commutative88.5%

        \[\leadsto \sin^{-1} \left(-\color{blue}{\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}} \cdot \frac{\sqrt{0.5} \cdot \ell}{t}}\right) \]
      3. distribute-rgt-neg-in88.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}} \cdot \left(-\frac{\sqrt{0.5} \cdot \ell}{t}\right)\right)} \]
      4. unpow288.5%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{\color{blue}{Om \cdot Om}}{{Omc}^{2}}} \cdot \left(-\frac{\sqrt{0.5} \cdot \ell}{t}\right)\right) \]
      5. unpow288.5%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{\color{blue}{Omc \cdot Omc}}} \cdot \left(-\frac{\sqrt{0.5} \cdot \ell}{t}\right)\right) \]
      6. times-frac99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}} \cdot \left(-\frac{\sqrt{0.5} \cdot \ell}{t}\right)\right) \]
      7. unpow299.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{{\left(\frac{Om}{Omc}\right)}^{2}}} \cdot \left(-\frac{\sqrt{0.5} \cdot \ell}{t}\right)\right) \]
      8. *-commutative99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(-\frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right)\right) \]
      9. associate-/l*99.7%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(-\color{blue}{\frac{\ell}{\frac{t}{\sqrt{0.5}}}}\right)\right) \]
    4. Simplified99.7%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(-\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\right)} \]

    if -2.00000000000000009e48 < (/.f64 t l) < 2.0000000000000001e152

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right) \]
    5. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right) \]

    if 2.0000000000000001e152 < (/.f64 t l)

    1. Initial program 22.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. sqrt-div22.2%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)} \]
      2. add-sqr-sqrt22.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + \color{blue}{\sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}}\right) \]
      3. hypot-1-def22.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}\right)}}\right) \]
      4. *-commutative22.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\left(\frac{t}{\ell}\right)}^{2} \cdot 2}}\right)}\right) \]
      5. sqrt-prod22.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{{\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{2}}\right)}\right) \]
      6. unpow222.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\frac{t}{\ell} \cdot \frac{t}{\ell}}} \cdot \sqrt{2}\right)}\right) \]
      7. sqrt-prod95.9%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{\frac{t}{\ell}} \cdot \sqrt{\frac{t}{\ell}}\right)} \cdot \sqrt{2}\right)}\right) \]
      8. add-sqr-sqrt96.0%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
    3. Applied egg-rr96.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)} \]
    4. Taylor expanded in t around inf 88.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{\sqrt{2} \cdot t} \cdot \sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)} \]
    5. Step-by-step derivation
      1. *-commutative88.0%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right)} \]
      2. unpow288.0%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{\color{blue}{Om \cdot Om}}{{Omc}^{2}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right) \]
      3. unpow288.0%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{\color{blue}{Omc \cdot Omc}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right) \]
      4. times-frac99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right) \]
      5. unpow299.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{{\left(\frac{Om}{Omc}\right)}^{2}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right) \]
      6. *-commutative99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell}{\color{blue}{t \cdot \sqrt{2}}}\right) \]
      7. associate-/r*99.5%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \color{blue}{\frac{\frac{\ell}{t}}{\sqrt{2}}}\right) \]
    6. Simplified99.5%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+48}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{-\ell}{\frac{t}{\sqrt{0.5}}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\ \end{array} \]

Alternative 2: 98.4% accurate, 0.8× speedup?

\[\begin{array}{l} t = |t|\\ \\ \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (asin
  (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (/ t l) (sqrt 2.0))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0)))));
}
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))));
}
t = abs(t)
def code(t, l, Om, Omc):
	return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t / l) * math.sqrt(2.0)))))
t = abs(t)
function code(t, l, Om, Omc)
	return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0)))))
end
t = abs(t)
function tmp = code(t, l, Om, Omc)
	tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0)))));
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(t / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Derivation
  1. Initial program 80.3%

    \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
  2. Step-by-step derivation
    1. sqrt-div80.3%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)} \]
    2. add-sqr-sqrt80.3%

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + \color{blue}{\sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}}\right) \]
    3. hypot-1-def80.3%

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}\right)}}\right) \]
    4. *-commutative80.3%

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\left(\frac{t}{\ell}\right)}^{2} \cdot 2}}\right)}\right) \]
    5. sqrt-prod80.2%

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{{\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{2}}\right)}\right) \]
    6. unpow280.2%

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\frac{t}{\ell} \cdot \frac{t}{\ell}}} \cdot \sqrt{2}\right)}\right) \]
    7. sqrt-prod56.5%

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{\frac{t}{\ell}} \cdot \sqrt{\frac{t}{\ell}}\right)} \cdot \sqrt{2}\right)}\right) \]
    8. add-sqr-sqrt98.2%

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
  3. Applied egg-rr98.2%

    \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)} \]
  4. Final simplification98.2%

    \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]

Alternative 3: 98.9% accurate, 1.0× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+69}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -2e+154)
   (asin (* (sqrt 0.5) (- (/ l t))))
   (if (<= (/ t l) 5e+69)
     (asin
      (sqrt
       (/
        (- 1.0 (* (/ Om Omc) (/ Om Omc)))
        (+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
     (asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ l (/ t (sqrt 0.5))))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2e+154) {
		tmp = asin((sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 5e+69) {
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * (l / (t / sqrt(0.5)))));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-2d+154)) then
        tmp = asin((sqrt(0.5d0) * -(l / t)))
    else if ((t / l) <= 5d+69) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
    else
        tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * (l / (t / sqrt(0.5d0)))))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2e+154) {
		tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 5e+69) {
		tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * (l / (t / Math.sqrt(0.5)))));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -2e+154:
		tmp = math.asin((math.sqrt(0.5) * -(l / t)))
	elif (t / l) <= 5e+69:
		tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))))
	else:
		tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * (l / (t / math.sqrt(0.5)))))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -2e+154)
		tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t))));
	elseif (Float64(t / l) <= 5e+69)
		tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t)))))));
	else
		tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(l / Float64(t / sqrt(0.5)))));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -2e+154)
		tmp = asin((sqrt(0.5) * -(l / t)));
	elseif ((t / l) <= 5e+69)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	else
		tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * (l / (t / sqrt(0.5)))));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+154], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+69], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+69}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -2.00000000000000007e154

    1. Initial program 37.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around -inf 97.7%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.7%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.6%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)}\right) \]
      3. neg-mul-197.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      4. distribute-rgt-neg-in97.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]
    9. Simplified97.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]

    if -2.00000000000000007e154 < (/.f64 t l) < 5.00000000000000036e69

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right) \]
    5. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right) \]

    if 5.00000000000000036e69 < (/.f64 t l)

    1. Initial program 50.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Taylor expanded in t around inf 92.2%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t} \cdot \sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. *-commutative92.2%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}} \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
      2. unpow292.2%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{\color{blue}{Om \cdot Om}}{{Omc}^{2}}} \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right) \]
      3. unpow292.2%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{\color{blue}{Omc \cdot Omc}}} \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right) \]
      4. times-frac99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}} \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right) \]
      5. unpow299.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{{\left(\frac{Om}{Omc}\right)}^{2}}} \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right) \]
      6. *-commutative99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      7. associate-/l*99.6%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \color{blue}{\frac{\ell}{\frac{t}{\sqrt{0.5}}}}\right) \]
    4. Simplified99.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+69}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\ \end{array} \]

Alternative 4: 98.9% accurate, 1.0× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -2e+154)
   (asin (* (sqrt 0.5) (- (/ l t))))
   (if (<= (/ t l) 2e+152)
     (asin
      (sqrt
       (/
        (- 1.0 (* (/ Om Omc) (/ Om Omc)))
        (+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
     (asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (/ l t) (sqrt 2.0)))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2e+154) {
		tmp = asin((sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 2e+152) {
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * ((l / t) / sqrt(2.0))));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-2d+154)) then
        tmp = asin((sqrt(0.5d0) * -(l / t)))
    else if ((t / l) <= 2d+152) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
    else
        tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * ((l / t) / sqrt(2.0d0))))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2e+154) {
		tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 2e+152) {
		tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * ((l / t) / Math.sqrt(2.0))));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -2e+154:
		tmp = math.asin((math.sqrt(0.5) * -(l / t)))
	elif (t / l) <= 2e+152:
		tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))))
	else:
		tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * ((l / t) / math.sqrt(2.0))))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -2e+154)
		tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t))));
	elseif (Float64(t / l) <= 2e+152)
		tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t)))))));
	else
		tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(Float64(l / t) / sqrt(2.0))));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -2e+154)
		tmp = asin((sqrt(0.5) * -(l / t)));
	elseif ((t / l) <= 2e+152)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	else
		tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * ((l / t) / sqrt(2.0))));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+154], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+152], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+152}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -2.00000000000000007e154

    1. Initial program 37.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around -inf 97.7%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.7%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.6%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)}\right) \]
      3. neg-mul-197.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      4. distribute-rgt-neg-in97.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]
    9. Simplified97.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]

    if -2.00000000000000007e154 < (/.f64 t l) < 2.0000000000000001e152

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right) \]
    5. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right) \]

    if 2.0000000000000001e152 < (/.f64 t l)

    1. Initial program 22.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. sqrt-div22.2%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)} \]
      2. add-sqr-sqrt22.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + \color{blue}{\sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}}\right) \]
      3. hypot-1-def22.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}\right)}}\right) \]
      4. *-commutative22.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\left(\frac{t}{\ell}\right)}^{2} \cdot 2}}\right)}\right) \]
      5. sqrt-prod22.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{{\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{2}}\right)}\right) \]
      6. unpow222.2%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\frac{t}{\ell} \cdot \frac{t}{\ell}}} \cdot \sqrt{2}\right)}\right) \]
      7. sqrt-prod95.9%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{\frac{t}{\ell}} \cdot \sqrt{\frac{t}{\ell}}\right)} \cdot \sqrt{2}\right)}\right) \]
      8. add-sqr-sqrt96.0%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
    3. Applied egg-rr96.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)} \]
    4. Taylor expanded in t around inf 88.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{\sqrt{2} \cdot t} \cdot \sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)} \]
    5. Step-by-step derivation
      1. *-commutative88.0%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right)} \]
      2. unpow288.0%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{\color{blue}{Om \cdot Om}}{{Omc}^{2}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right) \]
      3. unpow288.0%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{\color{blue}{Omc \cdot Omc}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right) \]
      4. times-frac99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right) \]
      5. unpow299.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{{\left(\frac{Om}{Omc}\right)}^{2}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}\right) \]
      6. *-commutative99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell}{\color{blue}{t \cdot \sqrt{2}}}\right) \]
      7. associate-/r*99.5%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \color{blue}{\frac{\frac{\ell}{t}}{\sqrt{2}}}\right) \]
    6. Simplified99.5%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\ \end{array} \]

Alternative 5: 98.7% accurate, 1.8× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 10^{+120}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -2e+154)
   (asin (* (sqrt 0.5) (- (/ l t))))
   (if (<= (/ t l) 1e+120)
     (asin
      (sqrt
       (/
        (- 1.0 (* (/ Om Omc) (/ Om Omc)))
        (+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
     (asin (/ (* l (sqrt 0.5)) t)))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2e+154) {
		tmp = asin((sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 1e+120) {
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = asin(((l * sqrt(0.5)) / t));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-2d+154)) then
        tmp = asin((sqrt(0.5d0) * -(l / t)))
    else if ((t / l) <= 1d+120) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
    else
        tmp = asin(((l * sqrt(0.5d0)) / t))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2e+154) {
		tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 1e+120) {
		tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -2e+154:
		tmp = math.asin((math.sqrt(0.5) * -(l / t)))
	elif (t / l) <= 1e+120:
		tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))))
	else:
		tmp = math.asin(((l * math.sqrt(0.5)) / t))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -2e+154)
		tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t))));
	elseif (Float64(t / l) <= 1e+120)
		tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t)))))));
	else
		tmp = asin(Float64(Float64(l * sqrt(0.5)) / t));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -2e+154)
		tmp = asin((sqrt(0.5) * -(l / t)));
	elseif ((t / l) <= 1e+120)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	else
		tmp = asin(((l * sqrt(0.5)) / t));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+154], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e+120], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+120}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -2.00000000000000007e154

    1. Initial program 37.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative37.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow237.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified37.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around -inf 97.7%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.7%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.6%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)}\right) \]
      3. neg-mul-197.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      4. distribute-rgt-neg-in97.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]
    9. Simplified97.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]

    if -2.00000000000000007e154 < (/.f64 t l) < 9.9999999999999998e119

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right) \]
    5. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right) \]

    if 9.9999999999999998e119 < (/.f64 t l)

    1. Initial program 39.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow239.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num39.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv39.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr39.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 22.8%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow222.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow222.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow222.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow222.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified22.8%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around inf 99.3%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+154}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 10^{+120}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\ \end{array} \]

Alternative 6: 97.9% accurate, 1.9× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+48}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 50000:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \left(t \cdot \frac{\frac{t}{\ell}}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -5e+48)
   (asin (* (sqrt 0.5) (- (/ l t))))
   (if (<= (/ t l) 50000.0)
     (asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (* t (/ (/ t l) l)))))))
     (asin (* (sqrt 0.5) (/ l t))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -5e+48) {
		tmp = asin((sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 50000.0) {
		tmp = asin(sqrt((1.0 / (1.0 + (2.0 * (t * ((t / l) / l)))))));
	} else {
		tmp = asin((sqrt(0.5) * (l / t)));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-5d+48)) then
        tmp = asin((sqrt(0.5d0) * -(l / t)))
    else if ((t / l) <= 50000.0d0) then
        tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * (t * ((t / l) / l)))))))
    else
        tmp = asin((sqrt(0.5d0) * (l / t)))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -5e+48) {
		tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 50000.0) {
		tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * (t * ((t / l) / l)))))));
	} else {
		tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -5e+48:
		tmp = math.asin((math.sqrt(0.5) * -(l / t)))
	elif (t / l) <= 50000.0:
		tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * (t * ((t / l) / l)))))))
	else:
		tmp = math.asin((math.sqrt(0.5) * (l / t)))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -5e+48)
		tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t))));
	elseif (Float64(t / l) <= 50000.0)
		tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(t * Float64(Float64(t / l) / l)))))));
	else
		tmp = asin(Float64(sqrt(0.5) * Float64(l / t)));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -5e+48)
		tmp = asin((sqrt(0.5) * -(l / t)));
	elseif ((t / l) <= 50000.0)
		tmp = asin(sqrt((1.0 / (1.0 + (2.0 * (t * ((t / l) / l)))))));
	else
		tmp = asin((sqrt(0.5) * (l / t)));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+48], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 50000.0], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 * N[(t * N[(N[(t / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+48}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 50000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \left(t \cdot \frac{\frac{t}{\ell}}{\ell}\right)}}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -4.99999999999999973e48

    1. Initial program 59.1%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow259.1%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num59.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv59.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr59.2%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 43.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative43.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/43.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt43.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow243.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative43.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative43.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow243.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt43.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/43.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative43.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow243.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow243.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified43.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around -inf 97.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.6%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.5%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)}\right) \]
      3. neg-mul-197.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      4. distribute-rgt-neg-in97.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]
    9. Simplified97.5%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]

    if -4.99999999999999973e48 < (/.f64 t l) < 5e4

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 83.8%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative83.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/83.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt83.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow283.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative83.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative83.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow283.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt83.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/83.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative83.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow283.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow283.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified83.8%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Step-by-step derivation
      1. associate-/r*88.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t \cdot t}{\ell}}{\ell}}}}\right) \]
      2. associate-*l/98.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{\frac{t}{\ell} \cdot t}}{\ell}}}\right) \]
      3. associate-/l*98.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
      4. associate-/r/98.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    8. Applied egg-rr98.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]

    if 5e4 < (/.f64 t l)

    1. Initial program 60.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow260.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num60.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv60.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr60.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 29.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative29.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/29.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt29.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow229.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative29.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative29.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow229.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt29.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/29.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative29.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow229.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow229.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified29.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around inf 99.3%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative99.3%

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/99.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      3. *-commutative99.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
    9. Simplified99.5%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+48}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 50000:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \left(t \cdot \frac{\frac{t}{\ell}}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \]

Alternative 7: 98.0% accurate, 1.9× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+117}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 10^{+120}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -1e+117)
   (asin (* (sqrt 0.5) (- (/ l t))))
   (if (<= (/ t l) 1e+120)
     (asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
     (asin (/ (* l (sqrt 0.5)) t)))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -1e+117) {
		tmp = asin((sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 1e+120) {
		tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = asin(((l * sqrt(0.5)) / t));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-1d+117)) then
        tmp = asin((sqrt(0.5d0) * -(l / t)))
    else if ((t / l) <= 1d+120) then
        tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
    else
        tmp = asin(((l * sqrt(0.5d0)) / t))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -1e+117) {
		tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 1e+120) {
		tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	} else {
		tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -1e+117:
		tmp = math.asin((math.sqrt(0.5) * -(l / t)))
	elif (t / l) <= 1e+120:
		tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) / (l / t)))))))
	else:
		tmp = math.asin(((l * math.sqrt(0.5)) / t))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -1e+117)
		tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t))));
	elseif (Float64(t / l) <= 1e+120)
		tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t)))))));
	else
		tmp = asin(Float64(Float64(l * sqrt(0.5)) / t));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -1e+117)
		tmp = asin((sqrt(0.5) * -(l / t)));
	elseif ((t / l) <= 1e+120)
		tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
	else
		tmp = asin(((l * sqrt(0.5)) / t));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+117], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e+120], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+117}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+120}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -1.00000000000000005e117

    1. Initial program 46.4%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow246.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num46.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv46.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr46.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 40.9%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative40.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/40.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt40.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow240.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative40.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative40.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow240.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt40.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/40.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative40.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow240.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow240.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified40.9%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around -inf 97.1%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.1%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.0%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)}\right) \]
      3. neg-mul-197.0%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      4. distribute-rgt-neg-in97.0%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]
    9. Simplified97.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]

    if -1.00000000000000005e117 < (/.f64 t l) < 9.9999999999999998e119

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 75.5%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative75.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/75.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt75.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow275.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative75.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative75.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow275.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt75.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/75.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative75.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow275.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow275.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified75.5%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Step-by-step derivation
      1. associate-/r*82.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t \cdot t}{\ell}}{\ell}}}}\right) \]
      2. associate-*l/95.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{\frac{t}{\ell} \cdot t}}{\ell}}}\right) \]
      3. associate-/l*98.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
      4. associate-/r/96.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    8. Applied egg-rr96.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    9. Step-by-step derivation
      1. associate-/r/98.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    10. Applied egg-rr98.5%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]

    if 9.9999999999999998e119 < (/.f64 t l)

    1. Initial program 39.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow239.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num39.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv39.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr39.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 22.8%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow222.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow222.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative22.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow222.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow222.8%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified22.8%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around inf 99.3%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+117}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 10^{+120}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\ \end{array} \]

Alternative 8: 96.1% accurate, 1.9× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -2000000000000.0)
   (asin (* (sqrt 0.5) (- (/ l t))))
   (if (<= (/ t l) 4e-8)
     (asin (- 1.0 (pow (/ t l) 2.0)))
     (asin (* (sqrt 0.5) (/ l t))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2000000000000.0) {
		tmp = asin((sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 4e-8) {
		tmp = asin((1.0 - pow((t / l), 2.0)));
	} else {
		tmp = asin((sqrt(0.5) * (l / t)));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-2000000000000.0d0)) then
        tmp = asin((sqrt(0.5d0) * -(l / t)))
    else if ((t / l) <= 4d-8) then
        tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
    else
        tmp = asin((sqrt(0.5d0) * (l / t)))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2000000000000.0) {
		tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 4e-8) {
		tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
	} else {
		tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -2000000000000.0:
		tmp = math.asin((math.sqrt(0.5) * -(l / t)))
	elif (t / l) <= 4e-8:
		tmp = math.asin((1.0 - math.pow((t / l), 2.0)))
	else:
		tmp = math.asin((math.sqrt(0.5) * (l / t)))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -2000000000000.0)
		tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t))));
	elseif (Float64(t / l) <= 4e-8)
		tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0)));
	else
		tmp = asin(Float64(sqrt(0.5) * Float64(l / t)));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -2000000000000.0)
		tmp = asin((sqrt(0.5) * -(l / t)));
	elseif ((t / l) <= 4e-8)
		tmp = asin((1.0 - ((t / l) ^ 2.0)));
	else
		tmp = asin((sqrt(0.5) * (l / t)));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2000000000000.0], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e-8], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -2e12

    1. Initial program 63.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow263.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num63.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv63.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr63.2%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 45.9%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow245.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow245.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow245.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow245.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified45.9%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around -inf 97.7%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.7%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.6%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)}\right) \]
      3. neg-mul-197.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      4. distribute-rgt-neg-in97.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]
    9. Simplified97.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]

    if -2e12 < (/.f64 t l) < 4.0000000000000001e-8

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 84.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified84.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Step-by-step derivation
      1. associate-/r*89.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t \cdot t}{\ell}}{\ell}}}}\right) \]
      2. associate-*l/98.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{\frac{t}{\ell} \cdot t}}{\ell}}}\right) \]
      3. associate-/l*98.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
      4. associate-/r/98.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    8. Applied egg-rr98.2%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    9. Taylor expanded in t around 0 84.4%

      \[\leadsto \sin^{-1} \color{blue}{\left(1 + -1 \cdot \frac{{t}^{2}}{{\ell}^{2}}\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg84.4%

        \[\leadsto \sin^{-1} \left(1 + \color{blue}{\left(-\frac{{t}^{2}}{{\ell}^{2}}\right)}\right) \]
      2. unsub-neg84.4%

        \[\leadsto \sin^{-1} \color{blue}{\left(1 - \frac{{t}^{2}}{{\ell}^{2}}\right)} \]
      3. unpow284.4%

        \[\leadsto \sin^{-1} \left(1 - \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}\right) \]
      4. unpow284.4%

        \[\leadsto \sin^{-1} \left(1 - \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}\right) \]
      5. times-frac96.6%

        \[\leadsto \sin^{-1} \left(1 - \color{blue}{\frac{t}{\ell} \cdot \frac{t}{\ell}}\right) \]
      6. unpow296.6%

        \[\leadsto \sin^{-1} \left(1 - \color{blue}{{\left(\frac{t}{\ell}\right)}^{2}}\right) \]
    11. Simplified96.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)} \]

    if 4.0000000000000001e-8 < (/.f64 t l)

    1. Initial program 61.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow261.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num61.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv61.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr61.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 31.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow231.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow231.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow231.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow231.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified31.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around inf 97.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.0%

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.1%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      3. *-commutative97.1%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
    9. Simplified97.1%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification97.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \]

Alternative 9: 96.1% accurate, 1.9× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\ \;\;\;\;\sin^{-1} \left(\frac{-\frac{\ell}{t}}{\sqrt{2}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -2000000000000.0)
   (asin (/ (- (/ l t)) (sqrt 2.0)))
   (if (<= (/ t l) 4e-8)
     (asin (- 1.0 (pow (/ t l) 2.0)))
     (asin (* (sqrt 0.5) (/ l t))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2000000000000.0) {
		tmp = asin((-(l / t) / sqrt(2.0)));
	} else if ((t / l) <= 4e-8) {
		tmp = asin((1.0 - pow((t / l), 2.0)));
	} else {
		tmp = asin((sqrt(0.5) * (l / t)));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-2000000000000.0d0)) then
        tmp = asin((-(l / t) / sqrt(2.0d0)))
    else if ((t / l) <= 4d-8) then
        tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
    else
        tmp = asin((sqrt(0.5d0) * (l / t)))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2000000000000.0) {
		tmp = Math.asin((-(l / t) / Math.sqrt(2.0)));
	} else if ((t / l) <= 4e-8) {
		tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
	} else {
		tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -2000000000000.0:
		tmp = math.asin((-(l / t) / math.sqrt(2.0)))
	elif (t / l) <= 4e-8:
		tmp = math.asin((1.0 - math.pow((t / l), 2.0)))
	else:
		tmp = math.asin((math.sqrt(0.5) * (l / t)))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -2000000000000.0)
		tmp = asin(Float64(Float64(-Float64(l / t)) / sqrt(2.0)));
	elseif (Float64(t / l) <= 4e-8)
		tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0)));
	else
		tmp = asin(Float64(sqrt(0.5) * Float64(l / t)));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -2000000000000.0)
		tmp = asin((-(l / t) / sqrt(2.0)));
	elseif ((t / l) <= 4e-8)
		tmp = asin((1.0 - ((t / l) ^ 2.0)));
	else
		tmp = asin((sqrt(0.5) * (l / t)));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2000000000000.0], N[ArcSin[N[((-N[(l / t), $MachinePrecision]) / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e-8], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\
\;\;\;\;\sin^{-1} \left(\frac{-\frac{\ell}{t}}{\sqrt{2}}\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -2e12

    1. Initial program 63.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. sqrt-div63.3%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)} \]
      2. add-sqr-sqrt63.3%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + \color{blue}{\sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}}\right) \]
      3. hypot-1-def63.3%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\color{blue}{\mathsf{hypot}\left(1, \sqrt{2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}\right)}}\right) \]
      4. *-commutative63.3%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\left(\frac{t}{\ell}\right)}^{2} \cdot 2}}\right)}\right) \]
      5. sqrt-prod63.1%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{{\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{2}}\right)}\right) \]
      6. unpow263.1%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{\frac{t}{\ell} \cdot \frac{t}{\ell}}} \cdot \sqrt{2}\right)}\right) \]
      7. sqrt-prod0.0%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\left(\sqrt{\frac{t}{\ell}} \cdot \sqrt{\frac{t}{\ell}}\right)} \cdot \sqrt{2}\right)}\right) \]
      8. add-sqr-sqrt96.9%

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
    3. Applied egg-rr96.9%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)} \]
    4. Taylor expanded in t around -inf 89.5%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \left(\frac{\ell}{\sqrt{2} \cdot t} \cdot \sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg89.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\ell}{\sqrt{2} \cdot t} \cdot \sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)} \]
      2. *-commutative89.5%

        \[\leadsto \sin^{-1} \left(-\color{blue}{\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}} \cdot \frac{\ell}{\sqrt{2} \cdot t}}\right) \]
      3. distribute-rgt-neg-in89.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}} \cdot \left(-\frac{\ell}{\sqrt{2} \cdot t}\right)\right)} \]
      4. unpow289.5%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{\color{blue}{Om \cdot Om}}{{Omc}^{2}}} \cdot \left(-\frac{\ell}{\sqrt{2} \cdot t}\right)\right) \]
      5. unpow289.5%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{\color{blue}{Omc \cdot Omc}}} \cdot \left(-\frac{\ell}{\sqrt{2} \cdot t}\right)\right) \]
      6. times-frac99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{\frac{Om}{Omc} \cdot \frac{Om}{Omc}}} \cdot \left(-\frac{\ell}{\sqrt{2} \cdot t}\right)\right) \]
      7. unpow299.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{{\left(\frac{Om}{Omc}\right)}^{2}}} \cdot \left(-\frac{\ell}{\sqrt{2} \cdot t}\right)\right) \]
      8. *-commutative99.4%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(-\frac{\ell}{\color{blue}{t \cdot \sqrt{2}}}\right)\right) \]
      9. associate-/r*99.5%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(-\color{blue}{\frac{\frac{\ell}{t}}{\sqrt{2}}}\right)\right) \]
    6. Simplified99.5%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(-\frac{\frac{\ell}{t}}{\sqrt{2}}\right)\right)} \]
    7. Taylor expanded in Om around 0 97.7%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \frac{\ell}{\sqrt{2} \cdot t}\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity97.7%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{1 \cdot \ell}}{\sqrt{2} \cdot t}\right) \]
      2. times-frac97.6%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{1}{\sqrt{2}} \cdot \frac{\ell}{t}\right)}\right) \]
      3. *-commutative97.6%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{\ell}{t} \cdot \frac{1}{\sqrt{2}}\right)}\right) \]
      4. associate-*r/97.8%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\frac{\frac{\ell}{t} \cdot 1}{\sqrt{2}}}\right) \]
      5. *-rgt-identity97.8%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{\frac{\ell}{t}}}{\sqrt{2}}\right) \]
      6. neg-mul-197.8%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\frac{\ell}{t}}{\sqrt{2}}\right)} \]
      7. distribute-frac-neg97.8%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{-\frac{\ell}{t}}{\sqrt{2}}\right)} \]
    9. Simplified97.8%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{-\frac{\ell}{t}}{\sqrt{2}}\right)} \]

    if -2e12 < (/.f64 t l) < 4.0000000000000001e-8

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 84.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified84.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Step-by-step derivation
      1. associate-/r*89.7%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t \cdot t}{\ell}}{\ell}}}}\right) \]
      2. associate-*l/98.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{\frac{t}{\ell} \cdot t}}{\ell}}}\right) \]
      3. associate-/l*98.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
      4. associate-/r/98.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    8. Applied egg-rr98.2%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    9. Taylor expanded in t around 0 84.4%

      \[\leadsto \sin^{-1} \color{blue}{\left(1 + -1 \cdot \frac{{t}^{2}}{{\ell}^{2}}\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg84.4%

        \[\leadsto \sin^{-1} \left(1 + \color{blue}{\left(-\frac{{t}^{2}}{{\ell}^{2}}\right)}\right) \]
      2. unsub-neg84.4%

        \[\leadsto \sin^{-1} \color{blue}{\left(1 - \frac{{t}^{2}}{{\ell}^{2}}\right)} \]
      3. unpow284.4%

        \[\leadsto \sin^{-1} \left(1 - \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}\right) \]
      4. unpow284.4%

        \[\leadsto \sin^{-1} \left(1 - \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}\right) \]
      5. times-frac96.6%

        \[\leadsto \sin^{-1} \left(1 - \color{blue}{\frac{t}{\ell} \cdot \frac{t}{\ell}}\right) \]
      6. unpow296.6%

        \[\leadsto \sin^{-1} \left(1 - \color{blue}{{\left(\frac{t}{\ell}\right)}^{2}}\right) \]
    11. Simplified96.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)} \]

    if 4.0000000000000001e-8 < (/.f64 t l)

    1. Initial program 61.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow261.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num61.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv61.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr61.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 31.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow231.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow231.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow231.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow231.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified31.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around inf 97.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.0%

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.1%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      3. *-commutative97.1%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
    9. Simplified97.1%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification97.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\ \;\;\;\;\sin^{-1} \left(\frac{-\frac{\ell}{t}}{\sqrt{2}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \]

Alternative 10: 79.6% accurate, 1.9× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+206}:\\ \;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\sin^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -5e+206)
   (asin (/ (sqrt 0.5) (/ t l)))
   (if (<= (/ t l) 4e-8) (asin 1.0) (asin (* (sqrt 0.5) (/ l t))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -5e+206) {
		tmp = asin((sqrt(0.5) / (t / l)));
	} else if ((t / l) <= 4e-8) {
		tmp = asin(1.0);
	} else {
		tmp = asin((sqrt(0.5) * (l / t)));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-5d+206)) then
        tmp = asin((sqrt(0.5d0) / (t / l)))
    else if ((t / l) <= 4d-8) then
        tmp = asin(1.0d0)
    else
        tmp = asin((sqrt(0.5d0) * (l / t)))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -5e+206) {
		tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
	} else if ((t / l) <= 4e-8) {
		tmp = Math.asin(1.0);
	} else {
		tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -5e+206:
		tmp = math.asin((math.sqrt(0.5) / (t / l)))
	elif (t / l) <= 4e-8:
		tmp = math.asin(1.0)
	else:
		tmp = math.asin((math.sqrt(0.5) * (l / t)))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -5e+206)
		tmp = asin(Float64(sqrt(0.5) / Float64(t / l)));
	elseif (Float64(t / l) <= 4e-8)
		tmp = asin(1.0);
	else
		tmp = asin(Float64(sqrt(0.5) * Float64(l / t)));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -5e+206)
		tmp = asin((sqrt(0.5) / (t / l)));
	elseif ((t / l) <= 4e-8)
		tmp = asin(1.0);
	else
		tmp = asin((sqrt(0.5) * (l / t)));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+206], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e-8], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+206}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\sin^{-1} 1\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -5.0000000000000002e206

    1. Initial program 45.4%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow245.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr45.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 45.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow245.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow245.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow245.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow245.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified45.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Step-by-step derivation
      1. associate-/r*45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t \cdot t}{\ell}}{\ell}}}}\right) \]
      2. associate-*l/45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{\frac{t}{\ell} \cdot t}}{\ell}}}\right) \]
      3. associate-/l*45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
      4. associate-/r/45.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    8. Applied egg-rr45.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \color{blue}{\left(\frac{\frac{t}{\ell}}{\ell} \cdot t\right)}}}\right) \]
    9. Taylor expanded in t around inf 44.4%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    10. Step-by-step derivation
      1. associate-/l*44.5%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)} \]
    11. Simplified44.5%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)} \]

    if -5.0000000000000002e206 < (/.f64 t l) < 4.0000000000000001e-8

    1. Initial program 95.1%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow295.1%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num95.1%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv95.1%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr95.1%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 76.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative76.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/76.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt76.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow276.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative76.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative76.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow276.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt76.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/76.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative76.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow276.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow276.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified76.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around 0 78.2%

      \[\leadsto \sin^{-1} \color{blue}{1} \]

    if 4.0000000000000001e-8 < (/.f64 t l)

    1. Initial program 61.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow261.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num61.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv61.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr61.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 31.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow231.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow231.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow231.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow231.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified31.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around inf 97.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.0%

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.1%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      3. *-commutative97.1%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
    9. Simplified97.1%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+206}:\\ \;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\sin^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \]

Alternative 11: 96.1% accurate, 1.9× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\sin^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= (/ t l) -2000000000000.0)
   (asin (* (sqrt 0.5) (- (/ l t))))
   (if (<= (/ t l) 4e-8) (asin 1.0) (asin (* (sqrt 0.5) (/ l t))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2000000000000.0) {
		tmp = asin((sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 4e-8) {
		tmp = asin(1.0);
	} else {
		tmp = asin((sqrt(0.5) * (l / t)));
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t / l) <= (-2000000000000.0d0)) then
        tmp = asin((sqrt(0.5d0) * -(l / t)))
    else if ((t / l) <= 4d-8) then
        tmp = asin(1.0d0)
    else
        tmp = asin((sqrt(0.5d0) * (l / t)))
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -2000000000000.0) {
		tmp = Math.asin((Math.sqrt(0.5) * -(l / t)));
	} else if ((t / l) <= 4e-8) {
		tmp = Math.asin(1.0);
	} else {
		tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if (t / l) <= -2000000000000.0:
		tmp = math.asin((math.sqrt(0.5) * -(l / t)))
	elif (t / l) <= 4e-8:
		tmp = math.asin(1.0)
	else:
		tmp = math.asin((math.sqrt(0.5) * (l / t)))
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (Float64(t / l) <= -2000000000000.0)
		tmp = asin(Float64(sqrt(0.5) * Float64(-Float64(l / t))));
	elseif (Float64(t / l) <= 4e-8)
		tmp = asin(1.0);
	else
		tmp = asin(Float64(sqrt(0.5) * Float64(l / t)));
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t / l) <= -2000000000000.0)
		tmp = asin((sqrt(0.5) * -(l / t)));
	elseif ((t / l) <= 4e-8)
		tmp = asin(1.0);
	else
		tmp = asin((sqrt(0.5) * (l / t)));
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2000000000000.0], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * (-N[(l / t), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 4e-8], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\

\mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\sin^{-1} 1\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 t l) < -2e12

    1. Initial program 63.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow263.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num63.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv63.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr63.2%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 45.9%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow245.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow245.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative45.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow245.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow245.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified45.9%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around -inf 97.7%

      \[\leadsto \sin^{-1} \color{blue}{\left(-1 \cdot \frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.7%

        \[\leadsto \sin^{-1} \left(-1 \cdot \frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.6%

        \[\leadsto \sin^{-1} \left(-1 \cdot \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)}\right) \]
      3. neg-mul-197.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(-\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      4. distribute-rgt-neg-in97.6%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]
    9. Simplified97.6%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \left(-\sqrt{0.5}\right)\right)} \]

    if -2e12 < (/.f64 t l) < 4.0000000000000001e-8

    1. Initial program 99.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow299.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv99.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr99.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 84.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative84.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow284.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified84.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around 0 96.7%

      \[\leadsto \sin^{-1} \color{blue}{1} \]

    if 4.0000000000000001e-8 < (/.f64 t l)

    1. Initial program 61.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow261.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num61.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv61.3%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr61.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 31.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow231.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative31.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow231.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative31.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow231.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow231.6%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified31.6%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around inf 97.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative97.0%

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/97.1%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      3. *-commutative97.1%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
    9. Simplified97.1%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification97.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2000000000000:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \left(-\frac{\ell}{t}\right)\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\sin^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \end{array} \]

Alternative 12: 65.2% accurate, 2.0× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq -2.4 \cdot 10^{-204}:\\ \;\;\;\;\sin^{-1} 1\\ \mathbf{elif}\;\ell \leq 300:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} 1\\ \end{array} \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
 :precision binary64
 (if (<= l -2.4e-204)
   (asin 1.0)
   (if (<= l 300.0) (asin (* (sqrt 0.5) (/ l t))) (asin 1.0))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if (l <= -2.4e-204) {
		tmp = asin(1.0);
	} else if (l <= 300.0) {
		tmp = asin((sqrt(0.5) * (l / t)));
	} else {
		tmp = asin(1.0);
	}
	return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if (l <= (-2.4d-204)) then
        tmp = asin(1.0d0)
    else if (l <= 300.0d0) then
        tmp = asin((sqrt(0.5d0) * (l / t)))
    else
        tmp = asin(1.0d0)
    end if
    code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if (l <= -2.4e-204) {
		tmp = Math.asin(1.0);
	} else if (l <= 300.0) {
		tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
	} else {
		tmp = Math.asin(1.0);
	}
	return tmp;
}
t = abs(t)
def code(t, l, Om, Omc):
	tmp = 0
	if l <= -2.4e-204:
		tmp = math.asin(1.0)
	elif l <= 300.0:
		tmp = math.asin((math.sqrt(0.5) * (l / t)))
	else:
		tmp = math.asin(1.0)
	return tmp
t = abs(t)
function code(t, l, Om, Omc)
	tmp = 0.0
	if (l <= -2.4e-204)
		tmp = asin(1.0);
	elseif (l <= 300.0)
		tmp = asin(Float64(sqrt(0.5) * Float64(l / t)));
	else
		tmp = asin(1.0);
	end
	return tmp
end
t = abs(t)
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if (l <= -2.4e-204)
		tmp = asin(1.0);
	elseif (l <= 300.0)
		tmp = asin((sqrt(0.5) * (l / t)));
	else
		tmp = asin(1.0);
	end
	tmp_2 = tmp;
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := If[LessEqual[l, -2.4e-204], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, 300.0], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.4 \cdot 10^{-204}:\\
\;\;\;\;\sin^{-1} 1\\

\mathbf{elif}\;\ell \leq 300:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -2.4e-204 or 300 < l

    1. Initial program 87.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow287.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num87.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv87.2%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr87.2%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 67.9%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative67.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/67.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt67.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow267.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative67.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative67.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow267.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt67.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/67.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative67.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow267.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow267.9%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified67.9%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around 0 64.6%

      \[\leadsto \sin^{-1} \color{blue}{1} \]

    if -2.4e-204 < l < 300

    1. Initial program 64.5%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. unpow264.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
      2. clear-num64.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
      3. un-div-inv64.5%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    3. Applied egg-rr64.5%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
    4. Taylor expanded in Om around 0 44.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative44.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      2. associate-*l/44.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
      3. rem-square-sqrt44.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      4. unpow244.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. *-commutative44.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
      6. *-commutative44.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      7. unpow244.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
      8. rem-square-sqrt44.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
      9. associate-*l/44.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
      10. *-commutative44.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
      11. unpow244.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
      12. unpow244.4%

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    6. Simplified44.4%

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
    7. Taylor expanded in t around inf 57.2%

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{0.5} \cdot \ell}{t}\right)} \]
    8. Step-by-step derivation
      1. *-commutative57.2%

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\ell \cdot \sqrt{0.5}}}{t}\right) \]
      2. associate-*l/57.4%

        \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)} \]
      3. *-commutative57.4%

        \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
    9. Simplified57.4%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.4 \cdot 10^{-204}:\\ \;\;\;\;\sin^{-1} 1\\ \mathbf{elif}\;\ell \leq 300:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} 1\\ \end{array} \]

Alternative 13: 50.5% accurate, 4.1× speedup?

\[\begin{array}{l} t = |t|\\ \\ \sin^{-1} 1 \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc) :precision binary64 (asin 1.0))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	return asin(1.0);
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    code = asin(1.0d0)
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	return Math.asin(1.0);
}
t = abs(t)
def code(t, l, Om, Omc):
	return math.asin(1.0)
t = abs(t)
function code(t, l, Om, Omc)
	return asin(1.0)
end
t = abs(t)
function tmp = code(t, l, Om, Omc)
	tmp = asin(1.0);
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} 1
\end{array}
Derivation
  1. Initial program 80.3%

    \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
  2. Step-by-step derivation
    1. unpow280.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}}\right) \]
    2. clear-num80.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \color{blue}{\frac{1}{\frac{\ell}{t}}}\right)}}\right) \]
    3. un-div-inv80.3%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
  3. Applied egg-rr80.3%

    \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}}\right) \]
  4. Taylor expanded in Om around 0 60.7%

    \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
  5. Step-by-step derivation
    1. *-commutative60.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
    2. associate-*l/60.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2} \cdot 2}{{\ell}^{2}}}}}\right) \]
    3. rem-square-sqrt60.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
    4. unpow260.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{{\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
    5. *-commutative60.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{\left(\sqrt{2}\right)}^{2} \cdot {t}^{2}}}{{\ell}^{2}}}}\right) \]
    6. *-commutative60.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
    7. unpow260.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right)}}{{\ell}^{2}}}}\right) \]
    8. rem-square-sqrt60.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{{t}^{2} \cdot \color{blue}{2}}{{\ell}^{2}}}}\right) \]
    9. associate-*l/60.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{\frac{{t}^{2}}{{\ell}^{2}} \cdot 2}}}\right) \]
    10. *-commutative60.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \color{blue}{2 \cdot \frac{{t}^{2}}{{\ell}^{2}}}}}\right) \]
    11. unpow260.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{\color{blue}{t \cdot t}}{{\ell}^{2}}}}\right) \]
    12. unpow260.7%

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
  6. Simplified60.7%

    \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\ell \cdot \ell}}}}\right) \]
  7. Taylor expanded in t around 0 49.9%

    \[\leadsto \sin^{-1} \color{blue}{1} \]
  8. Final simplification49.9%

    \[\leadsto \sin^{-1} 1 \]

Reproduce

?
herbie shell --seed 2023213 
(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)))))))