Toniolo and Linder, Equation (2)

Percentage Accurate: 83.8% → 98.4%
Time: 26.0s
Alternatives: 10
Speedup: 1.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 83.8% accurate, 1.0× speedup?

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

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

Alternative 1: 98.4% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 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 83.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 66.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. unpow266.2%

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

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
  4. Simplified66.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. expm1-log1p-u66.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
    2. expm1-log1p82.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+73}:\\
\;\;\;\;\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}{t \cdot \sqrt{2}}\right)\\


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

    1. Initial program 51.2%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Taylor expanded in Om around 0 47.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. unpow247.8%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified47.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. expm1-log1p-u47.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p51.3%

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}}\right) \]
      11. *-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 -inf 99.7%

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

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

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

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

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

    if -5.00000000000000018e153 < (/.f64 t l) < 1.99999999999999997e73

    1. Initial program 98.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Taylor expanded in Om around 0 77.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. unpow277.4%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified77.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. times-frac97.4%

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

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

    if 1.99999999999999997e73 < (/.f64 t l)

    1. Initial program 54.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 40.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. unpow240.9%

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

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

      \[\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. expm1-log1p-u40.9%

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(e^{\mathsf{log1p}\left(\frac{1}{\sqrt{2 \cdot \color{blue}{{\left(\frac{t}{\ell}\right)}^{2}} + 1}}\right)} - 1\right) \]
      8. fma-udef28.9%

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p54.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{2} \cdot \frac{t}{\ell}}\right)}\right) \]
    8. Simplified98.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 99.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+153}:\\ \;\;\;\;\sin^{-1} \left(\frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\ \mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+73}:\\ \;\;\;\;\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}{t \cdot \sqrt{2}}\right)\\ \end{array} \]

Alternative 4: 97.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 71.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Taylor expanded in Om around 0 51.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. unpow251.4%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified51.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. expm1-log1p-u51.4%

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(e^{\mathsf{log1p}\left(\frac{1}{\sqrt{2 \cdot \color{blue}{{\left(\frac{t}{\ell}\right)}^{2}} + 1}}\right)} - 1\right) \]
      8. fma-udef36.9%

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p71.3%

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}}\right) \]
      11. *-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 95.4%

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

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

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

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

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

    if -10 < (/.f64 t l) < 1.00000000000000005e-4

    1. Initial program 97.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 84.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. unpow284.8%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified84.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. expm1-log1p-u84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}}\right) \]
      11. *-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 84.8%

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

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

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

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

        \[\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 \cdot \ell}}\right) \]
      5. rem-square-sqrt84.8%

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

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

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

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

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

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

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

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

    if 1.00000000000000005e-4 < (/.f64 t l)

    1. Initial program 64.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.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. unpow240.9%

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

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

      \[\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. expm1-log1p-u40.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 71.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Taylor expanded in Om around 0 51.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. unpow251.4%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified51.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. expm1-log1p-u51.4%

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(e^{\mathsf{log1p}\left(\frac{1}{\sqrt{2 \cdot \color{blue}{{\left(\frac{t}{\ell}\right)}^{2}} + 1}}\right)} - 1\right) \]
      8. fma-udef36.9%

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p71.3%

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}}\right) \]
      11. *-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 95.4%

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

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

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

    if -10 < (/.f64 t l) < 1.00000000000000005e-4

    1. Initial program 97.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 84.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. unpow284.8%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified84.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 0 84.8%

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

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

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

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

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

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

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

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

    if 1.00000000000000005e-4 < (/.f64 t l)

    1. Initial program 64.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.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. unpow240.9%

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

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

      \[\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. expm1-log1p-u40.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 97.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 71.3%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Taylor expanded in Om around 0 51.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. unpow251.4%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified51.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. expm1-log1p-u51.4%

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(e^{\mathsf{log1p}\left(\frac{1}{\sqrt{2 \cdot \color{blue}{{\left(\frac{t}{\ell}\right)}^{2}} + 1}}\right)} - 1\right) \]
      8. fma-udef36.9%

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p71.3%

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\color{blue}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}}\right) \]
      11. *-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 95.4%

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

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

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

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

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

    if -10 < (/.f64 t l) < 1.00000000000000005e-4

    1. Initial program 97.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 84.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. unpow284.8%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified84.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 0 84.8%

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

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

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

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

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

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

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

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

    if 1.00000000000000005e-4 < (/.f64 t l)

    1. Initial program 64.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.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. unpow240.9%

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

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

      \[\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. expm1-log1p-u40.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 62.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
\mathbf{if}\;\ell \leq -1.02 \cdot 10^{-126}:\\
\;\;\;\;\sin^{-1} 1\\

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

\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{-18}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t_1}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -1.02000000000000004e-126 or 1.7499999999999999e-18 < l

    1. Initial program 90.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 75.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. unpow275.8%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified75.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. expm1-log1p-u75.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p90.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{2} \cdot \frac{t}{\ell}}\right)}\right) \]
    8. Simplified97.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 74.1%

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

    if -1.02000000000000004e-126 < l < -9.999999999999969e-311

    1. Initial program 75.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 46.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. unpow246.7%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified46.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. expm1-log1p-u46.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p75.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{2} \cdot \frac{t}{\ell}}\right)}\right) \]
    8. Simplified98.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 -inf 52.5%

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

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

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

    if -9.999999999999969e-311 < l < 1.7499999999999999e-18

    1. Initial program 68.8%

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right) \]
    2. Taylor expanded in Om around 0 52.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. unpow252.5%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified52.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. expm1-log1p-u52.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p67.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{2} \cdot \frac{t}{\ell}}\right)}\right) \]
    8. Simplified96.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 inf 56.1%

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

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

Alternative 8: 61.5% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -3.24999999999999978e-202 or 3.50000000000000015e-19 < l

    1. Initial program 89.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 72.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. unpow272.2%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified72.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. expm1-log1p-u72.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p89.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{2} \cdot \frac{t}{\ell}}\right)}\right) \]
    8. Simplified97.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 0 70.0%

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

    if -3.24999999999999978e-202 < l < 3.50000000000000015e-19

    1. Initial program 70.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 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 61.2%

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

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

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

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

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

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

Alternative 9: 61.6% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -1.02e-199 or 9.59999999999999971e-20 < l

    1. Initial program 89.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 72.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. unpow272.2%

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

        \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
    4. Simplified72.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. expm1-log1p-u72.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p89.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{2} \cdot \frac{t}{\ell}}\right)}\right) \]
    8. Simplified97.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 0 70.0%

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

    if -1.02e-199 < l < 9.59999999999999971e-20

    1. Initial program 70.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 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. Step-by-step derivation
      1. expm1-log1p-u52.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
      2. expm1-log1p69.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{2} \cdot \frac{t}{\ell}}\right)}\right) \]
    8. Simplified97.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 61.3%

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

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

Alternative 10: 50.8% 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 83.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 66.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. unpow266.2%

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

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}}}\right) \]
  4. Simplified66.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. expm1-log1p-u66.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt{\mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, 1\right)}}\right)\right)\right)} \]
    2. expm1-log1p82.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \color{blue}{\sqrt{2} \cdot \frac{t}{\ell}}\right)}\right) \]
  8. Simplified97.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 53.1%

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

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

Reproduce

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