Toniolo and Linder, Equation (2)

Percentage Accurate: 84.1% → 97.9%
Time: 23.0s
Alternatives: 11
Speedup: 1.3×

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: 84.1% 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: 97.9% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\ \mathbf{if}\;\frac{t_m}{\ell} \leq -1 \cdot 10^{+170}:\\ \;\;\;\;\left|\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\right|\\ \mathbf{elif}\;\frac{t_m}{\ell} \leq 10^{+118}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{\frac{t_m}{\ell}}{\frac{\ell}{t_m}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{t_1} \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 (pow (/ Om Omc) 2.0))))
   (if (<= (/ t_m l) -1e+170)
     (fabs (asin (/ l (/ t_m (sqrt 0.5)))))
     (if (<= (/ t_m l) 1e+118)
       (asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m)))))))
       (asin (* (sqrt t_1) (/ 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 - pow((Om / Omc), 2.0);
	double tmp;
	if ((t_m / l) <= -1e+170) {
		tmp = fabs(asin((l / (t_m / sqrt(0.5)))));
	} else if ((t_m / l) <= 1e+118) {
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	} else {
		tmp = asin((sqrt(t_1) * (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) ** 2.0d0)
    if ((t_m / l) <= (-1d+170)) then
        tmp = abs(asin((l / (t_m / sqrt(0.5d0)))))
    else if ((t_m / l) <= 1d+118) then
        tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) / (l / t_m)))))))
    else
        tmp = asin((sqrt(t_1) * (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 - Math.pow((Om / Omc), 2.0);
	double tmp;
	if ((t_m / l) <= -1e+170) {
		tmp = Math.abs(Math.asin((l / (t_m / Math.sqrt(0.5)))));
	} else if ((t_m / l) <= 1e+118) {
		tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	} else {
		tmp = Math.asin((Math.sqrt(t_1) * (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 - math.pow((Om / Omc), 2.0)
	tmp = 0
	if (t_m / l) <= -1e+170:
		tmp = math.fabs(math.asin((l / (t_m / math.sqrt(0.5)))))
	elif (t_m / l) <= 1e+118:
		tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))))
	else:
		tmp = math.asin((math.sqrt(t_1) * (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(Om / Omc) ^ 2.0))
	tmp = 0.0
	if (Float64(t_m / l) <= -1e+170)
		tmp = abs(asin(Float64(l / Float64(t_m / sqrt(0.5)))));
	elseif (Float64(t_m / l) <= 1e+118)
		tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m)))))));
	else
		tmp = asin(Float64(sqrt(t_1) * 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) ^ 2.0);
	tmp = 0.0;
	if ((t_m / l) <= -1e+170)
		tmp = abs(asin((l / (t_m / sqrt(0.5)))));
	elseif ((t_m / l) <= 1e+118)
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	else
		tmp = asin((sqrt(t_1) * (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[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l), $MachinePrecision], -1e+170], N[Abs[N[ArcSin[N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 1e+118], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[t$95$1], $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 - {\left(\frac{Om}{Omc}\right)}^{2}\\
\mathbf{if}\;\frac{t_m}{\ell} \leq -1 \cdot 10^{+170}:\\
\;\;\;\;\left|\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\right|\\

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

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \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) < -1.00000000000000003e170

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

        \[\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. associate-*l*59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000003e170 < (/.f64 t l) < 9.99999999999999967e117

    1. Initial program 97.7%

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

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

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

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

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

    if 9.99999999999999967e117 < (/.f64 t l)

    1. Initial program 54.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. sqrt-div54.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-inv54.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-sqrt54.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-def54.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. *-commutative54.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-prod54.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. unpow254.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-prod99.2%

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

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

      \[\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/99.6%

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

        \[\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) \]
    5. Simplified99.6%

      \[\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)} \]
    6. Taylor expanded in t around inf 81.9%

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

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

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

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

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

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

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

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

Alternative 2: 98.4% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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/98.5%

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

      \[\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) \]
  5. Simplified98.5%

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

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

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

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

    \[\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) \]
  8. Step-by-step derivation
    1. expm1-log1p-u98.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right)} \]
    2. sub-neg98.5%

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

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

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

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

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

      \[\leadsto \mathsf{expm1}\left(\mathsf{log1p}\left(\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)\right)\right) \]
  9. Applied egg-rr98.5%

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

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

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

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

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

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

