
(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 10 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}
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (pow (/ Om Omc) 2.0))))
(if (<= (/ t_m l_m) 2e+149)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t_m l_m) (/ l_m t_m)))))))
(asin (* l_m (* (sqrt t_1) (/ (sqrt 0.5) t_m)))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double t_1 = 1.0 - pow((Om / Omc), 2.0);
double tmp;
if ((t_m / l_m) <= 2e+149) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l_m) / (l_m / t_m)))))));
} else {
tmp = asin((l_m * (sqrt(t_1) * (sqrt(0.5) / t_m))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) ** 2.0d0)
if ((t_m / l_m) <= 2d+149) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l_m) / (l_m / t_m)))))))
else
tmp = asin((l_m * (sqrt(t_1) * (sqrt(0.5d0) / t_m))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double t_1 = 1.0 - Math.pow((Om / Omc), 2.0);
double tmp;
if ((t_m / l_m) <= 2e+149) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l_m) / (l_m / t_m)))))));
} else {
tmp = Math.asin((l_m * (Math.sqrt(t_1) * (Math.sqrt(0.5) / t_m))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): t_1 = 1.0 - math.pow((Om / Omc), 2.0) tmp = 0 if (t_m / l_m) <= 2e+149: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l_m) / (l_m / t_m))))))) else: tmp = math.asin((l_m * (math.sqrt(t_1) * (math.sqrt(0.5) / t_m)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) t_1 = Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) tmp = 0.0 if (Float64(t_m / l_m) <= 2e+149) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l_m) / Float64(l_m / t_m))))))); else tmp = asin(Float64(l_m * Float64(sqrt(t_1) * Float64(sqrt(0.5) / t_m)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) t_1 = 1.0 - ((Om / Omc) ^ 2.0); tmp = 0.0; if ((t_m / l_m) <= 2e+149) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l_m) / (l_m / t_m))))))); else tmp = asin((l_m * (sqrt(t_1) * (sqrt(0.5) / t_m)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision]
l_m = N[Abs[l], $MachinePrecision]
code[t$95$m_, l$95$m_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 2e+149], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l$95$m), $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m * N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 2 \cdot 10^{+149}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t\_1}{1 + 2 \cdot \frac{\frac{t\_m}{l\_m}}{\frac{l\_m}{t\_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \left(\sqrt{t\_1} \cdot \frac{\sqrt{0.5}}{t\_m}\right)\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 2.0000000000000001e149Initial program 92.3%
unpow292.3%
associate-*r/87.9%
Applied egg-rr87.9%
*-commutative87.9%
*-un-lft-identity87.9%
times-frac89.7%
Applied egg-rr89.7%
associate-/l/82.3%
frac-times74.3%
*-un-lft-identity74.3%
frac-times92.3%
clear-num92.3%
un-div-inv92.3%
Applied egg-rr92.3%
if 2.0000000000000001e149 < (/.f64 t l) Initial program 51.7%
Taylor expanded in t around inf 86.6%
associate-/l*86.6%
associate-*l*86.6%
unpow286.6%
unpow286.6%
times-frac99.7%
unpow299.7%
Simplified99.7%
Final simplification93.4%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* t_m (/ (sqrt 2.0) l_m))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, (t_m * (sqrt(2.0) / l_m)))));
}
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, (t_m * (Math.sqrt(2.0) / l_m)))));
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, (t_m * (math.sqrt(2.0) / l_m)))))
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(t_m * Float64(sqrt(2.0) / l_m))))) end
t_m = abs(t); l_m = abs(l); function tmp = code(t_m, l_m, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, (t_m * (sqrt(2.0) / l_m))))); end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, 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[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, t\_m \cdot \frac{\sqrt{2}}{l\_m}\right)}\right)
\end{array}
Initial program 86.3%
sqrt-div86.2%
div-inv86.2%
add-sqr-sqrt86.2%
hypot-1-def86.2%
*-commutative86.2%
sqrt-prod86.2%
unpow286.2%
sqrt-prod58.1%
add-sqr-sqrt98.5%
Applied egg-rr98.5%
associate-*r/98.5%
*-rgt-identity98.5%
associate-*l/98.4%
associate-/l*98.5%
Simplified98.5%
Final simplification98.5%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 2e+135)
(asin
(sqrt
(/
(- 1.0 (pow (/ Om Omc) 2.0))
(+ 1.0 (* 2.0 (/ (/ t_m l_m) (/ l_m t_m)))))))
(asin (/ l_m (* t_m (sqrt 2.0))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e+135) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l_m) / (l_m / t_m)))))));
} else {
tmp = asin((l_m / (t_m * sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 2d+135) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t_m / l_m) / (l_m / t_m)))))))
else
tmp = asin((l_m / (t_m * sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e+135) {
tmp = Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l_m) / (l_m / t_m)))))));
} else {
tmp = Math.asin((l_m / (t_m * Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 2e+135: tmp = math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l_m) / (l_m / t_m))))))) else: tmp = math.asin((l_m / (t_m * math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 2e+135) tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l_m) / Float64(l_m / t_m))))))); else tmp = asin(Float64(l_m / Float64(t_m * sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 2e+135) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t_m / l_m) / (l_m / t_m))))))); else tmp = asin((l_m / (t_m * sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 2e+135], 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[(N[(t$95$m / l$95$m), $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 2 \cdot 10^{+135}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \frac{\frac{t\_m}{l\_m}}{\frac{l\_m}{t\_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 1.99999999999999992e135Initial program 92.2%
unpow292.2%
associate-*r/87.8%
Applied egg-rr87.8%
*-commutative87.8%
*-un-lft-identity87.8%
times-frac89.5%
Applied egg-rr89.5%
associate-/l/82.0%
frac-times73.9%
*-un-lft-identity73.9%
frac-times92.2%
clear-num92.2%
un-div-inv92.2%
Applied egg-rr92.2%
if 1.99999999999999992e135 < (/.f64 t l) Initial program 55.1%
sqrt-div55.1%
div-inv55.1%
add-sqr-sqrt55.1%
hypot-1-def55.1%
*-commutative55.1%
sqrt-prod55.2%
unpow255.2%
sqrt-prod98.1%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
associate-*r/98.3%
*-rgt-identity98.3%
associate-*l/98.1%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in Om around 0 98.2%
Taylor expanded in t around inf 99.5%
Final simplification93.4%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 1.1e+40)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (* (/ t_m l_m) (/ t_m l_m)))))))
(asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 1.1e+40) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l_m) * (t_m / l_m)))))));
} else {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 1.1d+40) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t_m / l_m) * (t_m / l_m)))))))
else
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 1.1e+40) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l_m) * (t_m / l_m)))))));
} else {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 1.1e+40: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l_m) * (t_m / l_m))))))) else: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 1.1e+40) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l_m) * Float64(t_m / l_m))))))); else tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 1.1e+40) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l_m) * (t_m / l_m))))))); else tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 1.1e+40], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \left(\frac{t\_m}{l\_m} \cdot \frac{t\_m}{l\_m}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 1.0999999999999999e40Initial program 91.4%
unpow291.4%
frac-2neg91.4%
frac-times77.0%
Applied egg-rr77.0%
unpow274.1%
clear-num74.1%
un-div-inv74.1%
Applied egg-rr77.0%
times-frac91.4%
frac-2neg91.4%
Applied egg-rr91.4%
if 1.0999999999999999e40 < (/.f64 t l) Initial program 70.6%
sqrt-div70.5%
div-inv70.5%
add-sqr-sqrt70.5%
hypot-1-def70.5%
*-commutative70.5%
sqrt-prod70.6%
unpow270.6%
sqrt-prod98.3%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
associate-*r/98.6%
*-rgt-identity98.6%
associate-*l/98.4%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.6%
Taylor expanded in t around inf 99.4%
*-un-lft-identity99.4%
times-frac99.4%
Applied egg-rr99.4%
Final simplification93.3%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 1.1e+40)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ (* t_m (/ t_m l_m)) l_m))))))
(asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 1.1e+40) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 1.1d+40) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t_m * (t_m / l_m)) / l_m))))))
else
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 1.1e+40) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 1.1e+40: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))) else: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 1.1e+40) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l_m)) / l_m)))))); else tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 1.1e+40) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))); else tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 1.1e+40], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{t\_m \cdot \frac{t\_m}{l\_m}}{l\_m}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 1.0999999999999999e40Initial program 91.4%
unpow291.4%
associate-*r/88.4%
Applied egg-rr88.4%
unpow274.1%
clear-num74.1%
un-div-inv74.1%
Applied egg-rr88.4%
if 1.0999999999999999e40 < (/.f64 t l) Initial program 70.6%
sqrt-div70.5%
div-inv70.5%
add-sqr-sqrt70.5%
hypot-1-def70.5%
*-commutative70.5%
sqrt-prod70.6%
unpow270.6%
sqrt-prod98.3%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
associate-*r/98.6%
*-rgt-identity98.6%
associate-*l/98.4%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.6%
Taylor expanded in t around inf 99.4%
*-un-lft-identity99.4%
times-frac99.4%
Applied egg-rr99.4%
Final simplification91.1%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= (/ t_m l_m) 2e-5) (+ (+ 1.0 (asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))) -1.0) (asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e-5) {
tmp = (1.0 + asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))))) + -1.0;
} else {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 2d-5) then
tmp = (1.0d0 + asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))) + (-1.0d0)
else
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e-5) {
tmp = (1.0 + Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))))) + -1.0;
} else {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 2e-5: tmp = (1.0 + math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))))) + -1.0 else: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 2e-5) tmp = Float64(Float64(1.0 + asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))))) + -1.0); else tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 2e-5) tmp = (1.0 + asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))))) + -1.0; else tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 2e-5], N[(N[(1.0 + N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 2 \cdot 10^{-5}:\\
\;\;\;\;\left(1 + \sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\right) + -1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 2.00000000000000016e-5Initial program 91.2%
Taylor expanded in t around 0 65.9%
unpow265.9%
unpow265.9%
times-frac75.5%
unpow275.5%
Simplified75.5%
expm1-log1p-u75.5%
expm1-undefine75.5%
Applied egg-rr75.5%
expm1-define75.5%
Simplified75.5%
expm1-undefine75.5%
log1p-undefine75.5%
rem-exp-log75.5%
Applied egg-rr75.5%
unpow275.5%
clear-num75.5%
un-div-inv75.5%
Applied egg-rr75.5%
if 2.00000000000000016e-5 < (/.f64 t l) Initial program 72.4%
sqrt-div72.3%
div-inv72.3%
add-sqr-sqrt72.3%
hypot-1-def72.3%
*-commutative72.3%
sqrt-prod72.3%
unpow272.3%
sqrt-prod98.3%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
associate-*r/98.6%
*-rgt-identity98.6%
associate-*l/98.5%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.6%
Taylor expanded in t around inf 99.4%
*-un-lft-identity99.4%
times-frac99.4%
Applied egg-rr99.4%
Final simplification81.8%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= (/ t_m l_m) 2e-5) (asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om))))) (asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e-5) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 2d-5) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e-5) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 2e-5: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 2e-5) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 2e-5) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 2e-5], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 2 \cdot 10^{-5}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 2.00000000000000016e-5Initial program 91.2%
Taylor expanded in t around 0 65.9%
unpow265.9%
unpow265.9%
times-frac75.5%
unpow275.5%
Simplified75.5%
unpow275.5%
clear-num75.5%
un-div-inv75.5%
Applied egg-rr75.5%
if 2.00000000000000016e-5 < (/.f64 t l) Initial program 72.4%
sqrt-div72.3%
div-inv72.3%
add-sqr-sqrt72.3%
hypot-1-def72.3%
*-commutative72.3%
sqrt-prod72.3%
unpow272.3%
sqrt-prod98.3%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
associate-*r/98.6%
*-rgt-identity98.6%
associate-*l/98.5%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.6%
Taylor expanded in t around inf 99.4%
*-un-lft-identity99.4%
times-frac99.4%
Applied egg-rr99.4%
Final simplification81.8%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= (/ t_m l_m) 2e-5) (asin 1.0) (asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e-5) {
tmp = asin(1.0);
} else {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l_m) <= 2d-5) then
tmp = asin(1.0d0)
else
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if ((t_m / l_m) <= 2e-5) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if (t_m / l_m) <= 2e-5: tmp = math.asin(1.0) else: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (Float64(t_m / l_m) <= 2e-5) tmp = asin(1.0); else tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if ((t_m / l_m) <= 2e-5) tmp = asin(1.0); else tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 2e-5], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 2 \cdot 10^{-5}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 2.00000000000000016e-5Initial program 91.2%
Taylor expanded in t around 0 65.9%
unpow265.9%
unpow265.9%
times-frac75.5%
unpow275.5%
Simplified75.5%
Taylor expanded in Om around 0 73.8%
if 2.00000000000000016e-5 < (/.f64 t l) Initial program 72.4%
sqrt-div72.3%
div-inv72.3%
add-sqr-sqrt72.3%
hypot-1-def72.3%
*-commutative72.3%
sqrt-prod72.3%
unpow272.3%
sqrt-prod98.3%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
associate-*r/98.6%
*-rgt-identity98.6%
associate-*l/98.5%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in Om around 0 98.6%
Taylor expanded in t around inf 99.4%
*-un-lft-identity99.4%
times-frac99.4%
Applied egg-rr99.4%
Final simplification80.5%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= t_m 4.1e+34) (asin 1.0) (asin (/ l_m (* t_m (sqrt 2.0))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 4.1e+34) {
tmp = asin(1.0);
} else {
tmp = asin((l_m / (t_m * sqrt(2.0))));
}
return tmp;
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if (t_m <= 4.1d+34) then
tmp = asin(1.0d0)
else
tmp = asin((l_m / (t_m * sqrt(2.0d0))))
end if
code = tmp
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (t_m <= 4.1e+34) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin((l_m / (t_m * Math.sqrt(2.0))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if t_m <= 4.1e+34: tmp = math.asin(1.0) else: tmp = math.asin((l_m / (t_m * math.sqrt(2.0)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (t_m <= 4.1e+34) tmp = asin(1.0); else tmp = asin(Float64(l_m / Float64(t_m * sqrt(2.0)))); end return tmp end
t_m = abs(t); l_m = abs(l); function tmp_2 = code(t_m, l_m, Om, Omc) tmp = 0.0; if (t_m <= 4.1e+34) tmp = asin(1.0); else tmp = asin((l_m / (t_m * sqrt(2.0)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := If[LessEqual[t$95$m, 4.1e+34], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 4.1 \cdot 10^{+34}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 4.0999999999999998e34Initial program 88.9%
Taylor expanded in t around 0 57.5%
unpow257.5%
unpow257.5%
times-frac66.0%
unpow266.0%
Simplified66.0%
Taylor expanded in Om around 0 64.7%
if 4.0999999999999998e34 < t Initial program 78.2%
sqrt-div78.2%
div-inv78.2%
add-sqr-sqrt78.2%
hypot-1-def78.2%
*-commutative78.2%
sqrt-prod78.1%
unpow278.1%
sqrt-prod57.9%
add-sqr-sqrt98.7%
Applied egg-rr98.7%
associate-*r/98.7%
*-rgt-identity98.7%
associate-*l/98.7%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in Om around 0 97.9%
Taylor expanded in t around inf 53.0%
Final simplification61.8%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin 1.0))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
return asin(1.0);
}
t_m = abs(t)
l_m = abs(l)
real(8) function code(t_m, l_m, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(1.0d0)
end function
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
return Math.asin(1.0);
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): return math.asin(1.0)
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(1.0) end
t_m = abs(t); l_m = abs(l); function tmp = code(t_m, l_m, Om, Omc) tmp = asin(1.0); end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} 1
\end{array}
Initial program 86.3%
Taylor expanded in t around 0 49.7%
unpow249.7%
unpow249.7%
times-frac57.0%
unpow257.0%
Simplified57.0%
Taylor expanded in Om around 0 55.8%
Final simplification55.8%
herbie shell --seed 2024040
(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)))))))