Toniolo and Linder, Equation (2)

Percentage Accurate: 83.6% → 97.8%
Time: 16.4s
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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 1.8× speedup?

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

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

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

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


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

    1. Initial program 59.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified97.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)} \]
    6. Taylor expanded in Om around 0 97.7%

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

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

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

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

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

    if -4.99999999999999977e170 < (/.f64 t l) < 2e147

    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. unpow298.5%

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

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

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

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

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

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

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

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

    if 2e147 < (/.f64 t l)

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.4% accurate, 0.8× speedup?

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

\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t_m}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Derivation
  1. Initial program 84.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-div84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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.5% accurate, 1.3× speedup?

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

\\
\sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \frac{t_m}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Derivation
  1. Initial program 84.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-div84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 97.2% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{t_m}{\ell} \leq -20:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t_m \cdot \sqrt{2}}\right)\\

\mathbf{elif}\;\frac{t_m}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\

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


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

    1. Initial program 76.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-div76.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. div-inv76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -20 < (/.f64 t l) < 0.050000000000000003

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

    if 0.050000000000000003 < (/.f64 t l)

    1. Initial program 55.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-div55.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified96.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)} \]
    6. Taylor expanded in Om around 0 96.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{t_m}{\ell} \leq -20:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t_m}}{\sqrt{2}}\right)\\

\mathbf{elif}\;\frac{t_m}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t_m}{\ell}\right)}^{2}\right)\\

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


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

    1. Initial program 76.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-div76.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. div-inv76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -20 < (/.f64 t l) < 0.050000000000000003

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.050000000000000003 < (/.f64 t l)

    1. Initial program 55.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-div55.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified96.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)} \]
    6. Taylor expanded in Om around 0 96.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 97.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{t_m}{\ell} \leq -20:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t_m \cdot \sqrt{2}}\right)\\

\mathbf{elif}\;\frac{t_m}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t_m}{\ell}\right)}^{2}\right)\\

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


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

    1. Initial program 76.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-div76.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. div-inv76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -20 < (/.f64 t l) < 0.050000000000000003

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.050000000000000003 < (/.f64 t l)

    1. Initial program 55.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-div55.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified96.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)} \]
    6. Taylor expanded in Om around 0 96.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 71.4% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.86 \cdot 10^{-132}:\\
\;\;\;\;\sin^{-1} 1\\

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

\mathbf{elif}\;\ell \leq 1250000:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{{2}^{-0.5}}{t_m}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -1.85999999999999986e-132 or 1.25e6 < l

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

    if -1.85999999999999986e-132 < l < -7.8000000000000002e-301

    1. Initial program 76.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-div75.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. div-inv75.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified96.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)} \]
    6. Taylor expanded in Om around 0 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000002e-301 < l < 1.25e6

    1. Initial program 71.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. sqrt-div71.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. div-inv71.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified97.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)} \]
    6. Taylor expanded in Om around 0 95.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 71.4% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.45 \cdot 10^{-131}:\\
\;\;\;\;\sin^{-1} 1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -2.4500000000000001e-131 or 2.5e7 < l

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

    if -2.4500000000000001e-131 < l < -7.8000000000000002e-301

    1. Initial program 76.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-div75.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. div-inv75.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified96.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)} \]
    6. Taylor expanded in Om around 0 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000002e-301 < l < 2.5e7

    1. Initial program 71.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Step-by-step derivation
      1. sqrt-div71.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. div-inv71.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified97.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)} \]
    6. Taylor expanded in Om around 0 95.5%

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

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

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

Alternative 9: 64.4% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1 \cdot 10^{-213}:\\
\;\;\;\;\sin^{-1} 1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -9.9999999999999995e-214 or 7e6 < l

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

    if -9.9999999999999995e-214 < l < 7e6

    1. Initial program 74.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-div74.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right) \]
    5. Simplified97.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)} \]
    6. Taylor expanded in Om around 0 96.5%

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

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

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

Alternative 10: 50.9% accurate, 4.1× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \sin^{-1} \color{blue}{1} \]
  6. Final simplification58.1%

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

Reproduce

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