Toniolo and Linder, Equation (2)

Percentage Accurate: 83.6% → 98.3%
Time: 14.3s
Alternatives: 13
Speedup: 1.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 83.6% accurate, 1.0× speedup?

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

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

Alternative 1: 98.3% accurate, 0.8× speedup?

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{1}{\mathsf{hypot}\left(1, \sqrt{\color{blue}{{\left(\frac{t}{\ell}\right)}^{2} \cdot 2}}\right)}\right) \]
    6. sqrt-prod82.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. unpow282.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-prod51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.4% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.1% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e4 < (/.f64 t l) < 1.99999999999999991e-6

    1. Initial program 97.6%

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

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

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

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

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

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

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

    if 1.99999999999999991e-6 < (/.f64 t l)

    1. Initial program 65.1%

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

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

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

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

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

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

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

Alternative 4: 97.4% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.9% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}}\right) \]
    6. Applied egg-rr65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999995e32 < (/.f64 t l) < 1e10

    1. Initial program 97.5%

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

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

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

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

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

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

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

    if 1e10 < (/.f64 t l)

    1. Initial program 64.1%

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

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

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

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

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

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

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

Alternative 6: 61.5% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq -30000000000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;\ell \leq -2.5 \cdot 10^{-146}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -8.49999999999999971e39 or -3e13 < l < -2.49999999999999979e-146 or 7.0000000000000002e43 < l

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}}\right) \]
    6. Applied egg-rr91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{1 + \frac{\color{blue}{1} \cdot {t}^{2}}{{\ell}^{2}}}\right) \]
      7. *-lft-identity74.4%

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

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

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

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

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

    if -8.49999999999999971e39 < l < -3e13 or -2.49999999999999979e-146 < l < -9.999999999999969e-311

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)} \]
    7. Step-by-step derivation
      1. fma-udef71.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < l < 7.0000000000000002e43

    1. Initial program 66.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -8.5 \cdot 10^{+39}:\\ \;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\ \mathbf{elif}\;\ell \leq -30000000000000:\\ \;\;\;\;\sin^{-1} \left(\frac{-\ell}{t \cdot \sqrt{2}}\right)\\ \mathbf{elif}\;\ell \leq -2.5 \cdot 10^{-146}:\\ \;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\sin^{-1} \left(\frac{-\ell}{t \cdot \sqrt{2}}\right)\\ \mathbf{elif}\;\ell \leq 7 \cdot 10^{+43}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\ \end{array} \]

Alternative 7: 61.3% accurate, 1.9× speedup?

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

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

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

\mathbf{elif}\;\ell \leq -1.02 \cdot 10^{-146}:\\
\;\;\;\;t_1\\

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -9.50000000000000011e39 or -1.15e9 < l < -1.0199999999999999e-146 or 9.5000000000000004e44 < l

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}}\right) \]
    6. Applied egg-rr91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{1 + \frac{\color{blue}{1} \cdot {t}^{2}}{{\ell}^{2}}}\right) \]
      7. *-lft-identity74.4%

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

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

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

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

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

    if -9.50000000000000011e39 < l < -1.15e9

    1. Initial program 46.6%

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

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

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

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

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

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

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

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

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

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

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

    if -1.0199999999999999e-146 < l < -9.999999999999969e-311

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)} \]
    7. Step-by-step derivation
      1. fma-udef77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < l < 9.5000000000000004e44

    1. Initial program 66.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -9.5 \cdot 10^{+39}:\\ \;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\ \mathbf{elif}\;\ell \leq -1150000000:\\ \;\;\;\;\sin^{-1} \left(\frac{-\ell}{t} \cdot \sqrt{0.5}\right)\\ \mathbf{elif}\;\ell \leq -1.02 \cdot 10^{-146}:\\ \;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\sin^{-1} \left(\frac{-\ell}{t \cdot \sqrt{2}}\right)\\ \mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+44}:\\ \;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\ \end{array} \]

Alternative 8: 96.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e4 < (/.f64 t l) < 1.99999999999999991e-6

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e-6 < (/.f64 t l)

    1. Initial program 65.1%

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

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

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

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

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

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

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

Alternative 9: 96.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e4 < (/.f64 t l) < 1.99999999999999991e-6

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e-6 < (/.f64 t l)

    1. Initial program 65.1%

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

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

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

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

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

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

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

Alternative 10: 59.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1 \cdot 10^{-310} \lor \neg \left(\ell \leq 1.65 \cdot 10^{+46}\right):\\
\;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -9.999999999999969e-311 or 1.6499999999999999e46 < l

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}}\right) \]
    6. Applied egg-rr87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{1 + \frac{\color{blue}{1} \cdot {t}^{2}}{{\ell}^{2}}}\right) \]
      7. *-lft-identity66.4%

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

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

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

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

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

    if -9.999999999999969e-311 < l < 1.6499999999999999e46

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 59.8% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1 \cdot 10^{-310} \lor \neg \left(\ell \leq 4.8 \cdot 10^{+43}\right):\\
\;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -9.999999999999969e-311 or 4.80000000000000046e43 < l

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}}\right) \]
    6. Applied egg-rr87.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{1 + \frac{\color{blue}{1} \cdot {t}^{2}}{{\ell}^{2}}}\right) \]
      7. *-lft-identity66.4%

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

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

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

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

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

    if -9.999999999999969e-311 < l < 4.80000000000000046e43

    1. Initial program 66.9%

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

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

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

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

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

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

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

Alternative 12: 56.4% accurate, 3.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{-153}:\\
\;\;\;\;\sin^{-1} 1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.29999999999999988e-153

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\sqrt{\color{blue}{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}}\right) \]
    6. Applied egg-rr84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.29999999999999988e-153 < t

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.3 \cdot 10^{-153}:\\ \;\;\;\;\sin^{-1} 1\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{1}{1 + t \cdot \frac{t}{\ell \cdot \ell}}\right)\\ \end{array} \]

Alternative 13: 50.1% accurate, 4.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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