Alternative 3: 98.9% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\ \mathbf{if}\;{\left(\frac{t_m}{\ell}\right)}^{2} \leq 2 \cdot 10^{+302}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{\frac{t_m}{\ell}}{\frac{\ell}{t_m}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\sin^{-1} \left(\ell \cdot \frac{\sqrt{t_1 \cdot 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 (pow (/ Om Omc) 2.0))))
   (if (<= (pow (/ t_m l) 2.0) 2e+302)
     (asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m)))))))
     (fabs (asin (* l (/ (sqrt (* t_1 0.5)) t_m)))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - pow((Om / Omc), 2.0);
	double tmp;
	if (pow((t_m / l), 2.0) <= 2e+302) {
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	} else {
		tmp = fabs(asin((l * (sqrt((t_1 * 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) ** 2.0d0)
    if (((t_m / l) ** 2.0d0) <= 2d+302) then
        tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) / (l / t_m)))))))
    else
        tmp = abs(asin((l * (sqrt((t_1 * 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 - Math.pow((Om / Omc), 2.0);
	double tmp;
	if (Math.pow((t_m / l), 2.0) <= 2e+302) {
		tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	} else {
		tmp = Math.abs(Math.asin((l * (Math.sqrt((t_1 * 0.5)) / t_m))));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	t_1 = 1.0 - math.pow((Om / Omc), 2.0)
	tmp = 0
	if math.pow((t_m / l), 2.0) <= 2e+302:
		tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))))
	else:
		tmp = math.fabs(math.asin((l * (math.sqrt((t_1 * 0.5)) / t_m))))
	return tmp
t_m = abs(t)
function code(t_m, l, Om, Omc)
	t_1 = Float64(1.0 - (Float64(Om / Omc) ^ 2.0))
	tmp = 0.0
	if ((Float64(t_m / l) ^ 2.0) <= 2e+302)
		tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m)))))));
	else
		tmp = abs(asin(Float64(l * Float64(sqrt(Float64(t_1 * 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) ^ 2.0);
	tmp = 0.0;
	if (((t_m / l) ^ 2.0) <= 2e+302)
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	else
		tmp = abs(asin((l * (sqrt((t_1 * 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[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[N[(t$95$m / l), $MachinePrecision], 2.0], $MachinePrecision], 2e+302], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Abs[N[ArcSin[N[(l * N[(N[Sqrt[N[(t$95$1 * 0.5), $MachinePrecision]], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|

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

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


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

    1. Initial program 98.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. unpow298.3%

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

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

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

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

    if 2.0000000000000002e302 < (pow.f64 (/.f64 t l) 2)

    1. Initial program 56.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. unpow256.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) \]
      2. frac-2neg56.0%

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

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

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

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

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

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

        \[\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. associate-*l*66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.4% 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, \sqrt{2} \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))))
   (hypot 1.0 (* (sqrt 2.0) (/ 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)))) / hypot(1.0, (sqrt(2.0) * (t_m / l)))));
}
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, (Math.sqrt(2.0) * (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)))) / math.hypot(1.0, (math.sqrt(2.0) * (t_m / l)))))
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(sqrt(2.0) * 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)))) / hypot(1.0, (sqrt(2.0) * (t_m / l)))));
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[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / l), $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, \sqrt{2} \cdot \frac{t_m}{\ell}\right)}\right)
\end{array}
Derivation
  1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

    \[\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/98.5%

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

      \[\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) \]
  5. Simplified98.5%

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

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

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

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

    \[\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) \]
  8. Final simplification98.5%

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

