Toniolo and Linder, Equation (2)

Percentage Accurate: 83.7% → 98.8%
Time: 20.2s
Alternatives: 6
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 6 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_m = \left|t\right| \\ \begin{array}{l} t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\ \mathbf{if}\;\frac{t_m}{\ell} \leq -5 \cdot 10^{+141}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\ell \cdot \frac{-\sqrt{0.5}}{t_m}\right)\right)\\ \mathbf{elif}\;\frac{t_m}{\ell} \leq 2 \cdot 10^{+124}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(\frac{t_m}{\ell} \cdot \frac{t_m}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}} \cdot \sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
 :precision binary64
 (let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
   (if (<= (/ t_m l) -5e+141)
     (asin (* (sqrt t_1) (* l (/ (- (sqrt 0.5)) t_m))))
     (if (<= (/ t_m l) 2e+124)
       (asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t_m l) (/ t_m l)))))))
       (asin
        (* (/ l (/ t_m (sqrt 0.5))) (sqrt (- 1.0 (pow (/ Om Omc) 2.0)))))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	double tmp;
	if ((t_m / l) <= -5e+141) {
		tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5) / t_m))));
	} else if ((t_m / l) <= 2e+124) {
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	} else {
		tmp = asin(((l / (t_m / sqrt(0.5))) * sqrt((1.0 - pow((Om / Omc), 2.0)))));
	}
	return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 1.0d0 - ((om / omc) / (omc / om))
    if ((t_m / l) <= (-5d+141)) then
        tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5d0) / t_m))))
    else if ((t_m / l) <= 2d+124) then
        tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) * (t_m / l)))))))
    else
        tmp = asin(((l / (t_m / sqrt(0.5d0))) * sqrt((1.0d0 - ((om / omc) ** 2.0d0)))))
    end if
    code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	double tmp;
	if ((t_m / l) <= -5e+141) {
		tmp = Math.asin((Math.sqrt(t_1) * (l * (-Math.sqrt(0.5) / t_m))));
	} else if ((t_m / l) <= 2e+124) {
		tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	} else {
		tmp = Math.asin(((l / (t_m / Math.sqrt(0.5))) * Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0)))));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	t_1 = 1.0 - ((Om / Omc) / (Omc / Om))
	tmp = 0
	if (t_m / l) <= -5e+141:
		tmp = math.asin((math.sqrt(t_1) * (l * (-math.sqrt(0.5) / t_m))))
	elif (t_m / l) <= 2e+124:
		tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))))
	else:
		tmp = math.asin(((l / (t_m / math.sqrt(0.5))) * math.sqrt((1.0 - math.pow((Om / Omc), 2.0)))))
	return tmp
