Toniolo and Linder, Equation (2)

Percentage Accurate: 83.7% → 98.8%
Time: 15.4s
Alternatives: 11
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 11 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.7% 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.8% accurate, 1.0× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+96}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+123}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\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+96)
   (asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (/ (- l) t) (sqrt 2.0))))
   (if (<= (/ t l) 5e+123)
     (asin
      (sqrt
       (/
        (- 1.0 (* (/ Om Omc) (/ Om Omc)))
        (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
     (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+96) {
		tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * ((-l / t) / sqrt(2.0))));
	} else if ((t / l) <= 5e+123) {
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	} 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+96)) then
        tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * ((-l / t) / sqrt(2.0d0))))
    else if ((t / l) <= 5d+123) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
    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+96) {
		tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * ((-l / t) / Math.sqrt(2.0))));
	} else if ((t / l) <= 5e+123) {
		tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	} 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+96:
		tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * ((-l / t) / math.sqrt(2.0))))
	elif (t / l) <= 5e+123:
		tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))))
	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+96)
		tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(Float64(Float64(-l) / t) / sqrt(2.0))));
	elseif (Float64(t / l) <= 5e+123)
		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(t / l)))))));
	else
		tmp = asin(Float64(l * Float64(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+96)
		tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * ((-l / t) / sqrt(2.0))));
	elseif ((t / l) <= 5e+123)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	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+96], 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], If[LessEqual[N[(t / l), $MachinePrecision], 5e+123], 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[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+96}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\

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

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


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

    1. Initial program 68.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-div68.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. div-inv68.3%

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/95.9%

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

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

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

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

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

      \[\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)} \]
    7. Step-by-step derivation
      1. mul-1-neg88.9%

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

        \[\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-in88.9%

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

        \[\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. unpow288.9%

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

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

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

    if -2.0000000000000001e96 < (/.f64 t l) < 4.99999999999999974e123

    1. Initial program 98.0%

      \[\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. unpow298.0%

        \[\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) \]
    3. Applied egg-rr98.0%

      \[\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) \]
    4. Step-by-step derivation
      1. unpow298.0%

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

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

    if 4.99999999999999974e123 < (/.f64 t l)

    1. Initial program 54.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 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.3% 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}{\frac{\ell}{\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(t / Float64(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[(t / N[(l / N[Sqrt[2.0], $MachinePrecision]), $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}{\frac{\ell}{\sqrt{2}}}\right)}\right)
\end{array}
Derivation
  1. Initial program 86.0%

    \[\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-div86.0%

      \[\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. div-inv86.0%

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

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

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

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

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

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

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

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

    \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)} \]
  4. Step-by-step derivation
    1. associate-*r/97.8%

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

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

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

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

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

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

Alternative 3: 98.3% 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, \sqrt{2} \cdot \frac{t}{\ell}\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 (* (sqrt 2.0) (/ t l))))))
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, (sqrt(2.0) * (t / l)))));
}
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, (Math.sqrt(2.0) * (t / l)))));
}
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, (math.sqrt(2.0) * (t / l)))))
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(sqrt(2.0) * Float64(t / l)))))
end
t = abs(t)
function tmp = code(t, l, Om, Omc)
	tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, (sqrt(2.0) * (t / l)))));
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[Sqrt[2.0], $MachinePrecision] * N[(t / l), $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, \sqrt{2} \cdot \frac{t}{\ell}\right)}\right)
\end{array}
Derivation
  1. Initial program 86.0%

    \[\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-div86.0%

      \[\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-sqrt86.0%

      \[\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-def86.0%

      \[\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. *-commutative86.0%

      \[\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-prod85.9%

      \[\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. unpow285.9%

      \[\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-prod57.4%

      \[\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-sqrt97.8%

      \[\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-rr97.8%

    \[\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 simplification97.8%

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

Alternative 4: 96.5% accurate, 1.3× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+162}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{Omc \cdot Omc}} \cdot \frac{-\ell}{t \cdot \sqrt{2}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+123}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\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+162)
   (asin
    (* (sqrt (- 1.0 (/ (* Om Om) (* Omc Omc)))) (/ (- l) (* t (sqrt 2.0)))))
   (if (<= (/ t l) 5e+123)
     (asin
      (sqrt
       (/
        (- 1.0 (* (/ Om Omc) (/ Om Omc)))
        (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
     (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+162) {
		tmp = asin((sqrt((1.0 - ((Om * Om) / (Omc * Omc)))) * (-l / (t * sqrt(2.0)))));
	} else if ((t / l) <= 5e+123) {
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	} 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+162)) then
        tmp = asin((sqrt((1.0d0 - ((om * om) / (omc * omc)))) * (-l / (t * sqrt(2.0d0)))))
    else if ((t / l) <= 5d+123) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
    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+162) {
		tmp = Math.asin((Math.sqrt((1.0 - ((Om * Om) / (Omc * Omc)))) * (-l / (t * Math.sqrt(2.0)))));
	} else if ((t / l) <= 5e+123) {
		tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	} 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+162:
		tmp = math.asin((math.sqrt((1.0 - ((Om * Om) / (Omc * Omc)))) * (-l / (t * math.sqrt(2.0)))))
	elif (t / l) <= 5e+123:
		tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))))
	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+162)
		tmp = asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om * Om) / Float64(Omc * Omc)))) * Float64(Float64(-l) / Float64(t * sqrt(2.0)))));
	elseif (Float64(t / l) <= 5e+123)
		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(t / l)))))));
	else
		tmp = asin(Float64(l * Float64(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+162)
		tmp = asin((sqrt((1.0 - ((Om * Om) / (Omc * Omc)))) * (-l / (t * sqrt(2.0)))));
	elseif ((t / l) <= 5e+123)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	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+162], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[(N[(Om * Om), $MachinePrecision] / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-l) / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+123], 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[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+162}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{Omc \cdot Omc}} \cdot \frac{-\ell}{t \cdot \sqrt{2}}\right)\\

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

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


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

    1. Initial program 64.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-div64.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-sqrt64.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-def64.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. *-commutative64.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-prod64.3%

        \[\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. unpow264.3%

        \[\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-sqrt95.1%

        \[\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-rr95.1%

      \[\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.8%

      \[\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.8%

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

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

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

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

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

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

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

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

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

    if -9.9999999999999994e161 < (/.f64 t l) < 4.99999999999999974e123

    1. Initial program 97.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. unpow297.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) \]
    3. Applied egg-rr97.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) \]
    4. Step-by-step derivation
      1. unpow297.5%

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

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

    if 4.99999999999999974e123 < (/.f64 t l)

    1. Initial program 54.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 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.7% accurate, 1.3× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+138}:\\ \;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}} \cdot \sqrt{1 - \frac{\frac{Om \cdot Om}{Omc}}{Omc}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+123}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\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+138)
   (asin
    (* (/ (/ (- l) t) (sqrt 2.0)) (sqrt (- 1.0 (/ (/ (* Om Om) Omc) Omc)))))
   (if (<= (/ t l) 5e+123)
     (asin
      (sqrt
       (/
        (- 1.0 (* (/ Om Omc) (/ Om Omc)))
        (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
     (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+138) {
		tmp = asin((((-l / t) / sqrt(2.0)) * sqrt((1.0 - (((Om * Om) / Omc) / Omc)))));
	} else if ((t / l) <= 5e+123) {
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	} 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+138)) then
        tmp = asin((((-l / t) / sqrt(2.0d0)) * sqrt((1.0d0 - (((om * om) / omc) / omc)))))
    else if ((t / l) <= 5d+123) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
    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+138) {
		tmp = Math.asin((((-l / t) / Math.sqrt(2.0)) * Math.sqrt((1.0 - (((Om * Om) / Omc) / Omc)))));
	} else if ((t / l) <= 5e+123) {
		tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	} 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+138:
		tmp = math.asin((((-l / t) / math.sqrt(2.0)) * math.sqrt((1.0 - (((Om * Om) / Omc) / Omc)))))
	elif (t / l) <= 5e+123:
		tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))))
	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+138)
		tmp = asin(Float64(Float64(Float64(Float64(-l) / t) / sqrt(2.0)) * sqrt(Float64(1.0 - Float64(Float64(Float64(Om * Om) / Omc) / Omc)))));
	elseif (Float64(t / l) <= 5e+123)
		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(t / l)))))));
	else
		tmp = asin(Float64(l * Float64(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+138)
		tmp = asin((((-l / t) / sqrt(2.0)) * sqrt((1.0 - (((Om * Om) / Omc) / Omc)))));
	elseif ((t / l) <= 5e+123)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	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+138], N[ArcSin[N[(N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 - N[(N[(N[(Om * Om), $MachinePrecision] / Omc), $MachinePrecision] / Omc), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+123], 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[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+138}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}} \cdot \sqrt{1 - \frac{\frac{Om \cdot Om}{Omc}}{Omc}}\right)\\

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

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


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

    1. Initial program 63.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. sqrt-div63.5%

        \[\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. div-inv63.5%

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/95.4%

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

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

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

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

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

      \[\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)} \]
    7. Step-by-step derivation
      1. mul-1-neg87.3%

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

        \[\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-in87.3%

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

        \[\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. unpow287.3%

        \[\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.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

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

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

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

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

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

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

    if -2.0000000000000001e138 < (/.f64 t l) < 4.99999999999999974e123

    1. Initial program 98.0%

      \[\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. unpow298.0%

        \[\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) \]
    3. Applied egg-rr98.0%

      \[\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) \]
    4. Step-by-step derivation
      1. unpow298.0%

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

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

    if 4.99999999999999974e123 < (/.f64 t l)

    1. Initial program 54.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 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.9% accurate, 1.8× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -10000:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t}\right)}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq -1 \cdot 10^{-123}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{Omc \cdot Omc}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+22}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{2 \cdot \left(t \cdot t\right)}{\ell \cdot \ell}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\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) -10000.0)
   (asin (sqrt (* 0.5 (* (/ l t) (/ l t)))))
   (if (<= (/ t l) -1e-123)
     (asin (sqrt (- 1.0 (/ (* Om Om) (* Omc Omc)))))
     (if (<= (/ t l) 5e+22)
       (asin (sqrt (/ 1.0 (+ 1.0 (/ (* 2.0 (* t t)) (* l l))))))
       (asin (* l (/ (sqrt 0.5) t)))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -10000.0) {
		tmp = asin(sqrt((0.5 * ((l / t) * (l / t)))));
	} else if ((t / l) <= -1e-123) {
		tmp = asin(sqrt((1.0 - ((Om * Om) / (Omc * Omc)))));
	} else if ((t / l) <= 5e+22) {
		tmp = asin(sqrt((1.0 / (1.0 + ((2.0 * (t * t)) / (l * l))))));
	} 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) <= (-10000.0d0)) then
        tmp = asin(sqrt((0.5d0 * ((l / t) * (l / t)))))
    else if ((t / l) <= (-1d-123)) then
        tmp = asin(sqrt((1.0d0 - ((om * om) / (omc * omc)))))
    else if ((t / l) <= 5d+22) then
        tmp = asin(sqrt((1.0d0 / (1.0d0 + ((2.0d0 * (t * t)) / (l * l))))))
    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) <= -10000.0) {
		tmp = Math.asin(Math.sqrt((0.5 * ((l / t) * (l / t)))));
	} else if ((t / l) <= -1e-123) {
		tmp = Math.asin(Math.sqrt((1.0 - ((Om * Om) / (Omc * Omc)))));
	} else if ((t / l) <= 5e+22) {
		tmp = Math.asin(Math.sqrt((1.0 / (1.0 + ((2.0 * (t * t)) / (l * l))))));
	} 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) <= -10000.0:
		tmp = math.asin(math.sqrt((0.5 * ((l / t) * (l / t)))))
	elif (t / l) <= -1e-123:
		tmp = math.asin(math.sqrt((1.0 - ((Om * Om) / (Omc * Omc)))))
	elif (t / l) <= 5e+22:
		tmp = math.asin(math.sqrt((1.0 / (1.0 + ((2.0 * (t * t)) / (l * l))))))
	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) <= -10000.0)
		tmp = asin(sqrt(Float64(0.5 * Float64(Float64(l / t) * Float64(l / t)))));
	elseif (Float64(t / l) <= -1e-123)
		tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om * Om) / Float64(Omc * Omc)))));
	elseif (Float64(t / l) <= 5e+22)
		tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(Float64(2.0 * Float64(t * t)) / Float64(l * l))))));
	else
		tmp = asin(Float64(l * Float64(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) <= -10000.0)
		tmp = asin(sqrt((0.5 * ((l / t) * (l / t)))));
	elseif ((t / l) <= -1e-123)
		tmp = asin(sqrt((1.0 - ((Om * Om) / (Omc * Omc)))));
	elseif ((t / l) <= 5e+22)
		tmp = asin(sqrt((1.0 / (1.0 + ((2.0 * (t * t)) / (l * l))))));
	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], -10000.0], N[ArcSin[N[Sqrt[N[(0.5 * N[(N[(l / t), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], -1e-123], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om * Om), $MachinePrecision] / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+22], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -10000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t}\right)}\right)\\

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

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

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


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

    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. Taylor expanded in t around inf 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e4 < (/.f64 t l) < -1.0000000000000001e-123

    1. Initial program 96.6%

      \[\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 0 84.7%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. unpow284.7%

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

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

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

    if -1.0000000000000001e-123 < (/.f64 t l) < 4.9999999999999996e22

    1. Initial program 97.6%

      \[\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. unpow297.6%

        \[\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-num97.6%

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{t}{\frac{\ell}{t} \cdot \ell}}}}\right) \]
    4. Taylor expanded in Om around 0 87.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. associate-*r/87.3%

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

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

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{\color{blue}{{t}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{{\ell}^{2}}}}\right) \]
      5. unpow287.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) \]
      6. rem-square-sqrt87.3%

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

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

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

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

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

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

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

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

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

    if 4.9999999999999996e22 < (/.f64 t l)

    1. Initial program 69.5%

      \[\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 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 91.0% accurate, 1.8× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq 5 \cdot 10^{+123}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\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) 5e+123)
   (asin
    (sqrt
     (/
      (- 1.0 (* (/ Om Omc) (/ Om Omc)))
      (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
   (asin (* l (/ (sqrt 0.5) t)))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= 5e+123) {
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	} 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) <= 5d+123) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
    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) <= 5e+123) {
		tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	} 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) <= 5e+123:
		tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))))
	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) <= 5e+123)
		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(t / l)))))));
	else
		tmp = asin(Float64(l * Float64(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) <= 5e+123)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
	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], 5e+123], 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[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq 5 \cdot 10^{+123}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\

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


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

    1. Initial program 92.8%

      \[\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. unpow292.8%

        \[\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) \]
    3. Applied egg-rr92.8%

      \[\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) \]
    4. Step-by-step derivation
      1. unpow292.8%

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

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

    if 4.99999999999999974e123 < (/.f64 t l)

    1. Initial program 54.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 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 83.7% accurate, 1.9× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -10000:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t}\right)}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{-10}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{Om \cdot Om}{Omc \cdot Omc}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\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) -10000.0)
   (asin (sqrt (* 0.5 (* (/ l t) (/ l t)))))
   (if (<= (/ t l) 5e-10)
     (asin (sqrt (- 1.0 (/ (* Om Om) (* Omc Omc)))))
     (asin (* l (/ (sqrt 0.5) t))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t / l) <= -10000.0) {
		tmp = asin(sqrt((0.5 * ((l / t) * (l / t)))));
	} else if ((t / l) <= 5e-10) {
		tmp = asin(sqrt((1.0 - ((Om * Om) / (Omc * Omc)))));
	} 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) <= (-10000.0d0)) then
        tmp = asin(sqrt((0.5d0 * ((l / t) * (l / t)))))
    else if ((t / l) <= 5d-10) then
        tmp = asin(sqrt((1.0d0 - ((om * om) / (omc * omc)))))
    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) <= -10000.0) {
		tmp = Math.asin(Math.sqrt((0.5 * ((l / t) * (l / t)))));
	} else if ((t / l) <= 5e-10) {
		tmp = Math.asin(Math.sqrt((1.0 - ((Om * Om) / (Omc * Omc)))));
	} 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) <= -10000.0:
		tmp = math.asin(math.sqrt((0.5 * ((l / t) * (l / t)))))
	elif (t / l) <= 5e-10:
		tmp = math.asin(math.sqrt((1.0 - ((Om * Om) / (Omc * Omc)))))
	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) <= -10000.0)
		tmp = asin(sqrt(Float64(0.5 * Float64(Float64(l / t) * Float64(l / t)))));
	elseif (Float64(t / l) <= 5e-10)
		tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om * Om) / Float64(Omc * Omc)))));
	else
		tmp = asin(Float64(l * Float64(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) <= -10000.0)
		tmp = asin(sqrt((0.5 * ((l / t) * (l / t)))));
	elseif ((t / l) <= 5e-10)
		tmp = asin(sqrt((1.0 - ((Om * Om) / (Omc * Omc)))));
	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], -10000.0], N[ArcSin[N[Sqrt[N[(0.5 * N[(N[(l / t), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e-10], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om * Om), $MachinePrecision] / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -10000:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t}\right)}\right)\\

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

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


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

    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. Taylor expanded in t around inf 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e4 < (/.f64 t l) < 5.00000000000000031e-10

    1. Initial program 98.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 0 85.0%

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{1 - \frac{{Om}^{2}}{{Omc}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. unpow285.0%

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

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

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

    if 5.00000000000000031e-10 < (/.f64 t l)

    1. Initial program 70.0%

      \[\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 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 41.8% accurate, 1.9× speedup?

\[\begin{array}{l} t = |t|\\ \\ \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq 5 \cdot 10^{+123}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\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) 5e+123)
   (asin (sqrt (* 0.5 (* (/ l t) (/ 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) <= 5e+123) {
		tmp = asin(sqrt((0.5 * ((l / t) * (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) <= 5d+123) then
        tmp = asin(sqrt((0.5d0 * ((l / t) * (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) <= 5e+123) {
		tmp = Math.asin(Math.sqrt((0.5 * ((l / t) * (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) <= 5e+123:
		tmp = math.asin(math.sqrt((0.5 * ((l / t) * (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) <= 5e+123)
		tmp = asin(sqrt(Float64(0.5 * Float64(Float64(l / t) * Float64(l / t)))));
	else
		tmp = asin(Float64(l * Float64(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) <= 5e+123)
		tmp = asin(sqrt((0.5 * ((l / t) * (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], 5e+123], N[ArcSin[N[Sqrt[N[(0.5 * N[(N[(l / t), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq 5 \cdot 10^{+123}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t}\right)}\right)\\

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


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

    1. Initial program 92.8%

      \[\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 19.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999974e123 < (/.f64 t l)

    1. Initial program 54.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 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 31.3% accurate, 2.0× speedup?

\[\begin{array}{l} t = |t|\\ \\ \sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right) \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc) :precision binary64 (asin (* (/ l t) (sqrt 0.5))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	return asin(((l / t) * sqrt(0.5)));
}
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(((l / t) * sqrt(0.5d0)))
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	return Math.asin(((l / t) * Math.sqrt(0.5)));
}
t = abs(t)
def code(t, l, Om, Omc):
	return math.asin(((l / t) * math.sqrt(0.5)))
t = abs(t)
function code(t, l, Om, Omc)
	return asin(Float64(Float64(l / t) * sqrt(0.5)))
end
t = abs(t)
function tmp = code(t, l, Om, Omc)
	tmp = asin(((l / t) * sqrt(0.5)));
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[(l / t), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)
\end{array}
Derivation
  1. Initial program 86.0%

    \[\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 23.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 31.3% accurate, 2.0× speedup?

\[\begin{array}{l} t = |t|\\ \\ \sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right) \end{array} \]
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc) :precision binary64 (asin (* l (/ (sqrt 0.5) t))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
	return asin((l * (sqrt(0.5) / t)));
}
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((l * (sqrt(0.5d0) / t)))
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
	return Math.asin((l * (Math.sqrt(0.5) / t)));
}
t = abs(t)
def code(t, l, Om, Omc):
	return math.asin((l * (math.sqrt(0.5) / t)))
t = abs(t)
function code(t, l, Om, Omc)
	return asin(Float64(l * Float64(sqrt(0.5) / t)))
end
t = abs(t)
function tmp = code(t, l, Om, Omc)
	tmp = asin((l * (sqrt(0.5) / t)));
end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} \left(\ell \cdot \frac{\sqrt{0.5}}{t}\right)
\end{array}
Derivation
  1. Initial program 86.0%

    \[\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 23.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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