Alternative 5: 97.9% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} \mathbf{if}\;\frac{t_m}{\ell} \leq -1 \cdot 10^{+170}:\\ \;\;\;\;\left|\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\right|\\ \mathbf{elif}\;\frac{t_m}{\ell} \leq 2 \cdot 10^{+128}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t_m}{\ell} \cdot \frac{t_m}{\ell}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}} \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
 (if (<= (/ t_m l) -1e+170)
   (fabs (asin (/ l (/ t_m (sqrt 0.5)))))
   (if (<= (/ t_m l) 2e+128)
     (asin
      (sqrt
       (/
        (- 1.0 (pow (/ Om Omc) 2.0))
        (+ 1.0 (* 2.0 (* (/ t_m l) (/ t_m l)))))))
     (asin
      (* l (* (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))) (/ (sqrt 0.5) t_m)))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	double tmp;
	if ((t_m / l) <= -1e+170) {
		tmp = fabs(asin((l / (t_m / sqrt(0.5)))));
	} else if ((t_m / l) <= 2e+128) {
		tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	} else {
		tmp = asin((l * (sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (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) :: tmp
    if ((t_m / l) <= (-1d+170)) then
        tmp = abs(asin((l / (t_m / sqrt(0.5d0)))))
    else if ((t_m / l) <= 2d+128) then
        tmp = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t_m / l) * (t_m / l)))))))
    else
        tmp = asin((l * (sqrt((1.0d0 - ((om / omc) / (omc / om)))) * (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 tmp;
	if ((t_m / l) <= -1e+170) {
		tmp = Math.abs(Math.asin((l / (t_m / Math.sqrt(0.5)))));
	} else if ((t_m / l) <= 2e+128) {
		tmp = Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	} else {
		tmp = Math.asin((l * (Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (Math.sqrt(0.5) / t_m))));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	tmp = 0
	if (t_m / l) <= -1e+170:
		tmp = math.fabs(math.asin((l / (t_m / math.sqrt(0.5)))))
	elif (t_m / l) <= 2e+128:
		tmp = math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))))
	else:
		tmp = math.asin((l * (math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (math.sqrt(0.5) / t_m))))
	return tmp
t_m = abs(t)
function code(t_m, l, Om, Omc)
	tmp = 0.0
	if (Float64(t_m / l) <= -1e+170)
		tmp = abs(asin(Float64(l / Float64(t_m / sqrt(0.5)))));
	elseif (Float64(t_m / l) <= 2e+128)
		tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) * Float64(t_m / l)))))));
	else
		tmp = asin(Float64(l * Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) * Float64(sqrt(0.5) / t_m))));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(t_m, l, Om, Omc)
	tmp = 0.0;
	if ((t_m / l) <= -1e+170)
		tmp = abs(asin((l / (t_m / sqrt(0.5)))));
	elseif ((t_m / l) <= 2e+128)
		tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
	else
		tmp = asin((l * (sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (sqrt(0.5) / t_m))));
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l), $MachinePrecision], -1e+170], N[Abs[N[ArcSin[N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 2e+128], 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[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|

\\
\begin{array}{l}
\mathbf{if}\;\frac{t_m}{\ell} \leq -1 \cdot 10^{+170}:\\
\;\;\;\;\left|\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\right|\\

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

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}} \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) < -1.00000000000000003e170

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

        \[\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. associate-*l*59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000003e170 < (/.f64 t l) < 2.0000000000000002e128

    1. Initial program 97.7%

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

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

      \[\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) \]

    if 2.0000000000000002e128 < (/.f64 t l)

    1. Initial program 52.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. unpow252.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) \]
      2. frac-2neg52.0%

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

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

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

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

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

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

        \[\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. associate-*l*80.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.0% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\ \mathbf{if}\;\frac{t_m}{\ell} \leq -1 \cdot 10^{+170}:\\ \;\;\;\;\left|\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\right|\\ \mathbf{elif}\;\frac{t_m}{\ell} \leq 2 \cdot 10^{+139}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{\frac{t_m}{\ell}}{\frac{\ell}{t_m}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{t_1 \cdot 0.5}}{t_m}\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
 :precision binary64
 (let* ((t_1 (- 1.0 (pow (/ Om Omc) 2.0))))
   (if (<= (/ t_m l) -1e+170)
     (fabs (asin (/ l (/ t_m (sqrt 0.5)))))
     (if (<= (/ t_m l) 2e+139)
       (asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m)))))))
       (asin (* l (/ (sqrt (* t_1 0.5)) t_m)))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	double t_1 = 1.0 - pow((Om / Omc), 2.0);
	double tmp;
	if ((t_m / l) <= -1e+170) {
		tmp = fabs(asin((l / (t_m / sqrt(0.5)))));
	} else if ((t_m / l) <= 2e+139) {
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	} else {
		tmp = asin((l * (sqrt((t_1 * 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) ** 2.0d0)
    if ((t_m / l) <= (-1d+170)) then
        tmp = abs(asin((l / (t_m / sqrt(0.5d0)))))
    else if ((t_m / l) <= 2d+139) then
        tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) / (l / t_m)))))))
    else
        tmp = asin((l * (sqrt((t_1 * 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 - Math.pow((Om / Omc), 2.0);
	double tmp;
	if ((t_m / l) <= -1e+170) {
		tmp = Math.abs(Math.asin((l / (t_m / Math.sqrt(0.5)))));
	} else if ((t_m / l) <= 2e+139) {
		tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	} else {
		tmp = Math.asin((l * (Math.sqrt((t_1 * 0.5)) / t_m)));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	t_1 = 1.0 - math.pow((Om / Omc), 2.0)
	tmp = 0
	if (t_m / l) <= -1e+170:
		tmp = math.fabs(math.asin((l / (t_m / math.sqrt(0.5)))))
	elif (t_m / l) <= 2e+139:
		tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))))
	else:
		tmp = math.asin((l * (math.sqrt((t_1 * 0.5)) / t_m)))
	return tmp
t_m = abs(t)
function code(t_m, l, Om, Omc)
	t_1 = Float64(1.0 - (Float64(Om / Omc) ^ 2.0))
	tmp = 0.0
	if (Float64(t_m / l) <= -1e+170)
		tmp = abs(asin(Float64(l / Float64(t_m / sqrt(0.5)))));
	elseif (Float64(t_m / l) <= 2e+139)
		tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m)))))));
	else
		tmp = asin(Float64(l * Float64(sqrt(Float64(t_1 * 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) ^ 2.0);
	tmp = 0.0;
	if ((t_m / l) <= -1e+170)
		tmp = abs(asin((l / (t_m / sqrt(0.5)))));
	elseif ((t_m / l) <= 2e+139)
		tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
	else
		tmp = asin((l * (sqrt((t_1 * 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[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l), $MachinePrecision], -1e+170], N[Abs[N[ArcSin[N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 2e+139], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[N[(t$95$1 * 0.5), $MachinePrecision]], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|

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

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

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


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

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

        \[\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. associate-*l*59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000003e170 < (/.f64 t l) < 2.00000000000000007e139

    1. Initial program 97.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. unpow297.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) \]
      2. clear-num97.7%

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

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

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

    if 2.00000000000000007e139 < (/.f64 t l)

    1. Initial program 49.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. unpow249.3%

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

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

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

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

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

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

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

        \[\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. associate-*l*79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 84.1% 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 \frac{1}{\frac{\ell}{t_m} \cdot \frac{\ell}{t_m}}}}\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 (/ 1.0 (* (/ l t_m) (/ l t_m)))))))))
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 * (1.0 / ((l / t_m) * (l / t_m))))))));
}
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 * (1.0d0 / ((l / t_m) * (l / t_m))))))))
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 * (1.0 / ((l / t_m) * (l / t_m))))))));
}
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 * (1.0 / ((l / t_m) * (l / t_m))))))))
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(1.0 / Float64(Float64(l / t_m) * Float64(l / t_m))))))))
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 * (1.0 / ((l / t_m) * (l / t_m))))))));
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[(1.0 / N[(N[(l / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $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 \frac{1}{\frac{\ell}{t_m} \cdot \frac{\ell}{t_m}}}}\right)
\end{array}
Derivation
  1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{\frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}}\right) \]
  5. Applied egg-rr86.7%

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

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