t_m = abs(t)
function code(t_m, l, Om, Omc)
	t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))
	tmp = 0.0
	if (Float64(t_m / l) <= -5e+141)
		tmp = asin(Float64(sqrt(t_1) * Float64(l * Float64(Float64(-sqrt(0.5)) / t_m))));
	elseif (Float64(t_m / l) <= 2e+124)
		tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) * Float64(t_m / l)))))));
	else
		tmp = asin(Float64(Float64(l / Float64(t_m / sqrt(0.5))) * sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)))));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(t_m, l, Om, Omc)
	t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	tmp = 0.0;
	if ((t_m / l) <= -5e+141)
		tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5) / t_m))));
	elseif ((t_m / l) <= 2e+124)
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	else
		tmp = asin(((l / (t_m / sqrt(0.5))) * sqrt((1.0 - ((Om / Omc) ^ 2.0)))));
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l), $MachinePrecision], -5e+141], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l * N[((-N[Sqrt[0.5], $MachinePrecision]) / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 2e+124], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|

\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t_m}{\ell} \leq -5 \cdot 10^{+141}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\ell \cdot \frac{-\sqrt{0.5}}{t_m}\right)\right)\\

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

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


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

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000025e141 < (/.f64 t l) < 1.9999999999999999e124

    1. Initial program 98.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. unpow298.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-rr98.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. unpow220.2%

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

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

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

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

    if 1.9999999999999999e124 < (/.f64 t l)

    1. Initial program 55.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.8% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\ \mathbf{if}\;\frac{t_m}{\ell} \leq -5 \cdot 10^{+141}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\ell \cdot \frac{-\sqrt{0.5}}{t_m}\right)\right)\\ \mathbf{elif}\;\frac{t_m}{\ell} \leq 2 \cdot 10^{+149}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(\frac{t_m}{\ell} \cdot \frac{t_m}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \left(\ell \cdot \frac{\sqrt{0.5}}{t_m}\right)\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
 :precision binary64
 (let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
   (if (<= (/ t_m l) -5e+141)
     (asin (* (sqrt t_1) (* l (/ (- (sqrt 0.5)) t_m))))
     (if (<= (/ t_m l) 2e+149)
       (asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t_m l) (/ t_m l)))))))
       (asin
        (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (* l (/ (sqrt 0.5) t_m))))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	double tmp;
	if ((t_m / l) <= -5e+141) {
		tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5) / t_m))));
	} else if ((t_m / l) <= 2e+149) {
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	} else {
		tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * (l * (sqrt(0.5) / t_m))));
	}
	return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 1.0d0 - ((om / omc) / (omc / om))
    if ((t_m / l) <= (-5d+141)) then
        tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5d0) / t_m))))
    else if ((t_m / l) <= 2d+149) then
        tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) * (t_m / l)))))))
    else
        tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * (l * (sqrt(0.5d0) / t_m))))
    end if
    code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	double tmp;
	if ((t_m / l) <= -5e+141) {
		tmp = Math.asin((Math.sqrt(t_1) * (l * (-Math.sqrt(0.5) / t_m))));
	} else if ((t_m / l) <= 2e+149) {
		tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	} else {
		tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * (l * (Math.sqrt(0.5) / t_m))));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	t_1 = 1.0 - ((Om / Omc) / (Omc / Om))
	tmp = 0
	if (t_m / l) <= -5e+141:
		tmp = math.asin((math.sqrt(t_1) * (l * (-math.sqrt(0.5) / t_m))))
	elif (t_m / l) <= 2e+149:
		tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))))
	else:
		tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * (l * (math.sqrt(0.5) / t_m))))
	return tmp
