Toniolo and Linder, Equation (2)

Percentage Accurate: 83.8% → 98.1%
Time: 14.0s
Alternatives: 10
Speedup: 1.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 83.8% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999952e73 < (/.f64 t l) < 2e53

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
    3. Applied egg-rr98.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)} \]
    4. Step-by-step derivation
      1. unpow298.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e53 < (/.f64 t l)

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.4% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.4% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 97.9% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000007e121 < (/.f64 t l) < 2e53

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e53 < (/.f64 t l)

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 96.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\sqrt{0.5}}{t}\\
\mathbf{if}\;\frac{t}{\ell} \leq -10000000:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \left(-\ell\right)\right)\\

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

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


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

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e7 < (/.f64 t l) < 1.9999999999999999e-7

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
    3. Applied egg-rr98.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)} \]
    4. Step-by-step derivation
      1. unpow298.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-7 < (/.f64 t l)

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.3% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000004e208 < (/.f64 t l) < 1.9999999999999999e-7

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
    3. Applied egg-rr98.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)} \]
    4. Step-by-step derivation
      1. unpow298.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-7 < (/.f64 t l)

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 96.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\sqrt{0.5}}{t}\\
\mathbf{if}\;\frac{t}{\ell} \leq -10000000:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \left(-\ell\right)\right)\\

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

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


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

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e7 < (/.f64 t l) < 1.9999999999999999e-7

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
    3. Applied egg-rr98.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)} \]
    4. Step-by-step derivation
      1. unpow298.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-7 < (/.f64 t l)

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 63.4% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+107} \lor \neg \left(t \leq 7.5 \cdot 10^{+56}\right):\\ \;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} 1\\ \end{array} \end{array} \]
(FPCore (t l Om Omc)
 :precision binary64
 (if (or (<= t -3.7e+107) (not (<= t 7.5e+56)))
   (asin (* (/ l t) (sqrt 0.5)))
   (asin 1.0)))
double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t <= -3.7e+107) || !(t <= 7.5e+56)) {
		tmp = asin(((l / t) * sqrt(0.5)));
	} else {
		tmp = asin(1.0);
	}
	return tmp;
}
real(8) function code(t, l, om, omc)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: omc
    real(8) :: tmp
    if ((t <= (-3.7d+107)) .or. (.not. (t <= 7.5d+56))) then
        tmp = asin(((l / t) * sqrt(0.5d0)))
    else
        tmp = asin(1.0d0)
    end if
    code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
	double tmp;
	if ((t <= -3.7e+107) || !(t <= 7.5e+56)) {
		tmp = Math.asin(((l / t) * Math.sqrt(0.5)));
	} else {
		tmp = Math.asin(1.0);
	}
	return tmp;
}
def code(t, l, Om, Omc):
	tmp = 0
	if (t <= -3.7e+107) or not (t <= 7.5e+56):
		tmp = math.asin(((l / t) * math.sqrt(0.5)))
	else:
		tmp = math.asin(1.0)
	return tmp
function code(t, l, Om, Omc)
	tmp = 0.0
	if ((t <= -3.7e+107) || !(t <= 7.5e+56))
		tmp = asin(Float64(Float64(l / t) * sqrt(0.5)));
	else
		tmp = asin(1.0);
	end
	return tmp
end
function tmp_2 = code(t, l, Om, Omc)
	tmp = 0.0;
	if ((t <= -3.7e+107) || ~((t <= 7.5e+56)))
		tmp = asin(((l / t) * sqrt(0.5)));
	else
		tmp = asin(1.0);
	end
	tmp_2 = tmp;
end
code[t_, l_, Om_, Omc_] := If[Or[LessEqual[t, -3.7e+107], N[Not[LessEqual[t, 7.5e+56]], $MachinePrecision]], N[ArcSin[N[(N[(l / t), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+107} \lor \neg \left(t \leq 7.5 \cdot 10^{+56}\right):\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t} \cdot \sqrt{0.5}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.7e107 or 7.4999999999999999e56 < t

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7e107 < t < 7.4999999999999999e56

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.8%

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

Alternative 9: 63.4% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+57}:\\
\;\;\;\;\sin^{-1} 1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.7999999999999998e106

    1. Initial program 75.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. sqrt-div75.7%

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \color{blue}{\frac{t}{\ell}} \cdot \sqrt{2}\right)}\right) \]
    3. Applied egg-rr96.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)} \]
    4. Step-by-step derivation
      1. unpow296.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e106 < t < 2.05e57

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.05e57 < t

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 50.1% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \sin^{-1} 1 \end{array} \]
(FPCore (t l Om Omc) :precision binary64 (asin 1.0))
double code(double t, double l, double Om, double Omc) {
	return asin(1.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(1.0d0)
end function
public static double code(double t, double l, double Om, double Omc) {
	return Math.asin(1.0);
}
def code(t, l, Om, Omc):
	return math.asin(1.0)
function code(t, l, Om, Omc)
	return asin(1.0)
end
function tmp = code(t, l, Om, Omc)
	tmp = asin(1.0);
end
code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}

\\
\sin^{-1} 1
\end{array}
Derivation
  1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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