
(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 11 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 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t_m l_m) 5e+121)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (pow (/ t_m l_m) 2.0))))))
(asin (* (sqrt t_1) (/ 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 t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l_m) <= 5e+121) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * pow((t_m / l_m), 2.0))))));
} else {
tmp = asin((sqrt(t_1) * (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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
if ((t_m / l_m) <= 5d+121) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l_m) ** 2.0d0))))))
else
tmp = asin((sqrt(t_1) * (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 t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l_m) <= 5e+121) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * Math.pow((t_m / l_m), 2.0))))));
} else {
tmp = Math.asin((Math.sqrt(t_1) * (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): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t_m / l_m) <= 5e+121: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * math.pow((t_m / l_m), 2.0)))))) else: tmp = math.asin((math.sqrt(t_1) * (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) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t_m / l_m) <= 5e+121) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * (Float64(t_m / l_m) ^ 2.0)))))); else tmp = asin(Float64(sqrt(t_1) * 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) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t_m / l_m) <= 5e+121) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l_m) ^ 2.0)))))); else tmp = asin((sqrt(t_1) * (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_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 5e+121], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[Power[N[(t$95$m / l$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 5 \cdot 10^{+121}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t\_1}{1 + 2 \cdot {\left(\frac{t\_m}{l\_m}\right)}^{2}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t\_1} \cdot \frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 5.00000000000000007e121Initial program 86.8%
unpow286.8%
clear-num86.8%
un-div-inv86.8%
Applied egg-rr86.8%
if 5.00000000000000007e121 < (/.f64 t l) Initial program 60.5%
sqrt-div60.5%
add-sqr-sqrt60.5%
hypot-1-def60.5%
*-commutative60.5%
sqrt-prod60.5%
sqrt-pow198.6%
metadata-eval98.6%
pow198.6%
Applied egg-rr98.6%
Taylor expanded in t around inf 89.4%
*-commutative89.4%
unpow289.4%
unpow289.4%
times-frac99.7%
unpow299.7%
Simplified99.7%
unpow260.5%
clear-num60.5%
un-div-inv60.5%
Applied egg-rr99.7%
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 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) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t_m / l_m) * sqrt(2.0)))));
}
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 / l_m) * Math.sqrt(2.0)))));
}
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 / l_m) * math.sqrt(2.0)))))
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(Float64(t_m / l_m) * sqrt(2.0))))) 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 / l_m) * sqrt(2.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[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$95$m / l$95$m), $MachinePrecision] * N[Sqrt[2.0], $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, \frac{t\_m}{l\_m} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 82.6%
sqrt-div82.5%
add-sqr-sqrt82.5%
hypot-1-def82.5%
*-commutative82.5%
sqrt-prod82.5%
sqrt-pow197.7%
metadata-eval97.7%
pow197.7%
Applied egg-rr97.7%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t_m l_m) 1e+85)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ 1.0 (* (/ l_m t_m) (/ l_m t_m))))))))
(asin (* (sqrt t_1) (/ 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 t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l_m) <= 1e+85) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_m))))))));
} else {
tmp = asin((sqrt(t_1) * (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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) / (omc / om))
if ((t_m / l_m) <= 1d+85) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * (1.0d0 / ((l_m / t_m) * (l_m / t_m))))))))
else
tmp = asin((sqrt(t_1) * (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 t_1 = 1.0 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l_m) <= 1e+85) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_m))))))));
} else {
tmp = Math.asin((Math.sqrt(t_1) * (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): t_1 = 1.0 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t_m / l_m) <= 1e+85: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_m)))))))) else: tmp = math.asin((math.sqrt(t_1) * (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) t_1 = Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t_m / l_m) <= 1e+85) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(1.0 / Float64(Float64(l_m / t_m) * Float64(l_m / t_m)))))))); else tmp = asin(Float64(sqrt(t_1) * 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) t_1 = 1.0 - ((Om / Omc) / (Omc / Om)); tmp = 0.0; if ((t_m / l_m) <= 1e+85) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_m)))))))); else tmp = asin((sqrt(t_1) * (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_] := Block[{t$95$1 = N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 1e+85], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(1.0 / N[(N[(l$95$m / t$95$m), $MachinePrecision] * N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := 1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 10^{+85}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t\_1}{1 + 2 \cdot \frac{1}{\frac{l\_m}{t\_m} \cdot \frac{l\_m}{t\_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t\_1} \cdot \frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 1e85Initial program 86.6%
unpow286.6%
clear-num86.6%
un-div-inv86.6%
Applied egg-rr86.6%
unpow286.6%
clear-num86.6%
clear-num86.6%
frac-times86.6%
metadata-eval86.6%
Applied egg-rr86.6%
if 1e85 < (/.f64 t l) Initial program 63.1%
sqrt-div63.1%
add-sqr-sqrt63.1%
hypot-1-def63.1%
*-commutative63.1%
sqrt-prod63.1%
sqrt-pow198.7%
metadata-eval98.7%
pow198.7%
Applied egg-rr98.7%
Taylor expanded in t around inf 87.9%
*-commutative87.9%
unpow287.9%
unpow287.9%
times-frac99.6%
unpow299.6%
Simplified99.6%
unpow263.1%
clear-num63.1%
un-div-inv63.1%
Applied egg-rr99.6%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= (/ t_m l_m) 2e+34)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (* t_m (/ t_m l_m)) l_m))))))
(asin (* (sqrt t_1) (* l_m (/ (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 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l_m) <= 2e+34) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = asin((sqrt(t_1) * (l_m * (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) / (omc / om))
if ((t_m / l_m) <= 2d+34) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m * (t_m / l_m)) / l_m))))))
else
tmp = asin((sqrt(t_1) * (l_m * (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 - ((Om / Omc) / (Omc / Om));
double tmp;
if ((t_m / l_m) <= 2e+34) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m))))));
} else {
tmp = Math.asin((Math.sqrt(t_1) * (l_m * (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 - ((Om / Omc) / (Omc / Om)) tmp = 0 if (t_m / l_m) <= 2e+34: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))) else: tmp = math.asin((math.sqrt(t_1) * (l_m * (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(Float64(Om / Omc) / Float64(Omc / Om))) tmp = 0.0 if (Float64(t_m / l_m) <= 2e+34) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l_m)) / l_m)))))); else tmp = asin(Float64(sqrt(t_1) * Float64(l_m * 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) / (Omc / Om)); tmp = 0.0; if ((t_m / l_m) <= 2e+34) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m * (t_m / l_m)) / l_m)))))); else tmp = asin((sqrt(t_1) * (l_m * (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[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 2e+34], N[ArcSin[N[Sqrt[N[(t$95$1 / 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[Sqrt[t$95$1], $MachinePrecision] * N[(l$95$m * 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 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 2 \cdot 10^{+34}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t\_1}{1 + 2 \cdot \frac{t\_m \cdot \frac{t\_m}{l\_m}}{l\_m}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t\_1} \cdot \left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right)\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 1.99999999999999989e34Initial program 86.0%
unpow286.0%
clear-num86.0%
un-div-inv86.0%
Applied egg-rr86.0%
unpow286.0%
associate-*r/84.5%
Applied egg-rr84.5%
if 1.99999999999999989e34 < (/.f64 t l) Initial program 69.9%
Taylor expanded in t around inf 86.1%
*-commutative86.1%
unpow286.1%
unpow286.1%
times-frac99.5%
unpow299.5%
associate-/l*99.5%
Simplified99.5%
unpow269.9%
clear-num69.9%
un-div-inv69.9%
Applied egg-rr99.5%
Final simplification87.7%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 5e+80)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ 1.0 (* (/ l_m t_m) (/ l_m t_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) <= 5e+80) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_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) <= 5d+80) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * (1.0d0 / ((l_m / t_m) * (l_m / t_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) <= 5e+80) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_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) <= 5e+80: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_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) <= 5e+80) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(1.0 / Float64(Float64(l_m / t_m) * Float64(l_m / t_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) <= 5e+80) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l_m / t_m) * (l_m / t_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], 5e+80], 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[(1.0 / N[(N[(l$95$m / t$95$m), $MachinePrecision] * N[(l$95$m / t$95$m), $MachinePrecision]), $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 5 \cdot 10^{+80}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{1}{\frac{l\_m}{t\_m} \cdot \frac{l\_m}{t\_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) < 4.99999999999999961e80Initial program 86.5%
unpow286.5%
clear-num86.5%
un-div-inv86.5%
Applied egg-rr86.5%
unpow286.5%
clear-num86.5%
clear-num86.4%
frac-times86.4%
metadata-eval86.4%
Applied egg-rr86.4%
if 4.99999999999999961e80 < (/.f64 t l) Initial program 64.7%
sqrt-div64.8%
add-sqr-sqrt64.8%
hypot-1-def64.8%
*-commutative64.8%
sqrt-prod64.7%
sqrt-pow198.8%
metadata-eval98.8%
pow198.8%
Applied egg-rr98.8%
Taylor expanded in Om around 0 97.1%
Taylor expanded in t around inf 98.1%
*-un-lft-identity98.1%
times-frac98.1%
Applied egg-rr98.1%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= l_m 5.1e-154)
(asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ t_m (* l_m (/ l_m t_m))))))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double tmp;
if (l_m <= 5.1e-154) {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
} else {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t_m / (l_m * (l_m / 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) :: tmp
if (l_m <= 5.1d-154) then
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
else
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * (t_m / (l_m * (l_m / 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 tmp;
if (l_m <= 5.1e-154) {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
} else {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t_m / (l_m * (l_m / t_m))))))));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): tmp = 0 if l_m <= 5.1e-154: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) else: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t_m / (l_m * (l_m / t_m)))))))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (l_m <= 5.1e-154) tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); else tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(t_m / Float64(l_m * Float64(l_m / t_m)))))))); 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 (l_m <= 5.1e-154) tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); else tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t_m / (l_m * (l_m / 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_] := If[LessEqual[l$95$m, 5.1e-154], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 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[(t$95$m / N[(l$95$m * N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.1 \cdot 10^{-154}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{t\_m}{l\_m \cdot \frac{l\_m}{t\_m}}}}\right)\\
\end{array}
\end{array}
if l < 5.0999999999999998e-154Initial program 80.9%
sqrt-div80.8%
add-sqr-sqrt80.8%
hypot-1-def80.8%
*-commutative80.8%
sqrt-prod80.8%
sqrt-pow197.4%
metadata-eval97.4%
pow197.4%
Applied egg-rr97.4%
Taylor expanded in Om around 0 95.9%
Taylor expanded in t around inf 35.6%
*-un-lft-identity35.6%
times-frac35.6%
Applied egg-rr35.6%
if 5.0999999999999998e-154 < l Initial program 85.7%
unpow285.7%
clear-num85.7%
un-div-inv85.7%
Applied egg-rr85.7%
unpow285.7%
clear-num85.8%
frac-times85.7%
*-un-lft-identity85.7%
Applied egg-rr85.7%
Final simplification52.8%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 1.7e-34)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (or (<= t_m 2.4) (not (<= t_m 330000000.0)))
(asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))
(asin 1.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 <= 1.7e-34) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if ((t_m <= 2.4) || !(t_m <= 330000000.0)) {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
} else {
tmp = asin(1.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 <= 1.7d-34) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else if ((t_m <= 2.4d0) .or. (.not. (t_m <= 330000000.0d0))) then
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
else
tmp = asin(1.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 <= 1.7e-34) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if ((t_m <= 2.4) || !(t_m <= 330000000.0)) {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
} else {
tmp = Math.asin(1.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 <= 1.7e-34: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) elif (t_m <= 2.4) or not (t_m <= 330000000.0): tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) else: tmp = math.asin(1.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 <= 1.7e-34) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); elseif ((t_m <= 2.4) || !(t_m <= 330000000.0)) tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); else tmp = asin(1.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 <= 1.7e-34) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); elseif ((t_m <= 2.4) || ~((t_m <= 330000000.0))) tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); else tmp = asin(1.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, 1.7e-34], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[t$95$m, 2.4], N[Not[LessEqual[t$95$m, 330000000.0]], $MachinePrecision]], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 1.7 \cdot 10^{-34}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{elif}\;t\_m \leq 2.4 \lor \neg \left(t\_m \leq 330000000\right):\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if t < 1.7e-34Initial program 84.7%
Taylor expanded in t around 0 53.0%
unpow253.0%
unpow253.0%
times-frac58.4%
unpow258.4%
Simplified58.4%
unpow284.7%
clear-num84.7%
un-div-inv84.7%
Applied egg-rr58.4%
if 1.7e-34 < t < 2.39999999999999991 or 3.3e8 < t Initial program 76.7%
sqrt-div76.7%
add-sqr-sqrt76.7%
hypot-1-def76.7%
*-commutative76.7%
sqrt-prod76.7%
sqrt-pow197.1%
metadata-eval97.1%
pow197.1%
Applied egg-rr97.1%
Taylor expanded in Om around 0 96.7%
Taylor expanded in t around inf 45.2%
*-un-lft-identity45.2%
times-frac45.3%
Applied egg-rr45.3%
if 2.39999999999999991 < t < 3.3e8Initial program 82.6%
Taylor expanded in t around 0 45.2%
unpow245.2%
unpow245.2%
times-frac50.4%
unpow250.4%
Simplified50.4%
Taylor expanded in Om around 0 50.0%
Final simplification54.9%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 2e-35)
(asin (+ 1.0 (* (pow (/ Om Omc) 2.0) -0.5)))
(if (or (<= t_m 0.85) (not (<= t_m 126000000.0)))
(asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))
(asin 1.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 <= 2e-35) {
tmp = asin((1.0 + (pow((Om / Omc), 2.0) * -0.5)));
} else if ((t_m <= 0.85) || !(t_m <= 126000000.0)) {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
} else {
tmp = asin(1.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 <= 2d-35) then
tmp = asin((1.0d0 + (((om / omc) ** 2.0d0) * (-0.5d0))))
else if ((t_m <= 0.85d0) .or. (.not. (t_m <= 126000000.0d0))) then
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
else
tmp = asin(1.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 <= 2e-35) {
tmp = Math.asin((1.0 + (Math.pow((Om / Omc), 2.0) * -0.5)));
} else if ((t_m <= 0.85) || !(t_m <= 126000000.0)) {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
} else {
tmp = Math.asin(1.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 <= 2e-35: tmp = math.asin((1.0 + (math.pow((Om / Omc), 2.0) * -0.5))) elif (t_m <= 0.85) or not (t_m <= 126000000.0): tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) else: tmp = math.asin(1.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 <= 2e-35) tmp = asin(Float64(1.0 + Float64((Float64(Om / Omc) ^ 2.0) * -0.5))); elseif ((t_m <= 0.85) || !(t_m <= 126000000.0)) tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); else tmp = asin(1.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 <= 2e-35) tmp = asin((1.0 + (((Om / Omc) ^ 2.0) * -0.5))); elseif ((t_m <= 0.85) || ~((t_m <= 126000000.0))) tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); else tmp = asin(1.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, 2e-35], N[ArcSin[N[(1.0 + N[(N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[t$95$m, 0.85], N[Not[LessEqual[t$95$m, 126000000.0]], $MachinePrecision]], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{-35}:\\
\;\;\;\;\sin^{-1} \left(1 + {\left(\frac{Om}{Omc}\right)}^{2} \cdot -0.5\right)\\
\mathbf{elif}\;t\_m \leq 0.85 \lor \neg \left(t\_m \leq 126000000\right):\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if t < 2.00000000000000002e-35Initial program 84.7%
Taylor expanded in t around 0 53.0%
unpow253.0%
unpow253.0%
times-frac58.4%
unpow258.4%
Simplified58.4%
Taylor expanded in Om around 0 53.0%
*-commutative53.0%
unpow253.0%
unpow253.0%
times-frac58.1%
unpow258.1%
Simplified58.1%
if 2.00000000000000002e-35 < t < 0.849999999999999978 or 1.26e8 < t Initial program 76.7%
sqrt-div76.7%
add-sqr-sqrt76.7%
hypot-1-def76.7%
*-commutative76.7%
sqrt-prod76.7%
sqrt-pow197.1%
metadata-eval97.1%
pow197.1%
Applied egg-rr97.1%
Taylor expanded in Om around 0 96.7%
Taylor expanded in t around inf 45.2%
*-un-lft-identity45.2%
times-frac45.3%
Applied egg-rr45.3%
if 0.849999999999999978 < t < 1.26e8Initial program 82.6%
Taylor expanded in t around 0 45.2%
unpow245.2%
unpow245.2%
times-frac50.4%
unpow250.4%
Simplified50.4%
Taylor expanded in Om around 0 50.0%
Final simplification54.7%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= t_m 6.5e-35) (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 <= 6.5e-35) {
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 <= 6.5d-35) 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 <= 6.5e-35) {
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 <= 6.5e-35: 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 (t_m <= 6.5e-35) 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 <= 6.5e-35) 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[t$95$m, 6.5e-35], 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}\;t\_m \leq 6.5 \cdot 10^{-35}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 6.4999999999999999e-35Initial program 84.7%
Taylor expanded in t around 0 53.0%
unpow253.0%
unpow253.0%
times-frac58.4%
unpow258.4%
Simplified58.4%
Taylor expanded in Om around 0 57.9%
if 6.4999999999999999e-35 < t Initial program 76.7%
sqrt-div76.7%
add-sqr-sqrt76.7%
hypot-1-def76.7%
*-commutative76.7%
sqrt-prod76.7%
sqrt-pow197.1%
metadata-eval97.1%
pow197.1%
Applied egg-rr97.1%
Taylor expanded in Om around 0 96.7%
Taylor expanded in t around inf 45.2%
*-un-lft-identity45.2%
times-frac45.3%
Applied egg-rr45.3%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= t_m 7.8e-35) (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 <= 7.8e-35) {
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 <= 7.8d-35) 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 <= 7.8e-35) {
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 <= 7.8e-35: 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 <= 7.8e-35) 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 <= 7.8e-35) 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, 7.8e-35], 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 7.8 \cdot 10^{-35}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 7.79999999999999961e-35Initial program 84.7%
Taylor expanded in t around 0 53.0%
unpow253.0%
unpow253.0%
times-frac58.4%
unpow258.4%
Simplified58.4%
Taylor expanded in Om around 0 57.9%
if 7.79999999999999961e-35 < t Initial program 76.7%
sqrt-div76.7%
add-sqr-sqrt76.7%
hypot-1-def76.7%
*-commutative76.7%
sqrt-prod76.7%
sqrt-pow197.1%
metadata-eval97.1%
pow197.1%
Applied egg-rr97.1%
Taylor expanded in Om around 0 96.7%
Taylor expanded in t around inf 45.2%
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 82.6%
Taylor expanded in t around 0 45.2%
unpow245.2%
unpow245.2%
times-frac50.4%
unpow250.4%
Simplified50.4%
Taylor expanded in Om around 0 50.0%
herbie shell --seed 2024107
(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)))))))