Alternative 8: 64.2% accurate, 1.9× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \begin{array}{l} \mathbf{if}\;\ell \leq -1.2 \cdot 10^{-101} \lor \neg \left(\ell \leq 6.5 \cdot 10^{+72}\right):\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell}{t_m \cdot {0.5}^{-0.5}}\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
 :precision binary64
 (if (or (<= l -1.2e-101) (not (<= l 6.5e+72)))
   (asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
   (asin (/ l (* t_m (pow 0.5 -0.5))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	double tmp;
	if ((l <= -1.2e-101) || !(l <= 6.5e+72)) {
		tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
	} else {
		tmp = asin((l / (t_m * pow(0.5, -0.5))));
	}
	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) :: tmp
    if ((l <= (-1.2d-101)) .or. (.not. (l <= 6.5d+72))) then
        tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
    else
        tmp = asin((l / (t_m * (0.5d0 ** (-0.5d0)))))
    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 tmp;
	if ((l <= -1.2e-101) || !(l <= 6.5e+72)) {
		tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
	} else {
		tmp = Math.asin((l / (t_m * Math.pow(0.5, -0.5))));
	}
	return tmp;
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	tmp = 0
	if (l <= -1.2e-101) or not (l <= 6.5e+72):
		tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))))
	else:
		tmp = math.asin((l / (t_m * math.pow(0.5, -0.5))))
	return tmp