t_m = abs(t)
function code(t_m, l, Om, Omc)
	t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))
	tmp = 0.0
	if (Float64(t_m / l) <= -5e+141)
		tmp = asin(Float64(sqrt(t_1) * Float64(l * Float64(Float64(-sqrt(0.5)) / t_m))));
	elseif (Float64(t_m / l) <= 2e+149)
		tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) * Float64(t_m / l)))))));
	else
		tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(l * Float64(sqrt(0.5) / t_m))));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(t_m, l, Om, Omc)
	t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	tmp = 0.0;
	if ((t_m / l) <= -5e+141)
		tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5) / t_m))));
	elseif ((t_m / l) <= 2e+149)
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	else
		tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * (l * (sqrt(0.5) / t_m))));
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l), $MachinePrecision], -5e+141], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l * N[((-N[Sqrt[0.5], $MachinePrecision]) / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 2e+149], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|

\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t_m}{\ell} \leq -5 \cdot 10^{+141}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\ell \cdot \frac{-\sqrt{0.5}}{t_m}\right)\right)\\

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

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


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

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000025e141 < (/.f64 t l) < 2.0000000000000001e149

    1. Initial program 98.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. unpow298.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-rr98.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. unpow219.8%

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

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

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

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

    if 2.0000000000000001e149 < (/.f64 t l)

    1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 98.8% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\ \mathbf{if}\;\frac{t_m}{\ell} \leq -5 \cdot 10^{+141}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\ell \cdot \frac{-\sqrt{0.5}}{t_m}\right)\right)\\ \mathbf{elif}\;\frac{t_m}{\ell} \leq 2 \cdot 10^{+149}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(\frac{t_m}{\ell} \cdot \frac{t_m}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\ell}{t_m \cdot \sqrt{2}}\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
 :precision binary64
 (let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
   (if (<= (/ t_m l) -5e+141)
     (asin (* (sqrt t_1) (* l (/ (- (sqrt 0.5)) t_m))))
     (if (<= (/ t_m l) 2e+149)
       (asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t_m l) (/ t_m l)))))))
       (asin
        (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ l (* t_m (sqrt 2.0)))))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	double tmp;
	if ((t_m / l) <= -5e+141) {
		tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5) / t_m))));
	} else if ((t_m / l) <= 2e+149) {
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	} else {
		tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * (l / (t_m * sqrt(2.0)))));
	}
	return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 1.0d0 - ((om / omc) / (omc / om))
    if ((t_m / l) <= (-5d+141)) then
        tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5d0) / t_m))))
    else if ((t_m / l) <= 2d+149) then
        tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) * (t_m / l)))))))
    else
        tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * (l / (t_m * sqrt(2.0d0)))))
    end if
    code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	double tmp;
	if ((t_m / l) <= -5e+141) {
		tmp = Math.asin((Math.sqrt(t_1) * (l * (-Math.sqrt(0.5) / t_m))));
	} else if ((t_m / l) <= 2e+149) {
		tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	} else {
		tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * (l / (t_m * Math.sqrt(2.0)))));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	t_1 = 1.0 - ((Om / Omc) / (Omc / Om))
	tmp = 0
	if (t_m / l) <= -5e+141:
		tmp = math.asin((math.sqrt(t_1) * (l * (-math.sqrt(0.5) / t_m))))
	elif (t_m / l) <= 2e+149:
		tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))))
	else:
		tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * (l / (t_m * math.sqrt(2.0)))))
	return tmp
t_m = abs(t)
function code(t_m, l, Om, Omc)
	t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))
	tmp = 0.0
	if (Float64(t_m / l) <= -5e+141)
		tmp = asin(Float64(sqrt(t_1) * Float64(l * Float64(Float64(-sqrt(0.5)) / t_m))));
	elseif (Float64(t_m / l) <= 2e+149)
		tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) * Float64(t_m / l)))))));
	else
		tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(l / Float64(t_m * sqrt(2.0)))));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(t_m, l, Om, Omc)
	t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	tmp = 0.0;
	if ((t_m / l) <= -5e+141)
		tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5) / t_m))));
	elseif ((t_m / l) <= 2e+149)
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	else
		tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * (l / (t_m * sqrt(2.0)))));
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l), $MachinePrecision], -5e+141], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l * N[((-N[Sqrt[0.5], $MachinePrecision]) / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 2e+149], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|

\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t_m}{\ell} \leq -5 \cdot 10^{+141}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\ell \cdot \frac{-\sqrt{0.5}}{t_m}\right)\right)\\

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

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


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

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000025e141 < (/.f64 t l) < 2.0000000000000001e149

    1. Initial program 98.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. unpow298.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-rr98.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. unpow219.8%

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

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

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

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

    if 2.0000000000000001e149 < (/.f64 t l)

    1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \sin^{-1} \left(\frac{\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}}{\mathsf{hypot}\left(1, \frac{t_m}{\ell} \cdot \sqrt{2}\right)}\right) \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
 :precision binary64
 (asin
  (/
   (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om))))
   (hypot 1.0 (* (/ t_m l) (sqrt 2.0))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	return asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, ((t_m / l) * sqrt(2.0)))));
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
	return Math.asin((Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / Math.hypot(1.0, ((t_m / l) * Math.sqrt(2.0)))));
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	return math.asin((math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / math.hypot(1.0, ((t_m / l) * math.sqrt(2.0)))))
t_m = abs(t)
function code(t_m, l, Om, Omc)
	return asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) / hypot(1.0, Float64(Float64(t_m / l) * sqrt(2.0)))))
