
(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 9 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) 5e+141)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ (/ t_m l_m) (/ l_m t_m)))))))
(asin (/ (* l_m (sqrt (* (- 1.0 (/ Om (/ Omc (/ Om Omc)))) 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 tmp;
if ((t_m / l_m) <= 5e+141) {
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 * sqrt(((1.0 - (Om / (Omc / (Om / Omc)))) * 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) :: tmp
if ((t_m / l_m) <= 5d+141) 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 * sqrt(((1.0d0 - (om / (omc / (om / omc)))) * 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 tmp;
if ((t_m / l_m) <= 5e+141) {
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 * Math.sqrt(((1.0 - (Om / (Omc / (Om / Omc)))) * 0.5))) / 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 (t_m / l_m) <= 5e+141: 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 * math.sqrt(((1.0 - (Om / (Omc / (Om / Omc)))) * 0.5))) / t_m)) 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+141) 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 * sqrt(Float64(Float64(1.0 - Float64(Om / Float64(Omc / Float64(Om / Omc)))) * 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) tmp = 0.0; if ((t_m / l_m) <= 5e+141) 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 * sqrt(((1.0 - (Om / (Omc / (Om / Omc)))) * 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_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 5e+141], 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 * N[Sqrt[N[(N[(1.0 - N[(Om / N[(Omc / N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$m), $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^{+141}:\\
\;\;\;\;\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{l\_m \cdot \sqrt{\left(1 - \frac{Om}{\frac{Omc}{\frac{Om}{Omc}}}\right) \cdot 0.5}}{t\_m}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 5.00000000000000025e141Initial program 90.4%
unpow2N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6490.4%
Applied egg-rr90.4%
unpow2N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6490.4%
Applied egg-rr90.4%
if 5.00000000000000025e141 < (/.f64 t l) Initial program 43.9%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified40.6%
Taylor expanded in t around inf
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6433.0%
Simplified33.0%
asin-lowering-asin.f64N/A
associate-*r/N/A
sqrt-divN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
/-lowering-/.f64N/A
Applied egg-rr99.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) 5e+14) (asin (pow (+ 1.0 (* 2.0 (/ (/ t_m (/ l_m t_m)) l_m))) -0.5)) (asin (* (/ l_m t_m) (sqrt (* (- 1.0 (/ (/ Om Omc) (/ Omc Om))) 0.5))))))
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+14) {
tmp = asin(pow((1.0 + (2.0 * ((t_m / (l_m / t_m)) / l_m))), -0.5));
} else {
tmp = asin(((l_m / t_m) * sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) * 0.5))));
}
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+14) then
tmp = asin(((1.0d0 + (2.0d0 * ((t_m / (l_m / t_m)) / l_m))) ** (-0.5d0)))
else
tmp = asin(((l_m / t_m) * sqrt(((1.0d0 - ((om / omc) / (omc / om))) * 0.5d0))))
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+14) {
tmp = Math.asin(Math.pow((1.0 + (2.0 * ((t_m / (l_m / t_m)) / l_m))), -0.5));
} else {
tmp = Math.asin(((l_m / t_m) * Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) * 0.5))));
}
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+14: tmp = math.asin(math.pow((1.0 + (2.0 * ((t_m / (l_m / t_m)) / l_m))), -0.5)) else: tmp = math.asin(((l_m / t_m) * math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) * 0.5)))) 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+14) tmp = asin((Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / Float64(l_m / t_m)) / l_m))) ^ -0.5)); else tmp = asin(Float64(Float64(l_m / t_m) * sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) * 0.5)))); 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+14) tmp = asin(((1.0 + (2.0 * ((t_m / (l_m / t_m)) / l_m))) ^ -0.5)); else tmp = asin(((l_m / t_m) * sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) * 0.5)))); 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+14], N[ArcSin[N[Power[N[(1.0 + N[(2.0 * N[(N[(t$95$m / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] * N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $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^{+14}:\\
\;\;\;\;\sin^{-1} \left({\left(1 + 2 \cdot \frac{\frac{t\_m}{\frac{l\_m}{t\_m}}}{l\_m}\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m} \cdot \sqrt{\left(1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\right) \cdot 0.5}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 5e14Initial program 89.3%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified77.7%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
Applied egg-rr72.5%
Taylor expanded in Om around 0
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.3%
Simplified76.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6485.7%
Applied egg-rr85.7%
if 5e14 < (/.f64 t l) Initial program 66.8%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified43.0%
Taylor expanded in t around inf
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6434.7%
Simplified34.7%
asin-lowering-asin.f64N/A
associate-*r/N/A
sqrt-divN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
sqrt-prodN/A
associate-*r*N/A
associate-*l/N/A
associate-/r/N/A
div-invN/A
times-fracN/A
div-invN/A
clear-numN/A
/-rgt-identityN/A
sqrt-prodN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr99.6%
Final simplification88.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+14) (asin (pow (+ 1.0 (* 2.0 (/ (/ t_m (/ l_m t_m)) l_m))) -0.5)) (asin (* (/ l_m t_m) (sqrt 0.5)))))
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+14) {
tmp = asin(pow((1.0 + (2.0 * ((t_m / (l_m / t_m)) / l_m))), -0.5));
} else {
tmp = asin(((l_m / t_m) * sqrt(0.5)));
}
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+14) then
tmp = asin(((1.0d0 + (2.0d0 * ((t_m / (l_m / t_m)) / l_m))) ** (-0.5d0)))
else
tmp = asin(((l_m / t_m) * sqrt(0.5d0)))
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+14) {
tmp = Math.asin(Math.pow((1.0 + (2.0 * ((t_m / (l_m / t_m)) / l_m))), -0.5));
} else {
tmp = Math.asin(((l_m / t_m) * Math.sqrt(0.5)));
}
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+14: tmp = math.asin(math.pow((1.0 + (2.0 * ((t_m / (l_m / t_m)) / l_m))), -0.5)) else: tmp = math.asin(((l_m / t_m) * math.sqrt(0.5))) 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+14) tmp = asin((Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / Float64(l_m / t_m)) / l_m))) ^ -0.5)); else tmp = asin(Float64(Float64(l_m / t_m) * sqrt(0.5))); 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+14) tmp = asin(((1.0 + (2.0 * ((t_m / (l_m / t_m)) / l_m))) ^ -0.5)); else tmp = asin(((l_m / t_m) * sqrt(0.5))); 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+14], N[ArcSin[N[Power[N[(1.0 + N[(2.0 * N[(N[(t$95$m / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] * N[Sqrt[0.5], $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^{+14}:\\
\;\;\;\;\sin^{-1} \left({\left(1 + 2 \cdot \frac{\frac{t\_m}{\frac{l\_m}{t\_m}}}{l\_m}\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m} \cdot \sqrt{0.5}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 5e14Initial program 89.3%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified77.7%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
Applied egg-rr72.5%
Taylor expanded in Om around 0
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.3%
Simplified76.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6485.7%
Applied egg-rr85.7%
if 5e14 < (/.f64 t l) Initial program 66.8%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified43.0%
Taylor expanded in t around inf
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6434.7%
Simplified34.7%
asin-lowering-asin.f64N/A
associate-*r/N/A
sqrt-divN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in Om around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6498.0%
Simplified98.0%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6498.1%
Applied egg-rr98.1%
Final simplification88.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) 0.05) (asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om))))) (asin (* (/ l_m t_m) (sqrt 0.5)))))
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) <= 0.05) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin(((l_m / t_m) * sqrt(0.5)));
}
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) <= 0.05d0) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin(((l_m / t_m) * sqrt(0.5d0)))
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) <= 0.05) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin(((l_m / t_m) * Math.sqrt(0.5)));
}
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) <= 0.05: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin(((l_m / t_m) * math.sqrt(0.5))) 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) <= 0.05) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(Float64(Float64(l_m / t_m) * sqrt(0.5))); 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) <= 0.05) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin(((l_m / t_m) * sqrt(0.5))); 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], 0.05], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] * N[Sqrt[0.5], $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 0.05:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m} \cdot \sqrt{0.5}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 0.050000000000000003Initial program 89.3%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified77.7%
Taylor expanded in t around 0
sqrt-lowering-sqrt.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.4%
Simplified59.4%
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6467.0%
Applied egg-rr67.0%
if 0.050000000000000003 < (/.f64 t l) Initial program 66.8%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified43.0%
Taylor expanded in t around inf
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6434.7%
Simplified34.7%
asin-lowering-asin.f64N/A
associate-*r/N/A
sqrt-divN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in Om around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6498.0%
Simplified98.0%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6498.1%
Applied egg-rr98.1%
Final simplification73.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) 0.05) (asin (+ 1.0 (* (/ Om Omc) (/ (* Om -0.5) Omc)))) (asin (* (/ l_m t_m) (sqrt 0.5)))))
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) <= 0.05) {
tmp = asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc))));
} else {
tmp = asin(((l_m / t_m) * sqrt(0.5)));
}
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) <= 0.05d0) then
tmp = asin((1.0d0 + ((om / omc) * ((om * (-0.5d0)) / omc))))
else
tmp = asin(((l_m / t_m) * sqrt(0.5d0)))
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) <= 0.05) {
tmp = Math.asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc))));
} else {
tmp = Math.asin(((l_m / t_m) * Math.sqrt(0.5)));
}
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) <= 0.05: tmp = math.asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc)))) else: tmp = math.asin(((l_m / t_m) * math.sqrt(0.5))) 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) <= 0.05) tmp = asin(Float64(1.0 + Float64(Float64(Om / Omc) * Float64(Float64(Om * -0.5) / Omc)))); else tmp = asin(Float64(Float64(l_m / t_m) * sqrt(0.5))); 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) <= 0.05) tmp = asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc)))); else tmp = asin(((l_m / t_m) * sqrt(0.5))); 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], 0.05], N[ArcSin[N[(1.0 + N[(N[(Om / Omc), $MachinePrecision] * N[(N[(Om * -0.5), $MachinePrecision] / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] * N[Sqrt[0.5], $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 0.05:\\
\;\;\;\;\sin^{-1} \left(1 + \frac{Om}{Omc} \cdot \frac{Om \cdot -0.5}{Omc}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m} \cdot \sqrt{0.5}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 0.050000000000000003Initial program 89.3%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified77.7%
Taylor expanded in t around 0
sqrt-lowering-sqrt.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.4%
Simplified59.4%
Taylor expanded in Om around 0
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.4%
Simplified59.4%
associate-*r*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6466.7%
Applied egg-rr66.7%
if 0.050000000000000003 < (/.f64 t l) Initial program 66.8%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified43.0%
Taylor expanded in t around inf
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6434.7%
Simplified34.7%
asin-lowering-asin.f64N/A
associate-*r/N/A
sqrt-divN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in Om around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6498.0%
Simplified98.0%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6498.1%
Applied egg-rr98.1%
Final simplification73.6%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= l_m 5.5e-6) (asin (* l_m (/ (sqrt 0.5) t_m))) (asin (+ 1.0 (* (/ Om Omc) (/ (* Om -0.5) Omc))))))
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.5e-6) {
tmp = asin((l_m * (sqrt(0.5) / t_m)));
} else {
tmp = asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc))));
}
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.5d-6) then
tmp = asin((l_m * (sqrt(0.5d0) / t_m)))
else
tmp = asin((1.0d0 + ((om / omc) * ((om * (-0.5d0)) / omc))))
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.5e-6) {
tmp = Math.asin((l_m * (Math.sqrt(0.5) / t_m)));
} else {
tmp = Math.asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc))));
}
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.5e-6: tmp = math.asin((l_m * (math.sqrt(0.5) / t_m))) else: tmp = math.asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc)))) 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.5e-6) tmp = asin(Float64(l_m * Float64(sqrt(0.5) / t_m))); else tmp = asin(Float64(1.0 + Float64(Float64(Om / Omc) * Float64(Float64(Om * -0.5) / Omc)))); 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.5e-6) tmp = asin((l_m * (sqrt(0.5) / t_m))); else tmp = asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc)))); 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.5e-6], N[ArcSin[N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(1.0 + N[(N[(Om / Omc), $MachinePrecision] * N[(N[(Om * -0.5), $MachinePrecision] / Omc), $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.5 \cdot 10^{-6}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(1 + \frac{Om}{Omc} \cdot \frac{Om \cdot -0.5}{Omc}\right)\\
\end{array}
\end{array}
if l < 5.4999999999999999e-6Initial program 82.6%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified70.2%
Taylor expanded in t around inf
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6425.2%
Simplified25.2%
Taylor expanded in Om around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6432.9%
Simplified32.9%
if 5.4999999999999999e-6 < l Initial program 89.8%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified69.9%
Taylor expanded in t around 0
sqrt-lowering-sqrt.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.2%
Simplified67.2%
Taylor expanded in Om around 0
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.2%
Simplified67.2%
associate-*r*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6474.1%
Applied egg-rr74.1%
Final simplification43.2%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= l_m 1.08e-134) (asin (/ (* -0.5 (* Om Om)) (* Omc Omc))) (asin (+ 1.0 (* (/ Om Omc) (/ (* Om -0.5) Omc))))))
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 <= 1.08e-134) {
tmp = asin(((-0.5 * (Om * Om)) / (Omc * Omc)));
} else {
tmp = asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc))));
}
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 <= 1.08d-134) then
tmp = asin((((-0.5d0) * (om * om)) / (omc * omc)))
else
tmp = asin((1.0d0 + ((om / omc) * ((om * (-0.5d0)) / omc))))
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 <= 1.08e-134) {
tmp = Math.asin(((-0.5 * (Om * Om)) / (Omc * Omc)));
} else {
tmp = Math.asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc))));
}
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 <= 1.08e-134: tmp = math.asin(((-0.5 * (Om * Om)) / (Omc * Omc))) else: tmp = math.asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc)))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) tmp = 0.0 if (l_m <= 1.08e-134) tmp = asin(Float64(Float64(-0.5 * Float64(Om * Om)) / Float64(Omc * Omc))); else tmp = asin(Float64(1.0 + Float64(Float64(Om / Omc) * Float64(Float64(Om * -0.5) / Omc)))); 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 <= 1.08e-134) tmp = asin(((-0.5 * (Om * Om)) / (Omc * Omc))); else tmp = asin((1.0 + ((Om / Omc) * ((Om * -0.5) / Omc)))); 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, 1.08e-134], N[ArcSin[N[(N[(-0.5 * N[(Om * Om), $MachinePrecision]), $MachinePrecision] / N[(Omc * Omc), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(1.0 + N[(N[(Om / Omc), $MachinePrecision] * N[(N[(Om * -0.5), $MachinePrecision] / Omc), $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 1.08 \cdot 10^{-134}:\\
\;\;\;\;\sin^{-1} \left(\frac{-0.5 \cdot \left(Om \cdot Om\right)}{Omc \cdot Omc}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(1 + \frac{Om}{Omc} \cdot \frac{Om \cdot -0.5}{Omc}\right)\\
\end{array}
\end{array}
if l < 1.07999999999999999e-134Initial program 84.1%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified71.1%
Taylor expanded in t around 0
sqrt-lowering-sqrt.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.0%
Simplified42.0%
Taylor expanded in Om around 0
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.0%
Simplified42.0%
Taylor expanded in Om around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.3%
Simplified15.3%
if 1.07999999999999999e-134 < l Initial program 85.0%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified68.3%
Taylor expanded in t around 0
sqrt-lowering-sqrt.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.5%
Simplified57.5%
Taylor expanded in Om around 0
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.5%
Simplified57.5%
associate-*r*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6463.9%
Applied egg-rr63.9%
Final simplification32.0%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= l_m 1.08e-134) (asin (/ (* -0.5 (* Om Om)) (* Omc Omc))) (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 (l_m <= 1.08e-134) {
tmp = asin(((-0.5 * (Om * Om)) / (Omc * Omc)));
} 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 (l_m <= 1.08d-134) then
tmp = asin((((-0.5d0) * (om * om)) / (omc * omc)))
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 (l_m <= 1.08e-134) {
tmp = Math.asin(((-0.5 * (Om * Om)) / (Omc * Omc)));
} 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 l_m <= 1.08e-134: tmp = math.asin(((-0.5 * (Om * Om)) / (Omc * Omc))) 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 (l_m <= 1.08e-134) tmp = asin(Float64(Float64(-0.5 * Float64(Om * Om)) / Float64(Omc * Omc))); 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 (l_m <= 1.08e-134) tmp = asin(((-0.5 * (Om * Om)) / (Omc * Omc))); 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[l$95$m, 1.08e-134], N[ArcSin[N[(N[(-0.5 * N[(Om * Om), $MachinePrecision]), $MachinePrecision] / N[(Omc * Omc), $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}\;l\_m \leq 1.08 \cdot 10^{-134}:\\
\;\;\;\;\sin^{-1} \left(\frac{-0.5 \cdot \left(Om \cdot Om\right)}{Omc \cdot Omc}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < 1.07999999999999999e-134Initial program 84.1%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified71.1%
Taylor expanded in t around 0
sqrt-lowering-sqrt.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.0%
Simplified42.0%
Taylor expanded in Om around 0
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.0%
Simplified42.0%
Taylor expanded in Om around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.3%
Simplified15.3%
if 1.07999999999999999e-134 < l Initial program 85.0%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified68.3%
Taylor expanded in t around 0
sqrt-lowering-sqrt.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.5%
Simplified57.5%
Taylor expanded in Om around 0
Simplified63.7%
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.4%
asin-lowering-asin.f64N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
sub0-negN/A
distribute-frac-negN/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-negN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
Simplified70.1%
Taylor expanded in t around 0
sqrt-lowering-sqrt.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.3%
Simplified47.3%
Taylor expanded in Om around 0
Simplified53.2%
herbie shell --seed 2024192
(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)))))))