
(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 12 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
(if (<= (/ t_m l_m) 2e+147)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 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+147) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (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+147) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (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+147) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (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+147: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (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+147) 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(l_m / t_m))))))); else tmp = asin(Float64(Float64(l_m / 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+147) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (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+147], 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[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] / N[Sqrt[2.0], $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^{+147}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{\frac{t\_m}{l\_m}}{\frac{l\_m}{t\_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{l\_m}{t\_m}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 2e147Initial program 93.0%
unpow293.0%
clear-num93.1%
un-div-inv93.1%
Applied egg-rr93.1%
unpow293.1%
clear-num93.1%
un-div-inv93.1%
Applied egg-rr93.1%
if 2e147 < (/.f64 t l) Initial program 40.8%
sqrt-div40.8%
div-inv40.8%
add-sqr-sqrt40.8%
hypot-1-def40.8%
*-commutative40.8%
sqrt-prod40.8%
sqrt-pow198.4%
metadata-eval98.4%
pow198.4%
Applied egg-rr98.4%
associate-*r/98.4%
*-rgt-identity98.4%
Simplified98.4%
Taylor expanded in Om around 0 98.4%
Taylor expanded in t around inf 99.7%
associate-/r*99.8%
Simplified99.8%
Final simplification94.2%
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 84.5%
sqrt-div84.5%
div-inv84.5%
add-sqr-sqrt84.5%
hypot-1-def84.5%
*-commutative84.5%
sqrt-prod84.4%
sqrt-pow198.9%
metadata-eval98.9%
pow198.9%
Applied egg-rr98.9%
associate-*r/98.9%
*-rgt-identity98.9%
Simplified98.9%
Final simplification98.9%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin (/ 1.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((1.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((1.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((1.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(1.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((1.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[(1.0 / 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{1}{\mathsf{hypot}\left(1, t\_m \cdot \frac{\sqrt{2}}{l\_m}\right)}\right)
\end{array}
Initial program 84.5%
clear-num84.5%
sqrt-div84.5%
metadata-eval84.5%
+-commutative84.5%
fma-define84.5%
Applied egg-rr84.5%
Taylor expanded in Om around 0 68.4%
metadata-eval68.4%
associate-*r/68.4%
rem-square-sqrt68.3%
unpow268.3%
*-commutative68.3%
associate-/l*67.9%
unpow267.9%
unpow267.9%
unpow267.9%
times-frac68.0%
swap-sqr83.4%
associate-/l*83.3%
associate-/l*83.4%
hypot-undefine97.9%
associate-/l*97.9%
Simplified97.9%
Final simplification97.9%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin (/ 1.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((1.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((1.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((1.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(1.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((1.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[(1.0 / 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{1}{\mathsf{hypot}\left(1, \frac{t\_m}{l\_m} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 84.5%
sqrt-div84.5%
div-inv84.5%
add-sqr-sqrt84.5%
hypot-1-def84.5%
*-commutative84.5%
sqrt-prod84.4%
sqrt-pow198.9%
metadata-eval98.9%
pow198.9%
Applied egg-rr98.9%
associate-*r/98.9%
*-rgt-identity98.9%
Simplified98.9%
Taylor expanded in Om around 0 97.9%
Final simplification97.9%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 1e+140)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (* (/ t_m l_m) (/ t_m l_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) <= 1e+140) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l_m) * (t_m / l_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) <= 1d+140) 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(((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) <= 1e+140) {
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(((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) <= 1e+140: 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(((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) <= 1e+140) 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(l_m / 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) <= 1e+140) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t_m / l_m) * (t_m / l_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], 1e+140], 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[(l$95$m / t$95$m), $MachinePrecision] / N[Sqrt[2.0], $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 10^{+140}:\\
\;\;\;\;\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{\frac{l\_m}{t\_m}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 1.00000000000000006e140Initial program 93.0%
unpow293.0%
Applied egg-rr93.0%
unpow293.1%
clear-num93.1%
un-div-inv93.1%
Applied egg-rr93.0%
if 1.00000000000000006e140 < (/.f64 t l) Initial program 42.1%
sqrt-div42.1%
div-inv42.1%
add-sqr-sqrt42.1%
hypot-1-def42.1%
*-commutative42.1%
sqrt-prod42.2%
sqrt-pow198.5%
metadata-eval98.5%
pow198.5%
Applied egg-rr98.5%
associate-*r/98.5%
*-rgt-identity98.5%
Simplified98.5%
Taylor expanded in Om around 0 98.5%
Taylor expanded in t around inf 99.7%
associate-/r*99.8%
Simplified99.8%
Final simplification94.2%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (or (<= t_m 7.5e-57) (and (not (<= t_m 3.6e-25)) (<= t_m 0.085))) (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.5e-57) || (!(t_m <= 3.6e-25) && (t_m <= 0.085))) {
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.5d-57) .or. (.not. (t_m <= 3.6d-25)) .and. (t_m <= 0.085d0)) 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.5e-57) || (!(t_m <= 3.6e-25) && (t_m <= 0.085))) {
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.5e-57) or (not (t_m <= 3.6e-25) and (t_m <= 0.085)): 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.5e-57) || (!(t_m <= 3.6e-25) && (t_m <= 0.085))) 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.5e-57) || (~((t_m <= 3.6e-25)) && (t_m <= 0.085))) 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[Or[LessEqual[t$95$m, 7.5e-57], And[N[Not[LessEqual[t$95$m, 3.6e-25]], $MachinePrecision], LessEqual[t$95$m, 0.085]]], 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.5 \cdot 10^{-57} \lor \neg \left(t\_m \leq 3.6 \cdot 10^{-25}\right) \land t\_m \leq 0.085:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 7.49999999999999973e-57 or 3.5999999999999999e-25 < t < 0.0850000000000000061Initial program 87.1%
Taylor expanded in t around 0 53.6%
unpow253.6%
unpow253.6%
times-frac58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in Om around 0 58.0%
if 7.49999999999999973e-57 < t < 3.5999999999999999e-25 or 0.0850000000000000061 < t Initial program 76.1%
sqrt-div76.1%
div-inv76.1%
add-sqr-sqrt76.1%
hypot-1-def76.1%
*-commutative76.1%
sqrt-prod76.1%
sqrt-pow199.2%
metadata-eval99.2%
pow199.2%
Applied egg-rr99.2%
associate-*r/99.2%
*-rgt-identity99.2%
Simplified99.2%
Taylor expanded in Om around 0 98.1%
Taylor expanded in t around inf 56.1%
Final simplification57.5%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 4.5e-56)
(asin 1.0)
(if (<= t_m 2.45e-27)
(asin (/ l_m (* t_m (sqrt 2.0))))
(if (<= t_m 2.5) (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.5e-56) {
tmp = asin(1.0);
} else if (t_m <= 2.45e-27) {
tmp = asin((l_m / (t_m * sqrt(2.0))));
} else if (t_m <= 2.5) {
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.5d-56) then
tmp = asin(1.0d0)
else if (t_m <= 2.45d-27) then
tmp = asin((l_m / (t_m * sqrt(2.0d0))))
else if (t_m <= 2.5d0) 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.5e-56) {
tmp = Math.asin(1.0);
} else if (t_m <= 2.45e-27) {
tmp = Math.asin((l_m / (t_m * Math.sqrt(2.0))));
} else if (t_m <= 2.5) {
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.5e-56: tmp = math.asin(1.0) elif t_m <= 2.45e-27: tmp = math.asin((l_m / (t_m * math.sqrt(2.0)))) elif t_m <= 2.5: 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.5e-56) tmp = asin(1.0); elseif (t_m <= 2.45e-27) tmp = asin(Float64(l_m / Float64(t_m * sqrt(2.0)))); elseif (t_m <= 2.5) tmp = asin(1.0); else tmp = asin(Float64(Float64(l_m / 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.5e-56) tmp = asin(1.0); elseif (t_m <= 2.45e-27) tmp = asin((l_m / (t_m * sqrt(2.0)))); elseif (t_m <= 2.5) 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.5e-56], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[t$95$m, 2.45e-27], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 2.5], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] / N[Sqrt[2.0], $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.5 \cdot 10^{-56}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;t\_m \leq 2.45 \cdot 10^{-27}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\mathbf{elif}\;t\_m \leq 2.5:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{l\_m}{t\_m}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 4.5000000000000001e-56 or 2.44999999999999988e-27 < t < 2.5Initial program 87.1%
Taylor expanded in t around 0 53.6%
unpow253.6%
unpow253.6%
times-frac58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in Om around 0 58.0%
if 4.5000000000000001e-56 < t < 2.44999999999999988e-27Initial program 71.5%
sqrt-div71.5%
div-inv71.5%
add-sqr-sqrt71.5%
hypot-1-def71.5%
*-commutative71.5%
sqrt-prod71.5%
sqrt-pow199.7%
metadata-eval99.7%
pow199.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.7%
Taylor expanded in t around inf 50.0%
if 2.5 < t Initial program 77.0%
sqrt-div77.0%
div-inv77.0%
add-sqr-sqrt77.0%
hypot-1-def77.0%
*-commutative77.0%
sqrt-prod77.0%
sqrt-pow199.1%
metadata-eval99.1%
pow199.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
Simplified99.1%
Taylor expanded in Om around 0 97.8%
Taylor expanded in t around inf 57.2%
associate-/r*57.3%
Simplified57.3%
Final simplification57.5%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 1.15e-55)
(asin 1.0)
(if (<= t_m 1.8e-25)
(asin (* l_m (/ 1.0 (* t_m (sqrt 2.0)))))
(if (<= t_m 0.19) (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 <= 1.15e-55) {
tmp = asin(1.0);
} else if (t_m <= 1.8e-25) {
tmp = asin((l_m * (1.0 / (t_m * sqrt(2.0)))));
} else if (t_m <= 0.19) {
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 <= 1.15d-55) then
tmp = asin(1.0d0)
else if (t_m <= 1.8d-25) then
tmp = asin((l_m * (1.0d0 / (t_m * sqrt(2.0d0)))))
else if (t_m <= 0.19d0) 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 <= 1.15e-55) {
tmp = Math.asin(1.0);
} else if (t_m <= 1.8e-25) {
tmp = Math.asin((l_m * (1.0 / (t_m * Math.sqrt(2.0)))));
} else if (t_m <= 0.19) {
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 <= 1.15e-55: tmp = math.asin(1.0) elif t_m <= 1.8e-25: tmp = math.asin((l_m * (1.0 / (t_m * math.sqrt(2.0))))) elif t_m <= 0.19: 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 <= 1.15e-55) tmp = asin(1.0); elseif (t_m <= 1.8e-25) tmp = asin(Float64(l_m * Float64(1.0 / Float64(t_m * sqrt(2.0))))); elseif (t_m <= 0.19) tmp = asin(1.0); else tmp = asin(Float64(Float64(l_m / 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 <= 1.15e-55) tmp = asin(1.0); elseif (t_m <= 1.8e-25) tmp = asin((l_m * (1.0 / (t_m * sqrt(2.0))))); elseif (t_m <= 0.19) 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, 1.15e-55], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[t$95$m, 1.8e-25], N[ArcSin[N[(l$95$m * N[(1.0 / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 0.19], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 1.15 \cdot 10^{-55}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;t\_m \leq 1.8 \cdot 10^{-25}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \frac{1}{t\_m \cdot \sqrt{2}}\right)\\
\mathbf{elif}\;t\_m \leq 0.19:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{l\_m}{t\_m}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 1.15000000000000006e-55 or 1.8e-25 < t < 0.19Initial program 87.1%
Taylor expanded in t around 0 53.6%
unpow253.6%
unpow253.6%
times-frac58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in Om around 0 58.0%
if 1.15000000000000006e-55 < t < 1.8e-25Initial program 71.5%
sqrt-div71.5%
div-inv71.5%
add-sqr-sqrt71.5%
hypot-1-def71.5%
*-commutative71.5%
sqrt-prod71.5%
sqrt-pow199.7%
metadata-eval99.7%
pow199.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.7%
Taylor expanded in t around inf 50.0%
div-inv50.0%
Applied egg-rr50.0%
if 0.19 < t Initial program 77.0%
sqrt-div77.0%
div-inv77.0%
add-sqr-sqrt77.0%
hypot-1-def77.0%
*-commutative77.0%
sqrt-prod77.0%
sqrt-pow199.1%
metadata-eval99.1%
pow199.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
Simplified99.1%
Taylor expanded in Om around 0 97.8%
Taylor expanded in t around inf 57.2%
associate-/r*57.3%
Simplified57.3%
Final simplification57.5%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 1.35e-55)
(asin 1.0)
(if (<= t_m 1.48e-27)
(asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))
(if (<= t_m 1.7) (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 <= 1.35e-55) {
tmp = asin(1.0);
} else if (t_m <= 1.48e-27) {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
} else if (t_m <= 1.7) {
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 <= 1.35d-55) then
tmp = asin(1.0d0)
else if (t_m <= 1.48d-27) then
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
else if (t_m <= 1.7d0) 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 <= 1.35e-55) {
tmp = Math.asin(1.0);
} else if (t_m <= 1.48e-27) {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
} else if (t_m <= 1.7) {
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 <= 1.35e-55: tmp = math.asin(1.0) elif t_m <= 1.48e-27: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) elif t_m <= 1.7: 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 <= 1.35e-55) tmp = asin(1.0); elseif (t_m <= 1.48e-27) tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); elseif (t_m <= 1.7) tmp = asin(1.0); else tmp = asin(Float64(Float64(l_m / 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 <= 1.35e-55) tmp = asin(1.0); elseif (t_m <= 1.48e-27) tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); elseif (t_m <= 1.7) 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, 1.35e-55], N[ArcSin[1.0], $MachinePrecision], If[LessEqual[t$95$m, 1.48e-27], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 1.7], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 1.35 \cdot 10^{-55}:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{elif}\;t\_m \leq 1.48 \cdot 10^{-27}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\mathbf{elif}\;t\_m \leq 1.7:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{l\_m}{t\_m}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 1.35000000000000002e-55 or 1.48000000000000008e-27 < t < 1.69999999999999996Initial program 87.1%
Taylor expanded in t around 0 53.6%
unpow253.6%
unpow253.6%
times-frac58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in Om around 0 58.0%
if 1.35000000000000002e-55 < t < 1.48000000000000008e-27Initial program 71.5%
sqrt-div71.5%
div-inv71.5%
add-sqr-sqrt71.5%
hypot-1-def71.5%
*-commutative71.5%
sqrt-prod71.5%
sqrt-pow199.7%
metadata-eval99.7%
pow199.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.7%
Taylor expanded in t around inf 50.0%
*-un-lft-identity50.0%
times-frac50.5%
Applied egg-rr50.5%
if 1.69999999999999996 < t Initial program 77.0%
sqrt-div77.0%
div-inv77.0%
add-sqr-sqrt77.0%
hypot-1-def77.0%
*-commutative77.0%
sqrt-prod77.0%
sqrt-pow199.1%
metadata-eval99.1%
pow199.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
Simplified99.1%
Taylor expanded in Om around 0 97.8%
Taylor expanded in t around inf 57.2%
associate-/r*57.3%
Simplified57.3%
Final simplification57.5%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 5.5e-56)
(asin (+ 1.0 (* (pow (/ Om Omc) 2.0) -0.5)))
(if (<= t_m 6.2e-26)
(asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))
(if (<= t_m 13.8) (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 <= 5.5e-56) {
tmp = asin((1.0 + (pow((Om / Omc), 2.0) * -0.5)));
} else if (t_m <= 6.2e-26) {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
} else if (t_m <= 13.8) {
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 <= 5.5d-56) then
tmp = asin((1.0d0 + (((om / omc) ** 2.0d0) * (-0.5d0))))
else if (t_m <= 6.2d-26) then
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
else if (t_m <= 13.8d0) 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 <= 5.5e-56) {
tmp = Math.asin((1.0 + (Math.pow((Om / Omc), 2.0) * -0.5)));
} else if (t_m <= 6.2e-26) {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
} else if (t_m <= 13.8) {
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 <= 5.5e-56: tmp = math.asin((1.0 + (math.pow((Om / Omc), 2.0) * -0.5))) elif t_m <= 6.2e-26: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) elif t_m <= 13.8: 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 <= 5.5e-56) tmp = asin(Float64(1.0 + Float64((Float64(Om / Omc) ^ 2.0) * -0.5))); elseif (t_m <= 6.2e-26) tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); elseif (t_m <= 13.8) tmp = asin(1.0); else tmp = asin(Float64(Float64(l_m / 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 <= 5.5e-56) tmp = asin((1.0 + (((Om / Omc) ^ 2.0) * -0.5))); elseif (t_m <= 6.2e-26) tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); elseif (t_m <= 13.8) 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, 5.5e-56], N[ArcSin[N[(1.0 + N[(N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 6.2e-26], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 13.8], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-56}:\\
\;\;\;\;\sin^{-1} \left(1 + {\left(\frac{Om}{Omc}\right)}^{2} \cdot -0.5\right)\\
\mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{-26}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\mathbf{elif}\;t\_m \leq 13.8:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{l\_m}{t\_m}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 5.4999999999999999e-56Initial program 86.9%
Taylor expanded in t around 0 53.4%
unpow253.4%
unpow253.4%
times-frac58.1%
unpow258.1%
Simplified58.1%
Taylor expanded in Om around 0 53.2%
*-commutative53.2%
unpow253.2%
unpow253.2%
times-frac57.7%
unpow257.7%
Simplified57.7%
if 5.4999999999999999e-56 < t < 6.19999999999999966e-26Initial program 71.5%
sqrt-div71.5%
div-inv71.5%
add-sqr-sqrt71.5%
hypot-1-def71.5%
*-commutative71.5%
sqrt-prod71.5%
sqrt-pow199.7%
metadata-eval99.7%
pow199.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.7%
Taylor expanded in t around inf 50.0%
*-un-lft-identity50.0%
times-frac50.5%
Applied egg-rr50.5%
if 6.19999999999999966e-26 < t < 13.800000000000001Initial program 100.0%
Taylor expanded in t around 0 66.7%
unpow266.7%
unpow266.7%
times-frac100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in Om around 0 100.0%
if 13.800000000000001 < t Initial program 77.0%
sqrt-div77.0%
div-inv77.0%
add-sqr-sqrt77.0%
hypot-1-def77.0%
*-commutative77.0%
sqrt-prod77.0%
sqrt-pow199.1%
metadata-eval99.1%
pow199.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
Simplified99.1%
Taylor expanded in Om around 0 97.8%
Taylor expanded in t around inf 57.2%
associate-/r*57.3%
Simplified57.3%
Final simplification57.9%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= t_m 7e-56)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(if (<= t_m 2.85e-25)
(asin (* (/ 1.0 t_m) (/ l_m (sqrt 2.0))))
(if (<= t_m 35.0) (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 <= 7e-56) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if (t_m <= 2.85e-25) {
tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0))));
} else if (t_m <= 35.0) {
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 <= 7d-56) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else if (t_m <= 2.85d-25) then
tmp = asin(((1.0d0 / t_m) * (l_m / sqrt(2.0d0))))
else if (t_m <= 35.0d0) 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 <= 7e-56) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else if (t_m <= 2.85e-25) {
tmp = Math.asin(((1.0 / t_m) * (l_m / Math.sqrt(2.0))));
} else if (t_m <= 35.0) {
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 <= 7e-56: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) elif t_m <= 2.85e-25: tmp = math.asin(((1.0 / t_m) * (l_m / math.sqrt(2.0)))) elif t_m <= 35.0: 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 <= 7e-56) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); elseif (t_m <= 2.85e-25) tmp = asin(Float64(Float64(1.0 / t_m) * Float64(l_m / sqrt(2.0)))); elseif (t_m <= 35.0) tmp = asin(1.0); else tmp = asin(Float64(Float64(l_m / 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 <= 7e-56) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); elseif (t_m <= 2.85e-25) tmp = asin(((1.0 / t_m) * (l_m / sqrt(2.0)))); elseif (t_m <= 35.0) 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, 7e-56], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 2.85e-25], N[ArcSin[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[(l$95$m / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 35.0], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] / N[Sqrt[2.0], $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 \cdot 10^{-56}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{elif}\;t\_m \leq 2.85 \cdot 10^{-25}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{t\_m} \cdot \frac{l\_m}{\sqrt{2}}\right)\\
\mathbf{elif}\;t\_m \leq 35:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{l\_m}{t\_m}}{\sqrt{2}}\right)\\
\end{array}
\end{array}
if t < 6.9999999999999996e-56Initial program 86.9%
Taylor expanded in t around 0 53.4%
unpow253.4%
unpow253.4%
times-frac58.1%
unpow258.1%
Simplified58.1%
unpow286.9%
clear-num86.9%
un-div-inv86.9%
Applied egg-rr58.1%
if 6.9999999999999996e-56 < t < 2.8500000000000002e-25Initial program 71.5%
sqrt-div71.5%
div-inv71.5%
add-sqr-sqrt71.5%
hypot-1-def71.5%
*-commutative71.5%
sqrt-prod71.5%
sqrt-pow199.7%
metadata-eval99.7%
pow199.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.7%
Taylor expanded in t around inf 50.0%
*-un-lft-identity50.0%
times-frac50.5%
Applied egg-rr50.5%
if 2.8500000000000002e-25 < t < 35Initial program 100.0%
Taylor expanded in t around 0 66.7%
unpow266.7%
unpow266.7%
times-frac100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in Om around 0 100.0%
if 35 < t Initial program 77.0%
sqrt-div77.0%
div-inv77.0%
add-sqr-sqrt77.0%
hypot-1-def77.0%
*-commutative77.0%
sqrt-prod77.0%
sqrt-pow199.1%
metadata-eval99.1%
pow199.1%
Applied egg-rr99.1%
associate-*r/99.1%
*-rgt-identity99.1%
Simplified99.1%
Taylor expanded in Om around 0 97.8%
Taylor expanded in t around inf 57.2%
associate-/r*57.3%
Simplified57.3%
Final simplification58.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 84.5%
Taylor expanded in t around 0 46.3%
unpow246.3%
unpow246.3%
times-frac50.6%
unpow250.6%
Simplified50.6%
Taylor expanded in Om around 0 49.8%
Final simplification49.8%
herbie shell --seed 2024110
(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)))))))