t_m = abs(t)
function code(t_m, l, Om, Omc)
	tmp = 0.0
	if ((l <= -1.2e-101) || !(l <= 6.5e+72))
		tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))));
	else
		tmp = asin(Float64(l / Float64(t_m * (0.5 ^ -0.5))));
	end
	return tmp
end
t_m = abs(t);
function tmp_2 = code(t_m, l, Om, Omc)
	tmp = 0.0;
	if ((l <= -1.2e-101) || ~((l <= 6.5e+72)))
		tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
	else
		tmp = asin((l / (t_m * (0.5 ^ -0.5))));
	end
	tmp_2 = tmp;
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := If[Or[LessEqual[l, -1.2e-101], N[Not[LessEqual[l, 6.5e+72]], $MachinePrecision]], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t$95$m * N[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.2 \cdot 10^{-101} \lor \neg \left(\ell \leq 6.5 \cdot 10^{+72}\right):\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -1.2e-101 or 6.5000000000000001e72 < l

    1. Initial program 93.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 65.2%

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{Om}{Omc} \cdot \color{blue}{\frac{1}{\frac{Omc}{Om}}}}\right) \]
      3. un-div-inv72.6%

        \[\leadsto \sin^{-1} \left(\sqrt{1 - \color{blue}{\frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}}\right) \]
    6. Applied egg-rr72.6%

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

    if -1.2e-101 < l < 6.5000000000000001e72

    1. Initial program 79.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. unpow279.2%

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

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

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

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

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

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

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

        \[\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. associate-*l*49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.2 \cdot 10^{-101} \lor \neg \left(\ell \leq 6.5 \cdot 10^{+72}\right):\\ \;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell}{t \cdot {0.5}^{-0.5}}\right)\\ \end{array} \]

Alternative 9: 31.3% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ \sin^{-1} \left(\frac{\ell}{t_m \cdot {0.5}^{-0.5}}\right) \end{array} \]
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc) :precision binary64 (asin (/ l (* t_m (pow 0.5 -0.5)))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
	return asin((l / (t_m * pow(0.5, -0.5))));
}
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((l / (t_m * (0.5d0 ** (-0.5d0)))))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
	return Math.asin((l / (t_m * Math.pow(0.5, -0.5))));
}
t_m = math.fabs(t)
def code(t_m, l, Om, Omc):
	return math.asin((l / (t_m * math.pow(0.5, -0.5))))
t_m = abs(t)
function code(t_m, l, Om, Omc)
	return asin(Float64(l / Float64(t_m * (0.5 ^ -0.5))))
end
t_m = abs(t);
function tmp = code(t_m, l, Om, Omc)
	tmp = asin((l / (t_m * (0.5 ^ -0.5))));
end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[(l / N[(t$95$m * N[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|

\\
\sin^{-1} \left(\frac{\ell}{t_m \cdot {0.5}^{-0.5}}\right)
\end{array}
Derivation
  1. Initial program 86.7%

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

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

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

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

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

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

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

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

      \[\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. associate-*l*28.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 31.3% accurate, 2.0× speedup?

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

\\
\sin^{-1} \left(\frac{\ell}{t_m} \cdot \sqrt{0.5}\right)
\end{array}
Derivation
  1. Initial program 86.7%

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

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

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

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

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

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

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

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

      \[\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. associate-*l*28.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 31.3% accurate, 2.0× speedup?

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

\\
\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t_m}\right)
\end{array}
Derivation
  1. Initial program 86.7%

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

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

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

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

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

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

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

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

      \[\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. associate-*l*28.6%

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

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

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

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

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

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

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

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

Reproduce

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