
(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:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (sqrt (- 1.0 (pow (/ Om Omc) 2.0)))))
(if (<= (/ t l) -1e+153)
(asin (* t_1 (/ (- l) (/ t (sqrt 0.5)))))
(if (<= (/ t l) 2e+61)
(asin
(sqrt
(/
(- 1.0 (* (/ Om Omc) (/ Om Omc)))
(+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (* t_1 (/ (/ l t) (sqrt 2.0))))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = sqrt((1.0 - pow((Om / Omc), 2.0)));
double tmp;
if ((t / l) <= -1e+153) {
tmp = asin((t_1 * (-l / (t / sqrt(0.5)))));
} else if ((t / l) <= 2e+61) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin((t_1 * ((l / t) / sqrt(2.0))));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((1.0d0 - ((om / omc) ** 2.0d0)))
if ((t / l) <= (-1d+153)) then
tmp = asin((t_1 * (-l / (t / sqrt(0.5d0)))))
else if ((t / l) <= 2d+61) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin((t_1 * ((l / t) / sqrt(2.0d0))))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0)));
double tmp;
if ((t / l) <= -1e+153) {
tmp = Math.asin((t_1 * (-l / (t / Math.sqrt(0.5)))));
} else if ((t / l) <= 2e+61) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin((t_1 * ((l / t) / Math.sqrt(2.0))));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) tmp = 0 if (t / l) <= -1e+153: tmp = math.asin((t_1 * (-l / (t / math.sqrt(0.5))))) elif (t / l) <= 2e+61: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin((t_1 * ((l / t) / math.sqrt(2.0)))) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) tmp = 0.0 if (Float64(t / l) <= -1e+153) tmp = asin(Float64(t_1 * Float64(Float64(-l) / Float64(t / sqrt(0.5))))); elseif (Float64(t / l) <= 2e+61) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(t_1 * Float64(Float64(l / t) / sqrt(2.0)))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = sqrt((1.0 - ((Om / Omc) ^ 2.0))); tmp = 0.0; if ((t / l) <= -1e+153) tmp = asin((t_1 * (-l / (t / sqrt(0.5))))); elseif ((t / l) <= 2e+61) tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin((t_1 * ((l / t) / sqrt(2.0)))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -1e+153], N[ArcSin[N[(t$95$1 * N[((-l) / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+61], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(t$95$1 * N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := \sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}\\
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{-\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e153Initial program 47.6%
Taylor expanded in t around -inf 77.6%
mul-1-neg77.6%
*-commutative77.6%
distribute-rgt-neg-in77.6%
unpow277.6%
unpow277.6%
times-frac99.4%
unpow299.4%
mul-1-neg99.4%
associate-/l*99.6%
associate-*r/99.6%
neg-mul-199.6%
Simplified99.6%
if -1e153 < (/.f64 t l) < 1.9999999999999999e61Initial program 98.7%
unpow298.7%
Applied egg-rr98.7%
unpow298.7%
Applied egg-rr98.7%
if 1.9999999999999999e61 < (/.f64 t l) Initial program 75.0%
sqrt-div74.9%
div-inv74.9%
add-sqr-sqrt74.9%
hypot-1-def74.9%
*-commutative74.9%
sqrt-prod74.8%
unpow274.8%
sqrt-prod99.2%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in t around inf 84.8%
*-commutative84.8%
unpow284.8%
unpow284.8%
times-frac99.4%
unpow299.4%
associate-/r*99.5%
Simplified99.5%
Final simplification99.0%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (/ t l) (sqrt 2.0))))))
t = abs(t);
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)))));
}
t = Math.abs(t);
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)))));
}
t = abs(t) 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)))))
t = abs(t) 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
t = abs(t) 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
NOTE: t should be positive before calling this function 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}
t = |t|\\
\\
\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}
Initial program 87.4%
sqrt-div87.4%
div-inv87.4%
add-sqr-sqrt87.4%
hypot-1-def87.4%
*-commutative87.4%
sqrt-prod87.3%
unpow287.3%
sqrt-prod51.1%
add-sqr-sqrt98.9%
Applied egg-rr98.9%
associate-*r/98.9%
*-rgt-identity98.9%
Simplified98.9%
Final simplification98.9%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (* (/ Om Omc) (/ Om Omc)))))
(if (<= (/ t l) -1e+153)
(asin (* (sqrt t_1) (* (sqrt 0.5) (/ (- l) t))))
(if (<= (/ t l) 2e+61)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin
(* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ (/ l t) (sqrt 2.0))))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) * (Om / Omc));
double tmp;
if ((t / l) <= -1e+153) {
tmp = asin((sqrt(t_1) * (sqrt(0.5) * (-l / t))));
} else if ((t / l) <= 2e+61) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin((sqrt((1.0 - pow((Om / Omc), 2.0))) * ((l / t) / sqrt(2.0))));
}
return tmp;
}
NOTE: t should be positive before calling this function
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 = 1.0d0 - ((om / omc) * (om / omc))
if ((t / l) <= (-1d+153)) then
tmp = asin((sqrt(t_1) * (sqrt(0.5d0) * (-l / t))))
else if ((t / l) <= 2d+61) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin((sqrt((1.0d0 - ((om / omc) ** 2.0d0))) * ((l / t) / sqrt(2.0d0))))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) * (Om / Omc));
double tmp;
if ((t / l) <= -1e+153) {
tmp = Math.asin((Math.sqrt(t_1) * (Math.sqrt(0.5) * (-l / t))));
} else if ((t / l) <= 2e+61) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) * ((l / t) / Math.sqrt(2.0))));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) * (Om / Omc)) tmp = 0 if (t / l) <= -1e+153: tmp = math.asin((math.sqrt(t_1) * (math.sqrt(0.5) * (-l / t)))) elif (t / l) <= 2e+61: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) * ((l / t) / math.sqrt(2.0)))) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) tmp = 0.0 if (Float64(t / l) <= -1e+153) tmp = asin(Float64(sqrt(t_1) * Float64(sqrt(0.5) * Float64(Float64(-l) / t)))); elseif (Float64(t / l) <= 2e+61) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) * Float64(Float64(l / t) / sqrt(2.0)))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) * (Om / Omc)); tmp = 0.0; if ((t / l) <= -1e+153) tmp = asin((sqrt(t_1) * (sqrt(0.5) * (-l / t)))); elseif ((t / l) <= 2e+61) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) * ((l / t) / sqrt(2.0)))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -1e+153], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(N[Sqrt[0.5], $MachinePrecision] * N[((-l) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+61], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := 1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}\\
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\sqrt{0.5} \cdot \frac{-\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e153Initial program 47.6%
unpow247.6%
clear-num47.6%
clear-num47.6%
frac-times47.7%
metadata-eval47.7%
Applied egg-rr47.7%
Taylor expanded in t around -inf 77.6%
mul-1-neg77.6%
associate-*l/77.7%
*-commutative77.7%
distribute-rgt-neg-in77.7%
unpow277.7%
unpow277.7%
times-frac99.5%
unpow299.5%
*-commutative99.5%
Simplified99.5%
unpow247.6%
Applied egg-rr99.5%
if -1e153 < (/.f64 t l) < 1.9999999999999999e61Initial program 98.7%
unpow298.7%
Applied egg-rr98.7%
unpow298.7%
Applied egg-rr98.7%
if 1.9999999999999999e61 < (/.f64 t l) Initial program 75.0%
sqrt-div74.9%
div-inv74.9%
add-sqr-sqrt74.9%
hypot-1-def74.9%
*-commutative74.9%
sqrt-prod74.8%
unpow274.8%
sqrt-prod99.2%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in t around inf 84.8%
*-commutative84.8%
unpow284.8%
unpow284.8%
times-frac99.4%
unpow299.4%
associate-/r*99.5%
Simplified99.5%
Final simplification99.0%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (pow (/ Om Omc) 2.0))) (t_2 (sqrt t_1)))
(if (<= (/ t l) -1e+92)
(asin (* t_2 (/ (/ (- l) t) (sqrt 2.0))))
(if (<= (/ t l) 5e+153)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin (* t_2 (/ (/ l t) (sqrt 2.0))))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - pow((Om / Omc), 2.0);
double t_2 = sqrt(t_1);
double tmp;
if ((t / l) <= -1e+92) {
tmp = asin((t_2 * ((-l / t) / sqrt(2.0))));
} else if ((t / l) <= 5e+153) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin((t_2 * ((l / t) / sqrt(2.0))));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) ** 2.0d0)
t_2 = sqrt(t_1)
if ((t / l) <= (-1d+92)) then
tmp = asin((t_2 * ((-l / t) / sqrt(2.0d0))))
else if ((t / l) <= 5d+153) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin((t_2 * ((l / t) / sqrt(2.0d0))))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - Math.pow((Om / Omc), 2.0);
double t_2 = Math.sqrt(t_1);
double tmp;
if ((t / l) <= -1e+92) {
tmp = Math.asin((t_2 * ((-l / t) / Math.sqrt(2.0))));
} else if ((t / l) <= 5e+153) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin((t_2 * ((l / t) / Math.sqrt(2.0))));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = 1.0 - math.pow((Om / Omc), 2.0) t_2 = math.sqrt(t_1) tmp = 0 if (t / l) <= -1e+92: tmp = math.asin((t_2 * ((-l / t) / math.sqrt(2.0)))) elif (t / l) <= 5e+153: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin((t_2 * ((l / t) / math.sqrt(2.0)))) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) t_2 = sqrt(t_1) tmp = 0.0 if (Float64(t / l) <= -1e+92) tmp = asin(Float64(t_2 * Float64(Float64(Float64(-l) / t) / sqrt(2.0)))); elseif (Float64(t / l) <= 5e+153) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); else tmp = asin(Float64(t_2 * Float64(Float64(l / t) / sqrt(2.0)))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) ^ 2.0); t_2 = sqrt(t_1); tmp = 0.0; if ((t / l) <= -1e+92) tmp = asin((t_2 * ((-l / t) / sqrt(2.0)))); elseif ((t / l) <= 5e+153) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin((t_2 * ((l / t) / sqrt(2.0)))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[t$95$1], $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -1e+92], N[ArcSin[N[(t$95$2 * N[(N[((-l) / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+153], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(t$95$2 * N[(N[(l / t), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\
t_2 := \sqrt{t_1}\\
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+92}:\\
\;\;\;\;\sin^{-1} \left(t_2 \cdot \frac{\frac{-\ell}{t}}{\sqrt{2}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(t_2 \cdot \frac{\frac{\ell}{t}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e92Initial program 57.0%
sqrt-div57.1%
div-inv57.1%
add-sqr-sqrt57.1%
hypot-1-def57.1%
*-commutative57.1%
sqrt-prod57.1%
unpow257.1%
sqrt-prod0.0%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in t around -inf 77.7%
mul-1-neg77.7%
*-commutative77.7%
unpow277.7%
unpow277.7%
times-frac99.6%
unpow299.6%
associate-/r*99.6%
Simplified99.6%
if -1e92 < (/.f64 t l) < 5.00000000000000018e153Initial program 98.8%
unpow298.8%
clear-num98.8%
un-div-inv98.8%
Applied egg-rr98.8%
if 5.00000000000000018e153 < (/.f64 t l) Initial program 61.5%
sqrt-div61.5%
div-inv61.5%
add-sqr-sqrt61.5%
hypot-1-def61.5%
*-commutative61.5%
sqrt-prod61.5%
unpow261.5%
sqrt-prod99.5%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in t around inf 90.6%
*-commutative90.6%
unpow290.6%
unpow290.6%
times-frac99.6%
unpow299.6%
associate-/r*99.6%
Simplified99.6%
Final simplification99.0%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (* (/ Om Omc) (/ Om Omc)))))
(if (<= (/ t l) -1e+153)
(asin (* (sqrt t_1) (* (sqrt 0.5) (/ (- l) t))))
(if (<= (/ t l) 5e+69)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ (* l (sqrt 0.5)) t))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) * (Om / Omc));
double tmp;
if ((t / l) <= -1e+153) {
tmp = asin((sqrt(t_1) * (sqrt(0.5) * (-l / t))));
} else if ((t / l) <= 5e+69) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
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 = 1.0d0 - ((om / omc) * (om / omc))
if ((t / l) <= (-1d+153)) then
tmp = asin((sqrt(t_1) * (sqrt(0.5d0) * (-l / t))))
else if ((t / l) <= 5d+69) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - ((Om / Omc) * (Om / Omc));
double tmp;
if ((t / l) <= -1e+153) {
tmp = Math.asin((Math.sqrt(t_1) * (Math.sqrt(0.5) * (-l / t))));
} else if ((t / l) <= 5e+69) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = 1.0 - ((Om / Omc) * (Om / Omc)) tmp = 0 if (t / l) <= -1e+153: tmp = math.asin((math.sqrt(t_1) * (math.sqrt(0.5) * (-l / t)))) elif (t / l) <= 5e+69: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) tmp = 0.0 if (Float64(t / l) <= -1e+153) tmp = asin(Float64(sqrt(t_1) * Float64(sqrt(0.5) * Float64(Float64(-l) / t)))); elseif (Float64(t / l) <= 5e+69) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) * (Om / Omc)); tmp = 0.0; if ((t / l) <= -1e+153) tmp = asin((sqrt(t_1) * (sqrt(0.5) * (-l / t)))); elseif ((t / l) <= 5e+69) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -1e+153], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(N[Sqrt[0.5], $MachinePrecision] * N[((-l) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+69], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := 1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}\\
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \left(\sqrt{0.5} \cdot \frac{-\ell}{t}\right)\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+69}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e153Initial program 47.6%
unpow247.6%
clear-num47.6%
clear-num47.6%
frac-times47.7%
metadata-eval47.7%
Applied egg-rr47.7%
Taylor expanded in t around -inf 77.6%
mul-1-neg77.6%
associate-*l/77.7%
*-commutative77.7%
distribute-rgt-neg-in77.7%
unpow277.7%
unpow277.7%
times-frac99.5%
unpow299.5%
*-commutative99.5%
Simplified99.5%
unpow247.6%
Applied egg-rr99.5%
if -1e153 < (/.f64 t l) < 5.00000000000000036e69Initial program 98.8%
unpow298.8%
Applied egg-rr98.8%
unpow298.8%
Applied egg-rr98.8%
if 5.00000000000000036e69 < (/.f64 t l) Initial program 74.3%
unpow274.3%
clear-num74.3%
clear-num74.3%
frac-times74.3%
metadata-eval74.3%
Applied egg-rr74.3%
Taylor expanded in Om around 0 62.6%
unpow262.6%
unpow262.6%
Simplified62.6%
Taylor expanded in t around inf 99.7%
Final simplification99.0%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+153)
(asin (/ (- l) (/ t (sqrt 0.5))))
(if (<= (/ t l) 5e+69)
(asin
(sqrt
(/
(- 1.0 (* (/ Om Omc) (/ Om Omc)))
(+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+153) {
tmp = asin((-l / (t / sqrt(0.5))));
} else if ((t / l) <= 5e+69) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-1d+153)) then
tmp = asin((-l / (t / sqrt(0.5d0))))
else if ((t / l) <= 5d+69) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) * (om / omc))) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+153) {
tmp = Math.asin((-l / (t / Math.sqrt(0.5))));
} else if ((t / l) <= 5e+69) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+153: tmp = math.asin((-l / (t / math.sqrt(0.5)))) elif (t / l) <= 5e+69: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+153) tmp = asin(Float64(Float64(-l) / Float64(t / sqrt(0.5)))); elseif (Float64(t / l) <= 5e+69) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) * Float64(Om / Omc))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+153) tmp = asin((-l / (t / sqrt(0.5)))); elseif ((t / l) <= 5e+69) tmp = asin(sqrt(((1.0 - ((Om / Omc) * (Om / Omc))) / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+153], N[ArcSin[N[((-l) / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+69], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+69}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e153Initial program 47.6%
unpow247.6%
clear-num47.6%
clear-num47.6%
frac-times47.7%
metadata-eval47.7%
Applied egg-rr47.7%
Taylor expanded in Om around 0 45.4%
unpow245.4%
unpow245.4%
Simplified45.4%
frac-times47.6%
Applied egg-rr47.6%
Taylor expanded in t around -inf 97.2%
mul-1-neg97.2%
associate-/l*97.4%
distribute-neg-frac97.4%
Simplified97.4%
if -1e153 < (/.f64 t l) < 5.00000000000000036e69Initial program 98.8%
unpow298.8%
Applied egg-rr98.8%
unpow298.8%
Applied egg-rr98.8%
if 5.00000000000000036e69 < (/.f64 t l) Initial program 74.3%
unpow274.3%
clear-num74.3%
clear-num74.3%
frac-times74.3%
metadata-eval74.3%
Applied egg-rr74.3%
Taylor expanded in Om around 0 62.6%
unpow262.6%
unpow262.6%
Simplified62.6%
Taylor expanded in t around inf 99.7%
Final simplification98.7%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+153)
(asin (/ (- l) (/ t (sqrt 0.5))))
(if (<= (/ t l) 5e+69)
(asin (sqrt (/ 1.0 (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+153) {
tmp = asin((-l / (t / sqrt(0.5))));
} else if ((t / l) <= 5e+69) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t / l) <= (-1d+153)) then
tmp = asin((-l / (t / sqrt(0.5d0))))
else if ((t / l) <= 5d+69) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+153) {
tmp = Math.asin((-l / (t / Math.sqrt(0.5))));
} else if ((t / l) <= 5e+69) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+153: tmp = math.asin((-l / (t / math.sqrt(0.5)))) elif (t / l) <= 5e+69: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+153) tmp = asin(Float64(Float64(-l) / Float64(t / sqrt(0.5)))); elseif (Float64(t / l) <= 5e+69) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+153) tmp = asin((-l / (t / sqrt(0.5)))); elseif ((t / l) <= 5e+69) tmp = asin(sqrt((1.0 / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+153], N[ArcSin[N[((-l) / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+69], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+69}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e153Initial program 47.6%
unpow247.6%
clear-num47.6%
clear-num47.6%
frac-times47.7%
metadata-eval47.7%
Applied egg-rr47.7%
Taylor expanded in Om around 0 45.4%
unpow245.4%
unpow245.4%
Simplified45.4%
frac-times47.6%
Applied egg-rr47.6%
Taylor expanded in t around -inf 97.2%
mul-1-neg97.2%
associate-/l*97.4%
distribute-neg-frac97.4%
Simplified97.4%
if -1e153 < (/.f64 t l) < 5.00000000000000036e69Initial program 98.8%
unpow298.8%
clear-num98.7%
clear-num98.7%
frac-times98.7%
metadata-eval98.7%
Applied egg-rr98.7%
Taylor expanded in Om around 0 77.1%
unpow277.1%
unpow277.1%
Simplified77.1%
frac-times97.2%
Applied egg-rr97.2%
if 5.00000000000000036e69 < (/.f64 t l) Initial program 74.3%
unpow274.3%
clear-num74.3%
clear-num74.3%
frac-times74.3%
metadata-eval74.3%
Applied egg-rr74.3%
Taylor expanded in Om around 0 62.6%
unpow262.6%
unpow262.6%
Simplified62.6%
Taylor expanded in t around inf 99.7%
Final simplification97.5%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (* l (sqrt 0.5))))
(if (<= l -1.72e-9)
(asin 1.0)
(if (<= l -7.2e-292)
(asin (/ (- t_1) t))
(if (<= l 3.7e-7)
(asin (/ t_1 t))
(if (<= l 1.35e+17)
(asin 1.0)
(if (<= l 6.5e+59) (asin (/ l (/ t (sqrt 0.5)))) (asin 1.0))))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = l * sqrt(0.5);
double tmp;
if (l <= -1.72e-9) {
tmp = asin(1.0);
} else if (l <= -7.2e-292) {
tmp = asin((-t_1 / t));
} else if (l <= 3.7e-7) {
tmp = asin((t_1 / t));
} else if (l <= 1.35e+17) {
tmp = asin(1.0);
} else if (l <= 6.5e+59) {
tmp = asin((l / (t / sqrt(0.5))));
} else {
tmp = asin(1.0);
}
return tmp;
}
NOTE: t should be positive before calling this function
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 = l * sqrt(0.5d0)
if (l <= (-1.72d-9)) then
tmp = asin(1.0d0)
else if (l <= (-7.2d-292)) then
tmp = asin((-t_1 / t))
else if (l <= 3.7d-7) then
tmp = asin((t_1 / t))
else if (l <= 1.35d+17) then
tmp = asin(1.0d0)
else if (l <= 6.5d+59) then
tmp = asin((l / (t / sqrt(0.5d0))))
else
tmp = asin(1.0d0)
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = l * Math.sqrt(0.5);
double tmp;
if (l <= -1.72e-9) {
tmp = Math.asin(1.0);
} else if (l <= -7.2e-292) {
tmp = Math.asin((-t_1 / t));
} else if (l <= 3.7e-7) {
tmp = Math.asin((t_1 / t));
} else if (l <= 1.35e+17) {
tmp = Math.asin(1.0);
} else if (l <= 6.5e+59) {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = l * math.sqrt(0.5) tmp = 0 if l <= -1.72e-9: tmp = math.asin(1.0) elif l <= -7.2e-292: tmp = math.asin((-t_1 / t)) elif l <= 3.7e-7: tmp = math.asin((t_1 / t)) elif l <= 1.35e+17: tmp = math.asin(1.0) elif l <= 6.5e+59: tmp = math.asin((l / (t / math.sqrt(0.5)))) else: tmp = math.asin(1.0) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = Float64(l * sqrt(0.5)) tmp = 0.0 if (l <= -1.72e-9) tmp = asin(1.0); elseif (l <= -7.2e-292) tmp = asin(Float64(Float64(-t_1) / t)); elseif (l <= 3.7e-7) tmp = asin(Float64(t_1 / t)); elseif (l <= 1.35e+17) tmp = asin(1.0); elseif (l <= 6.5e+59) tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); else tmp = asin(1.0); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = l * sqrt(0.5); tmp = 0.0; if (l <= -1.72e-9) tmp = asin(1.0); elseif (l <= -7.2e-292) tmp = asin((-t_1 / t)); elseif (l <= 3.7e-7) tmp = asin((t_1 / t)); elseif (l <= 1.35e+17) tmp = asin(1.0); elseif (l <= 6.5e+59) tmp = asin((l / (t / sqrt(0.5)))); else tmp = asin(1.0); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.72e-9], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, -7.2e-292], N[ArcSin[N[((-t$95$1) / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.7e-7], N[ArcSin[N[(t$95$1 / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.35e+17], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[l, 6.5e+59], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \sqrt{0.5}\\
\mathbf{if}\;\ell \leq -1.72 \cdot 10^{-9}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq -7.2 \cdot 10^{-292}:\\
\;\;\;\;\sin^{-1} \left(\frac{-t_1}{t}\right)\\
\mathbf{elif}\;\ell \leq 3.7 \cdot 10^{-7}:\\
\;\;\;\;\sin^{-1} \left(\frac{t_1}{t}\right)\\
\mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+17}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;\ell \leq 6.5 \cdot 10^{+59}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < -1.72000000000000006e-9 or 3.70000000000000004e-7 < l < 1.35e17 or 6.50000000000000021e59 < l Initial program 94.2%
unpow294.2%
clear-num94.2%
clear-num94.2%
frac-times94.2%
metadata-eval94.2%
Applied egg-rr94.2%
Taylor expanded in Om around 0 77.1%
unpow277.1%
unpow277.1%
Simplified77.1%
Taylor expanded in t around 0 79.5%
if -1.72000000000000006e-9 < l < -7.2000000000000004e-292Initial program 79.3%
unpow279.3%
clear-num79.3%
clear-num79.2%
frac-times79.3%
metadata-eval79.3%
Applied egg-rr79.3%
Taylor expanded in Om around 0 56.9%
unpow256.9%
unpow256.9%
Simplified56.9%
frac-times77.2%
Applied egg-rr77.2%
Taylor expanded in t around -inf 47.5%
mul-1-neg47.5%
Simplified47.5%
if -7.2000000000000004e-292 < l < 3.70000000000000004e-7Initial program 80.7%
unpow280.7%
clear-num80.7%
clear-num80.7%
frac-times80.7%
metadata-eval80.7%
Applied egg-rr80.7%
Taylor expanded in Om around 0 65.3%
unpow265.3%
unpow265.3%
Simplified65.3%
Taylor expanded in t around inf 51.3%
if 1.35e17 < l < 6.50000000000000021e59Initial program 68.3%
unpow268.3%
clear-num68.3%
clear-num68.3%
frac-times68.3%
metadata-eval68.3%
Applied egg-rr68.3%
Taylor expanded in Om around 0 68.3%
unpow268.3%
unpow268.3%
Simplified68.3%
Taylor expanded in t around inf 19.1%
associate-/l*19.1%
Simplified19.1%
Final simplification65.1%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (* l (sqrt 0.5))))
(if (<= (/ t l) -2.0)
(asin (/ (- t_1) t))
(if (<= (/ t l) 1e-13)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ t_1 t))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double t_1 = l * sqrt(0.5);
double tmp;
if ((t / l) <= -2.0) {
tmp = asin((-t_1 / t));
} else if ((t / l) <= 1e-13) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin((t_1 / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
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 = l * sqrt(0.5d0)
if ((t / l) <= (-2.0d0)) then
tmp = asin((-t_1 / t))
else if ((t / l) <= 1d-13) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin((t_1 / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double t_1 = l * Math.sqrt(0.5);
double tmp;
if ((t / l) <= -2.0) {
tmp = Math.asin((-t_1 / t));
} else if ((t / l) <= 1e-13) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin((t_1 / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): t_1 = l * math.sqrt(0.5) tmp = 0 if (t / l) <= -2.0: tmp = math.asin((-t_1 / t)) elif (t / l) <= 1e-13: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin((t_1 / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) t_1 = Float64(l * sqrt(0.5)) tmp = 0.0 if (Float64(t / l) <= -2.0) tmp = asin(Float64(Float64(-t_1) / t)); elseif (Float64(t / l) <= 1e-13) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(t_1 / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) t_1 = l * sqrt(0.5); tmp = 0.0; if ((t / l) <= -2.0) tmp = asin((-t_1 / t)); elseif ((t / l) <= 1e-13) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin((t_1 / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -2.0], N[ArcSin[N[((-t$95$1) / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e-13], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(t$95$1 / t), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \sqrt{0.5}\\
\mathbf{if}\;\frac{t}{\ell} \leq -2:\\
\;\;\;\;\sin^{-1} \left(\frac{-t_1}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{-13}:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{t_1}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2Initial program 70.0%
unpow270.0%
clear-num69.9%
clear-num69.9%
frac-times70.0%
metadata-eval70.0%
Applied egg-rr70.0%
Taylor expanded in Om around 0 42.6%
unpow242.6%
unpow242.6%
Simplified42.6%
frac-times69.9%
Applied egg-rr69.9%
Taylor expanded in t around -inf 96.3%
mul-1-neg96.3%
Simplified96.3%
if -2 < (/.f64 t l) < 1e-13Initial program 98.8%
unpow298.8%
clear-num98.8%
clear-num98.8%
frac-times98.8%
metadata-eval98.8%
Applied egg-rr98.8%
Taylor expanded in Om around 0 87.3%
unpow287.3%
unpow287.3%
Simplified87.3%
Taylor expanded in t around 0 87.3%
mul-1-neg87.3%
unsub-neg87.3%
unpow287.3%
unpow287.3%
times-frac97.3%
unpow297.3%
Simplified97.3%
if 1e-13 < (/.f64 t l) Initial program 80.2%
unpow280.2%
clear-num80.2%
clear-num80.2%
frac-times80.2%
metadata-eval80.2%
Applied egg-rr80.2%
Taylor expanded in Om around 0 61.0%
unpow261.0%
unpow261.0%
Simplified61.0%
Taylor expanded in t around inf 95.4%
Final simplification96.7%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2.0)
(asin (/ (- l) (/ t (sqrt 0.5))))
(if (<= (/ t l) 1e-13)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ (* l (sqrt 0.5)) t)))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2.0) {
tmp = asin((-l / (t / sqrt(0.5))));
} else if ((t / l) <= 1e-13) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
NOTE: t should be positive before calling this function
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) <= (-2.0d0)) then
tmp = asin((-l / (t / sqrt(0.5d0))))
else if ((t / l) <= 1d-13) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2.0) {
tmp = Math.asin((-l / (t / Math.sqrt(0.5))));
} else if ((t / l) <= 1e-13) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2.0: tmp = math.asin((-l / (t / math.sqrt(0.5)))) elif (t / l) <= 1e-13: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2.0) tmp = asin(Float64(Float64(-l) / Float64(t / sqrt(0.5)))); elseif (Float64(t / l) <= 1e-13) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2.0) tmp = asin((-l / (t / sqrt(0.5)))); elseif ((t / l) <= 1e-13) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2.0], N[ArcSin[N[((-l) / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e-13], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{-13}:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2Initial program 70.0%
unpow270.0%
clear-num69.9%
clear-num69.9%
frac-times70.0%
metadata-eval70.0%
Applied egg-rr70.0%
Taylor expanded in Om around 0 42.6%
unpow242.6%
unpow242.6%
Simplified42.6%
frac-times69.9%
Applied egg-rr69.9%
Taylor expanded in t around -inf 96.3%
mul-1-neg96.3%
associate-/l*96.4%
distribute-neg-frac96.4%
Simplified96.4%
if -2 < (/.f64 t l) < 1e-13Initial program 98.8%
unpow298.8%
clear-num98.8%
clear-num98.8%
frac-times98.8%
metadata-eval98.8%
Applied egg-rr98.8%
Taylor expanded in Om around 0 87.3%
unpow287.3%
unpow287.3%
Simplified87.3%
Taylor expanded in t around 0 87.3%
mul-1-neg87.3%
unsub-neg87.3%
unpow287.3%
unpow287.3%
times-frac97.3%
unpow297.3%
Simplified97.3%
if 1e-13 < (/.f64 t l) Initial program 80.2%
unpow280.2%
clear-num80.2%
clear-num80.2%
frac-times80.2%
metadata-eval80.2%
Applied egg-rr80.2%
Taylor expanded in Om around 0 61.0%
unpow261.0%
unpow261.0%
Simplified61.0%
Taylor expanded in t around inf 95.4%
Final simplification96.7%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (or (<= t 6e+89) (and (not (<= t 1.8e+96)) (<= t 8e+131))) (asin 1.0) (asin (* (sqrt 0.5) (/ l t)))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= 6e+89) || (!(t <= 1.8e+96) && (t <= 8e+131))) {
tmp = asin(1.0);
} else {
tmp = asin((sqrt(0.5) * (l / t)));
}
return tmp;
}
NOTE: t should be positive before calling this function
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 <= 6d+89) .or. (.not. (t <= 1.8d+96)) .and. (t <= 8d+131)) then
tmp = asin(1.0d0)
else
tmp = asin((sqrt(0.5d0) * (l / t)))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= 6e+89) || (!(t <= 1.8e+96) && (t <= 8e+131))) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((Math.sqrt(0.5) * (l / t)));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t <= 6e+89) or (not (t <= 1.8e+96) and (t <= 8e+131)): tmp = math.asin(1.0) else: tmp = math.asin((math.sqrt(0.5) * (l / t))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if ((t <= 6e+89) || (!(t <= 1.8e+96) && (t <= 8e+131))) tmp = asin(1.0); else tmp = asin(Float64(sqrt(0.5) * Float64(l / t))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t <= 6e+89) || (~((t <= 1.8e+96)) && (t <= 8e+131))) tmp = asin(1.0); else tmp = asin((sqrt(0.5) * (l / t))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[Or[LessEqual[t, 6e+89], And[N[Not[LessEqual[t, 1.8e+96]], $MachinePrecision], LessEqual[t, 8e+131]]], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6 \cdot 10^{+89} \lor \neg \left(t \leq 1.8 \cdot 10^{+96}\right) \land t \leq 8 \cdot 10^{+131}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{0.5} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if t < 6.00000000000000025e89 or 1.80000000000000007e96 < t < 7.9999999999999993e131Initial program 88.6%
unpow288.6%
clear-num88.6%
clear-num88.6%
frac-times88.6%
metadata-eval88.6%
Applied egg-rr88.6%
Taylor expanded in Om around 0 72.7%
unpow272.7%
unpow272.7%
Simplified72.7%
Taylor expanded in t around 0 60.6%
if 6.00000000000000025e89 < t < 1.80000000000000007e96 or 7.9999999999999993e131 < t Initial program 79.1%
unpow279.1%
clear-num79.1%
clear-num79.0%
frac-times79.1%
metadata-eval79.1%
Applied egg-rr79.1%
Taylor expanded in Om around 0 52.6%
unpow252.6%
unpow252.6%
Simplified52.6%
Taylor expanded in t around inf 55.8%
associate-*l/55.6%
*-commutative55.6%
Simplified55.6%
Final simplification59.9%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (if (or (<= t 7e+89) (and (not (<= t 1.9e+96)) (<= t 1.05e+132))) (asin 1.0) (asin (/ l (/ t (sqrt 0.5))))))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= 7e+89) || (!(t <= 1.9e+96) && (t <= 1.05e+132))) {
tmp = asin(1.0);
} else {
tmp = asin((l / (t / sqrt(0.5))));
}
return tmp;
}
NOTE: t should be positive before calling this function
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 <= 7d+89) .or. (.not. (t <= 1.9d+96)) .and. (t <= 1.05d+132)) then
tmp = asin(1.0d0)
else
tmp = asin((l / (t / sqrt(0.5d0))))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t <= 7e+89) || (!(t <= 1.9e+96) && (t <= 1.05e+132))) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if (t <= 7e+89) or (not (t <= 1.9e+96) and (t <= 1.05e+132)): tmp = math.asin(1.0) else: tmp = math.asin((l / (t / math.sqrt(0.5)))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if ((t <= 7e+89) || (!(t <= 1.9e+96) && (t <= 1.05e+132))) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t <= 7e+89) || (~((t <= 1.9e+96)) && (t <= 1.05e+132))) tmp = asin(1.0); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[Or[LessEqual[t, 7e+89], And[N[Not[LessEqual[t, 1.9e+96]], $MachinePrecision], LessEqual[t, 1.05e+132]]], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7 \cdot 10^{+89} \lor \neg \left(t \leq 1.9 \cdot 10^{+96}\right) \land t \leq 1.05 \cdot 10^{+132}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if t < 7.0000000000000001e89 or 1.9000000000000001e96 < t < 1.04999999999999997e132Initial program 88.6%
unpow288.6%
clear-num88.6%
clear-num88.6%
frac-times88.6%
metadata-eval88.6%
Applied egg-rr88.6%
Taylor expanded in Om around 0 72.7%
unpow272.7%
unpow272.7%
Simplified72.7%
Taylor expanded in t around 0 60.6%
if 7.0000000000000001e89 < t < 1.9000000000000001e96 or 1.04999999999999997e132 < t Initial program 79.1%
unpow279.1%
clear-num79.1%
clear-num79.0%
frac-times79.1%
metadata-eval79.1%
Applied egg-rr79.1%
Taylor expanded in Om around 0 52.6%
unpow252.6%
unpow252.6%
Simplified52.6%
Taylor expanded in t around inf 55.8%
associate-/l*55.7%
Simplified55.7%
Final simplification59.9%
NOTE: t should be positive before calling this function
(FPCore (t l Om Omc)
:precision binary64
(if (<= t 6.8e+89)
(asin 1.0)
(if (<= t 1.45e+96)
(asin (/ (* l (sqrt 0.5)) t))
(if (<= t 2.2e+132) (asin 1.0) (asin (/ l (/ t (sqrt 0.5))))))))t = abs(t);
double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 6.8e+89) {
tmp = asin(1.0);
} else if (t <= 1.45e+96) {
tmp = asin(((l * sqrt(0.5)) / t));
} else if (t <= 2.2e+132) {
tmp = asin(1.0);
} else {
tmp = asin((l / (t / sqrt(0.5))));
}
return tmp;
}
NOTE: t should be positive before calling this function
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 <= 6.8d+89) then
tmp = asin(1.0d0)
else if (t <= 1.45d+96) then
tmp = asin(((l * sqrt(0.5d0)) / t))
else if (t <= 2.2d+132) then
tmp = asin(1.0d0)
else
tmp = asin((l / (t / sqrt(0.5d0))))
end if
code = tmp
end function
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (t <= 6.8e+89) {
tmp = Math.asin(1.0);
} else if (t <= 1.45e+96) {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
} else if (t <= 2.2e+132) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
t = abs(t) def code(t, l, Om, Omc): tmp = 0 if t <= 6.8e+89: tmp = math.asin(1.0) elif t <= 1.45e+96: tmp = math.asin(((l * math.sqrt(0.5)) / t)) elif t <= 2.2e+132: tmp = math.asin(1.0) else: tmp = math.asin((l / (t / math.sqrt(0.5)))) return tmp
t = abs(t) function code(t, l, Om, Omc) tmp = 0.0 if (t <= 6.8e+89) tmp = asin(1.0); elseif (t <= 1.45e+96) tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); elseif (t <= 2.2e+132) tmp = asin(1.0); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
t = abs(t) function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (t <= 6.8e+89) tmp = asin(1.0); elseif (t <= 1.45e+96) tmp = asin(((l * sqrt(0.5)) / t)); elseif (t <= 2.2e+132) tmp = asin(1.0); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := If[LessEqual[t, 6.8e+89], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[t, 1.45e+96], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 2.2e+132], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t = |t|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.8 \cdot 10^{+89}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+96}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+132}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if t < 6.8000000000000004e89 or 1.44999999999999989e96 < t < 2.19999999999999989e132Initial program 88.6%
unpow288.6%
clear-num88.6%
clear-num88.6%
frac-times88.6%
metadata-eval88.6%
Applied egg-rr88.6%
Taylor expanded in Om around 0 72.7%
unpow272.7%
unpow272.7%
Simplified72.7%
Taylor expanded in t around 0 60.6%
if 6.8000000000000004e89 < t < 1.44999999999999989e96Initial program 100.0%
unpow2100.0%
clear-num100.0%
clear-num100.0%
frac-times98.4%
metadata-eval98.4%
Applied egg-rr98.4%
Taylor expanded in Om around 0 100.0%
unpow2100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
if 2.19999999999999989e132 < t Initial program 78.4%
unpow278.4%
clear-num78.4%
clear-num78.4%
frac-times78.5%
metadata-eval78.5%
Applied egg-rr78.5%
Taylor expanded in Om around 0 51.1%
unpow251.1%
unpow251.1%
Simplified51.1%
Taylor expanded in t around inf 54.4%
associate-/l*54.3%
Simplified54.3%
Final simplification59.9%
NOTE: t should be positive before calling this function (FPCore (t l Om Omc) :precision binary64 (asin 1.0))
t = abs(t);
double code(double t, double l, double Om, double Omc) {
return asin(1.0);
}
NOTE: t should be positive before calling this function
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
t = Math.abs(t);
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(1.0);
}
t = abs(t) def code(t, l, Om, Omc): return math.asin(1.0)
t = abs(t) function code(t, l, Om, Omc) return asin(1.0) end
t = abs(t) function tmp = code(t, l, Om, Omc) tmp = asin(1.0); end
NOTE: t should be positive before calling this function code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
t = |t|\\
\\
\sin^{-1} 1
\end{array}
Initial program 87.4%
unpow287.4%
clear-num87.4%
clear-num87.4%
frac-times87.4%
metadata-eval87.4%
Applied egg-rr87.4%
Taylor expanded in Om around 0 70.1%
unpow270.1%
unpow270.1%
Simplified70.1%
Taylor expanded in t around 0 55.2%
Final simplification55.2%
herbie shell --seed 2023285
(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)))))))