Toniolo and Linder, Equation (2)

Percentage Accurate: 83.3% → 98.8%
Time: 21.6s
Alternatives: 10
Speedup: 1.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 98.8% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e129 < (/.f64 t l) < 1.99999999999999987e146

    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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow298.2%

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}}\right) \]
    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{1}{\frac{\ell}{t} \cdot \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{1}{\frac{\ell}{t} \cdot \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{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}\right) \]
    6. Applied egg-rr98.2%

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

    if 1.99999999999999987e146 < (/.f64 t l)

    1. Initial program 41.0%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div41.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-inv41.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-sqrt41.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-def41.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. *-commutative41.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-prod41.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. unpow241.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-prod95.0%

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

        \[\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) \]
    4. Applied egg-rr95.2%

      \[\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)} \]
    5. Step-by-step derivation
      1. associate-*r/95.3%

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

        \[\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) \]
    6. Simplified95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.8% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 54.6%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div54.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-inv54.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-sqrt54.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-def54.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. *-commutative54.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-prod54.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. unpow254.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-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-sqrt96.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) \]
    4. Applied egg-rr96.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)} \]
    5. Step-by-step derivation
      1. associate-*r/96.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-identity96.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) \]
    6. Simplified96.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)} \]
    7. Taylor expanded in t around -inf 93.9%

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

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

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

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

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

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

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

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

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

    if -1.99999999999999984e134 < (/.f64 t l) < 1.99999999999999987e146

    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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow298.2%

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}}\right) \]
    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{1}{\frac{\ell}{t} \cdot \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{1}{\frac{\ell}{t} \cdot \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{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}\right) \]
    6. Applied egg-rr98.2%

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

    if 1.99999999999999987e146 < (/.f64 t l)

    1. Initial program 41.0%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div41.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-inv41.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-sqrt41.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-def41.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. *-commutative41.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-prod41.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. unpow241.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-prod95.0%

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

        \[\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) \]
    4. Applied egg-rr95.2%

      \[\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)} \]
    5. Step-by-step derivation
      1. associate-*r/95.3%

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

        \[\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) \]
    6. Simplified95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 98.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\left(\frac{t}{\ell}\right)}^{2} \cdot 2}}\right)}\right) \]
    6. sqrt-prod85.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. unpow285.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-prod55.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.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) \]
  4. Applied egg-rr97.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)} \]
  5. Step-by-step derivation
    1. associate-*r/97.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-identity97.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) \]
  6. Simplified97.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)} \]
  7. Taylor expanded in t around 0 97.6%

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

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

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

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

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

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

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

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

Alternative 4: 98.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\left(\frac{t}{\ell}\right)}^{2} \cdot 2}}\right)}\right) \]
    6. sqrt-prod85.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. unpow285.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-prod55.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.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) \]
  4. Applied egg-rr97.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)} \]
  5. Step-by-step derivation
    1. associate-*r/97.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-identity97.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) \]
  6. Simplified97.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)} \]
  7. Step-by-step derivation
    1. unpow285.3%

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

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

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

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

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

Alternative 5: 98.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
t_2 := \sqrt{t\_1}\\
\mathbf{if}\;\frac{t\_m}{\ell} \leq -2 \cdot 10^{+134}:\\
\;\;\;\;\sin^{-1} \left(\frac{t\_2}{\frac{-t\_m}{\frac{\ell}{\sqrt{2}}}}\right)\\

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

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


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

    1. Initial program 54.6%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div54.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-inv54.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-sqrt54.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-def54.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. *-commutative54.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-prod54.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. unpow254.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-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-sqrt96.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) \]
    4. Applied egg-rr96.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)} \]
    5. Step-by-step derivation
      1. associate-*r/96.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-identity96.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) \]
    6. Simplified96.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)} \]
    7. Step-by-step derivation
      1. unpow254.6%

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

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

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

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

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

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

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

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

    if -1.99999999999999984e134 < (/.f64 t l) < 1.99999999999999987e146

    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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow298.2%

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}}\right) \]
    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{1}{\frac{\ell}{t} \cdot \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{1}{\frac{\ell}{t} \cdot \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{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}\right) \]
    6. Applied egg-rr98.2%

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

    if 1.99999999999999987e146 < (/.f64 t l)

    1. Initial program 41.0%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div41.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-inv41.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-sqrt41.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-def41.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. *-commutative41.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-prod41.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. unpow241.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-prod95.0%

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

        \[\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) \]
    4. Applied egg-rr95.2%

      \[\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)} \]
    5. Step-by-step derivation
      1. associate-*r/95.3%

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

        \[\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) \]
    6. Simplified95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
t_2 := \sqrt{t\_1}\\
\mathbf{if}\;\frac{t\_m}{\ell} \leq -2 \cdot 10^{+134}:\\
\;\;\;\;\sin^{-1} \left(\frac{t\_2}{\sqrt{2} \cdot \frac{-t\_m}{\ell}}\right)\\

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

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


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

    1. Initial program 54.6%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div54.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-inv54.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-sqrt54.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-def54.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. *-commutative54.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-prod54.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. unpow254.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-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-sqrt96.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) \]
    4. Applied egg-rr96.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)} \]
    5. Step-by-step derivation
      1. associate-*r/96.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-identity96.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) \]
    6. Simplified96.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)} \]
    7. Step-by-step derivation
      1. unpow254.6%

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

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

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

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

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

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

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

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

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

    if -1.99999999999999984e134 < (/.f64 t l) < 1.99999999999999987e146

    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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow298.2%

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \color{blue}{\frac{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}}\right) \]
    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{1}{\frac{\ell}{t} \cdot \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{1}{\frac{\ell}{t} \cdot \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{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}\right) \]
    6. Applied egg-rr98.2%

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

    if 1.99999999999999987e146 < (/.f64 t l)

    1. Initial program 41.0%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div41.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-inv41.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-sqrt41.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-def41.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. *-commutative41.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-prod41.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. unpow241.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-prod95.0%

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

        \[\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) \]
    4. Applied egg-rr95.2%

      \[\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)} \]
    5. Step-by-step derivation
      1. associate-*r/95.3%

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

        \[\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) \]
    6. Simplified95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 90.9% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 91.5%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. unpow291.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-num91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e152 < (/.f64 t l)

    1. Initial program 39.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 90.9% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e143 < (/.f64 t l)

    1. Initial program 42.8%

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

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

        \[\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-sqrt42.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-def42.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. *-commutative42.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-prod42.8%

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

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

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

      \[\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)} \]
    5. Step-by-step derivation
      1. associate-*r/95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 83.3% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 50.9% accurate, 2.0× speedup?

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

\\
\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)
\end{array}
Derivation
  1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right) \]
  9. Add Preprocessing

Reproduce

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