end
t_m = abs(t);
function tmp = code(t_m, l, Om, Omc)
	tmp = asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, ((t_m / l) * sqrt(2.0)))));
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(t$95$m / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|

\\
\sin^{-1} \left(\frac{\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}}{\mathsf{hypot}\left(1, \frac{t_m}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Derivation
  1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 91.5% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\ \mathbf{if}\;\frac{t_m}{\ell} \leq -5 \cdot 10^{+141}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\ell \cdot \frac{-\sqrt{0.5}}{t_m}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(\frac{t_m}{\ell} \cdot \frac{t_m}{\ell}\right)}}\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
 :precision binary64
 (let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
   (if (<= (/ t_m l) -5e+141)
     (asin (* (sqrt t_1) (* l (/ (- (sqrt 0.5)) t_m))))
     (asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t_m l) (/ t_m l))))))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	double tmp;
	if ((t_m / l) <= -5e+141) {
		tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5) / t_m))));
	} else {
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	}
	return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 1.0d0 - ((om / omc) / (omc / om))
    if ((t_m / l) <= (-5d+141)) then
        tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5d0) / t_m))))
    else
        tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) * (t_m / l)))))))
    end if
    code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	double tmp;
	if ((t_m / l) <= -5e+141) {
		tmp = Math.asin((Math.sqrt(t_1) * (l * (-Math.sqrt(0.5) / t_m))));
	} else {
		tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	t_1 = 1.0 - ((Om / Omc) / (Omc / Om))
	tmp = 0
	if (t_m / l) <= -5e+141:
		tmp = math.asin((math.sqrt(t_1) * (l * (-math.sqrt(0.5) / t_m))))
	else:
		tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))))
	return tmp
t_m = abs(t)
function code(t_m, l, Om, Omc)
	t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))
	tmp = 0.0
	if (Float64(t_m / l) <= -5e+141)
		tmp = asin(Float64(sqrt(t_1) * Float64(l * Float64(Float64(-sqrt(0.5)) / t_m))));
	else
		tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) * Float64(t_m / l)))))));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(t_m, l, Om, Omc)
	t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
	tmp = 0.0;
	if ((t_m / l) <= -5e+141)
		tmp = asin((sqrt(t_1) * (l * (-sqrt(0.5) / t_m))));
	else
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l), $MachinePrecision], -5e+141], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l * N[((-N[Sqrt[0.5], $MachinePrecision]) / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|

\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t_m}{\ell} \leq -5 \cdot 10^{+141}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\ell \cdot \frac{-\sqrt{0.5}}{t_m}\right)\right)\\

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


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

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000025e141 < (/.f64 t l)

    1. Initial program 91.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. unpow291.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-rr91.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. unpow224.0%

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

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

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

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

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

Alternative 6: 83.7% accurate, 1.9× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \left(\frac{t_m}{\ell} \cdot \frac{t_m}{\ell}\right)}}\right) \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
 :precision binary64
 (asin
  (sqrt
   (/
    (- 1.0 (/ (/ Om Omc) (/ Omc Om)))
    (+ 1.0 (* 2.0 (* (/ t_m l) (/ t_m l))))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	return asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    code = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t_m / l) * (t_m / l)))))))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
	return Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	return math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))))
t_m = abs(t)
function code(t_m, l, Om, Omc)
	return asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) * Float64(t_m / l)))))))
end
t_m = abs(t);
function tmp = code(t_m, l, Om, Omc)
	tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|

\\
\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \left(\frac{t_m}{\ell} \cdot \frac{t_m}{\ell}\right)}}\right)
\end{array}
Derivation
  1. Initial program 83.2%

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

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

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

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

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

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

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

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

Reproduce

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