
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
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+146)
(asin (sqrt (/ t_1 (+ (* 2.0 (/ (/ t_m l_m) (/ l_m t_m))) 1.0))))
(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) <= 1e+146) {
tmp = asin(sqrt((t_1 / ((2.0 * ((t_m / l_m) / (l_m / t_m))) + 1.0))));
} 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) <= 1d+146) then
tmp = asin(sqrt((t_1 / ((2.0d0 * ((t_m / l_m) / (l_m / t_m))) + 1.0d0))))
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) <= 1e+146) {
tmp = Math.asin(Math.sqrt((t_1 / ((2.0 * ((t_m / l_m) / (l_m / t_m))) + 1.0))));
} 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) <= 1e+146: tmp = math.asin(math.sqrt((t_1 / ((2.0 * ((t_m / l_m) / (l_m / t_m))) + 1.0)))) 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) <= 1e+146) tmp = asin(sqrt(Float64(t_1 / Float64(Float64(2.0 * Float64(Float64(t_m / l_m) / Float64(l_m / t_m))) + 1.0)))); 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) <= 1e+146) tmp = asin(sqrt((t_1 / ((2.0 * ((t_m / l_m) / (l_m / t_m))) + 1.0)))); 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], 1e+146], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(N[(2.0 * N[(N[(t$95$m / l$95$m), $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $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 10^{+146}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t\_1}{2 \cdot \frac{\frac{t\_m}{l\_m}}{\frac{l\_m}{t\_m}} + 1}}\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) < 9.99999999999999934e145Initial program 91.4%
unpow291.4%
clear-num91.4%
un-div-inv91.4%
Applied egg-rr91.4%
unpow291.4%
clear-num91.4%
un-div-inv91.4%
Applied egg-rr91.4%
if 9.99999999999999934e145 < (/.f64 t l) Initial program 47.5%
Taylor expanded in t around inf 93.6%
*-commutative93.6%
unpow293.6%
unpow293.6%
times-frac99.6%
unpow299.6%
associate-/l*99.6%
Simplified99.6%
unpow247.5%
clear-num47.5%
un-div-inv47.5%
Applied egg-rr99.6%
Final simplification92.5%
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 (/ (sqrt (/ (* 2.0 t_m) l_m)) (sqrt (/ l_m t_m))))
(sqrt (- 1.0 (pow (/ Om Omc) 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, (sqrt(((2.0 * t_m) / l_m)) / sqrt((l_m / t_m)))) / sqrt((1.0 - pow((Om / Omc), 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, (Math.sqrt(((2.0 * t_m) / l_m)) / Math.sqrt((l_m / t_m)))) / Math.sqrt((1.0 - Math.pow((Om / Omc), 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, (math.sqrt(((2.0 * t_m) / l_m)) / math.sqrt((l_m / t_m)))) / math.sqrt((1.0 - math.pow((Om / Omc), 2.0))))))
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(Float64(1.0 / Float64(hypot(1.0, Float64(sqrt(Float64(Float64(2.0 * t_m) / l_m)) / sqrt(Float64(l_m / t_m)))) / sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 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, (sqrt(((2.0 * t_m) / l_m)) / sqrt((l_m / t_m)))) / sqrt((1.0 - ((Om / Omc) ^ 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[(N[Sqrt[1.0 ^ 2 + N[(N[Sqrt[N[(N[(2.0 * t$95$m), $MachinePrecision] / l$95$m), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l$95$m / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] / N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} \left(\frac{1}{\frac{\mathsf{hypot}\left(1, \frac{\sqrt{\frac{2 \cdot t\_m}{l\_m}}}{\sqrt{\frac{l\_m}{t\_m}}}\right)}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}\right)
\end{array}
Initial program 85.7%
sqrt-div85.7%
clear-num85.7%
add-sqr-sqrt85.7%
hypot-1-def85.7%
*-commutative85.7%
sqrt-prod86.0%
sqrt-pow197.5%
metadata-eval97.5%
pow197.5%
Applied egg-rr97.5%
*-commutative97.5%
pow197.5%
metadata-eval97.5%
sqrt-pow186.0%
sqrt-prod85.7%
unpow285.7%
clear-num85.7%
div-inv85.7%
associate-*r/85.7%
sqrt-div48.0%
Applied egg-rr48.0%
associate-*r/48.0%
Simplified48.0%
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 (* (sqrt 2.0) (/ t_m l_m)))
(sqrt (- 1.0 (pow (/ Om Omc) 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, (sqrt(2.0) * (t_m / l_m))) / sqrt((1.0 - pow((Om / Omc), 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, (Math.sqrt(2.0) * (t_m / l_m))) / Math.sqrt((1.0 - Math.pow((Om / Omc), 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, (math.sqrt(2.0) * (t_m / l_m))) / math.sqrt((1.0 - math.pow((Om / Omc), 2.0))))))
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(Float64(1.0 / Float64(hypot(1.0, Float64(sqrt(2.0) * Float64(t_m / l_m))) / sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 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, (sqrt(2.0) * (t_m / l_m))) / sqrt((1.0 - ((Om / Omc) ^ 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[(N[Sqrt[1.0 ^ 2 + N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] / N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} \left(\frac{1}{\frac{\mathsf{hypot}\left(1, \sqrt{2} \cdot \frac{t\_m}{l\_m}\right)}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}\right)
\end{array}
Initial program 85.7%
sqrt-div85.7%
clear-num85.7%
add-sqr-sqrt85.7%
hypot-1-def85.7%
*-commutative85.7%
sqrt-prod86.0%
sqrt-pow197.5%
metadata-eval97.5%
pow197.5%
Applied egg-rr97.5%
Final simplification97.5%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (/ (* t_m (sqrt 2.0)) l_m)))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, ((t_m * sqrt(2.0)) / l_m))));
}
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, ((t_m * Math.sqrt(2.0)) / l_m))));
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t_m * math.sqrt(2.0)) / l_m))))
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(Float64(t_m * sqrt(2.0)) / l_m)))) end
t_m = abs(t); l_m = abs(l); function tmp = code(t_m, l_m, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t_m * sqrt(2.0)) / l_m)))); end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l$95$m), $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 \cdot \sqrt{2}}{l\_m}\right)}\right)
\end{array}
Initial program 85.7%
sqrt-div85.7%
frac-2neg85.7%
add-sqr-sqrt85.7%
hypot-1-def85.7%
*-commutative85.7%
sqrt-prod86.0%
sqrt-pow197.5%
metadata-eval97.5%
pow197.5%
Applied egg-rr97.5%
associate-*l/97.6%
Simplified97.6%
Final simplification97.6%
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 (* (sqrt 2.0) (/ t_m l_m))))))
t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / hypot(1.0, (sqrt(2.0) * (t_m / l_m)))));
}
t_m = Math.abs(t);
l_m = Math.abs(l);
public static double code(double t_m, double l_m, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, (Math.sqrt(2.0) * (t_m / l_m)))));
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, (math.sqrt(2.0) * (t_m / l_m)))))
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - (Float64(Om / Omc) ^ 2.0))) / hypot(1.0, Float64(sqrt(2.0) * Float64(t_m / l_m))))) end
t_m = abs(t); l_m = abs(l); function tmp = code(t_m, l_m, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, (sqrt(2.0) * (t_m / l_m))))); end
t_m = N[Abs[t], $MachinePrecision] l_m = N[Abs[l], $MachinePrecision] code[t$95$m_, l$95$m_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \sqrt{2} \cdot \frac{t\_m}{l\_m}\right)}\right)
\end{array}
Initial program 85.7%
sqrt-div85.7%
div-inv85.7%
add-sqr-sqrt85.7%
hypot-1-def85.7%
*-commutative85.7%
sqrt-prod86.0%
sqrt-pow197.5%
metadata-eval97.5%
pow197.5%
Applied egg-rr97.5%
associate-*r/97.5%
*-rgt-identity97.5%
Simplified97.5%
Final simplification97.5%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= (pow (/ t_m l_m) 2.0) 1e+292) (asin (pow (+ (/ (* 2.0 (/ t_m l_m)) (/ l_m t_m)) 1.0) -0.5)) (asin (* 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 tmp;
if (pow((t_m / l_m), 2.0) <= 1e+292) {
tmp = asin(pow((((2.0 * (t_m / l_m)) / (l_m / t_m)) + 1.0), -0.5));
} else {
tmp = asin((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) :: tmp
if (((t_m / l_m) ** 2.0d0) <= 1d+292) then
tmp = asin(((((2.0d0 * (t_m / l_m)) / (l_m / t_m)) + 1.0d0) ** (-0.5d0)))
else
tmp = asin((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 tmp;
if (Math.pow((t_m / l_m), 2.0) <= 1e+292) {
tmp = Math.asin(Math.pow((((2.0 * (t_m / l_m)) / (l_m / t_m)) + 1.0), -0.5));
} else {
tmp = Math.asin((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): tmp = 0 if math.pow((t_m / l_m), 2.0) <= 1e+292: tmp = math.asin(math.pow((((2.0 * (t_m / l_m)) / (l_m / t_m)) + 1.0), -0.5)) else: tmp = math.asin((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) tmp = 0.0 if ((Float64(t_m / l_m) ^ 2.0) <= 1e+292) tmp = asin((Float64(Float64(Float64(2.0 * Float64(t_m / l_m)) / Float64(l_m / t_m)) + 1.0) ^ -0.5)); else tmp = asin(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) tmp = 0.0; if (((t_m / l_m) ^ 2.0) <= 1e+292) tmp = asin(((((2.0 * (t_m / l_m)) / (l_m / t_m)) + 1.0) ^ -0.5)); else tmp = asin((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_] := If[LessEqual[N[Power[N[(t$95$m / l$95$m), $MachinePrecision], 2.0], $MachinePrecision], 1e+292], N[ArcSin[N[Power[N[(N[(N[(2.0 * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], -0.5], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{t\_m}{l\_m}\right)}^{2} \leq 10^{+292}:\\
\;\;\;\;\sin^{-1} \left({\left(\frac{2 \cdot \frac{t\_m}{l\_m}}{\frac{l\_m}{t\_m}} + 1\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\end{array}
\end{array}
if (pow.f64 (/.f64 t l) #s(literal 2 binary64)) < 1e292Initial program 98.4%
sqrt-div98.4%
clear-num98.4%
add-sqr-sqrt98.4%
hypot-1-def98.4%
*-commutative98.4%
sqrt-prod98.3%
sqrt-pow198.3%
metadata-eval98.3%
pow198.3%
Applied egg-rr98.3%
*-commutative98.3%
pow198.3%
metadata-eval98.3%
sqrt-pow198.3%
sqrt-prod98.4%
unpow298.4%
clear-num98.4%
div-inv98.4%
associate-*r/98.4%
sqrt-div48.4%
Applied egg-rr48.4%
associate-*r/48.4%
Simplified48.4%
Taylor expanded in Om around 0 47.4%
inv-pow47.4%
/-rgt-identity47.4%
hypot-undefine47.4%
sqrt-pow247.4%
metadata-eval47.4%
sqrt-undiv47.4%
sqrt-undiv97.3%
add-sqr-sqrt97.4%
associate-/l*97.4%
metadata-eval97.4%
Applied egg-rr97.4%
if 1e292 < (pow.f64 (/.f64 t l) #s(literal 2 binary64)) Initial program 48.4%
Taylor expanded in t around inf 69.7%
*-commutative69.7%
unpow269.7%
unpow269.7%
times-frac74.4%
unpow274.4%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in Om around 0 74.2%
Final simplification91.6%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= (pow (/ t_m l_m) 2.0) 5e-5) (asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om))))) (asin (* 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 tmp;
if (pow((t_m / l_m), 2.0) <= 5e-5) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin((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) :: tmp
if (((t_m / l_m) ** 2.0d0) <= 5d-5) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin((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 tmp;
if (Math.pow((t_m / l_m), 2.0) <= 5e-5) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin((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): tmp = 0 if math.pow((t_m / l_m), 2.0) <= 5e-5: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin((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) tmp = 0.0 if ((Float64(t_m / l_m) ^ 2.0) <= 5e-5) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(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) tmp = 0.0; if (((t_m / l_m) ^ 2.0) <= 5e-5) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin((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_] := If[LessEqual[N[Power[N[(t$95$m / l$95$m), $MachinePrecision], 2.0], $MachinePrecision], 5e-5], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{t\_m}{l\_m}\right)}^{2} \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\end{array}
\end{array}
if (pow.f64 (/.f64 t l) #s(literal 2 binary64)) < 5.00000000000000024e-5Initial program 97.9%
Taylor expanded in t around 0 87.5%
unpow287.5%
unpow287.5%
times-frac96.7%
unpow296.7%
Simplified96.7%
unpow297.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr96.7%
if 5.00000000000000024e-5 < (pow.f64 (/.f64 t l) #s(literal 2 binary64)) Initial program 73.8%
Taylor expanded in t around inf 56.2%
*-commutative56.2%
unpow256.2%
unpow256.2%
times-frac62.1%
unpow262.1%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in Om around 0 61.7%
Final simplification79.1%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(let* ((t_1 (/ (/ Om Omc) (/ Omc Om))))
(if (<= (/ t_m l_m) 1e+146)
(asin (sqrt (/ (- 1.0 t_1) (+ (* 2.0 (/ (/ t_m l_m) (/ l_m t_m))) 1.0))))
(asin (* (* l_m (/ (sqrt 0.5) t_m)) (+ (* t_1 -0.5) 1.0))))))t_m = fabs(t);
l_m = fabs(l);
double code(double t_m, double l_m, double Om, double Omc) {
double t_1 = (Om / Omc) / (Omc / Om);
double tmp;
if ((t_m / l_m) <= 1e+146) {
tmp = asin(sqrt(((1.0 - t_1) / ((2.0 * ((t_m / l_m) / (l_m / t_m))) + 1.0))));
} else {
tmp = asin(((l_m * (sqrt(0.5) / t_m)) * ((t_1 * -0.5) + 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) :: t_1
real(8) :: tmp
t_1 = (om / omc) / (omc / om)
if ((t_m / l_m) <= 1d+146) then
tmp = asin(sqrt(((1.0d0 - t_1) / ((2.0d0 * ((t_m / l_m) / (l_m / t_m))) + 1.0d0))))
else
tmp = asin(((l_m * (sqrt(0.5d0) / t_m)) * ((t_1 * (-0.5d0)) + 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 t_1 = (Om / Omc) / (Omc / Om);
double tmp;
if ((t_m / l_m) <= 1e+146) {
tmp = Math.asin(Math.sqrt(((1.0 - t_1) / ((2.0 * ((t_m / l_m) / (l_m / t_m))) + 1.0))));
} else {
tmp = Math.asin(((l_m * (Math.sqrt(0.5) / t_m)) * ((t_1 * -0.5) + 1.0)));
}
return tmp;
}
t_m = math.fabs(t) l_m = math.fabs(l) def code(t_m, l_m, Om, Omc): t_1 = (Om / Omc) / (Omc / Om) tmp = 0 if (t_m / l_m) <= 1e+146: tmp = math.asin(math.sqrt(((1.0 - t_1) / ((2.0 * ((t_m / l_m) / (l_m / t_m))) + 1.0)))) else: tmp = math.asin(((l_m * (math.sqrt(0.5) / t_m)) * ((t_1 * -0.5) + 1.0))) return tmp
t_m = abs(t) l_m = abs(l) function code(t_m, l_m, Om, Omc) t_1 = Float64(Float64(Om / Omc) / Float64(Omc / Om)) tmp = 0.0 if (Float64(t_m / l_m) <= 1e+146) tmp = asin(sqrt(Float64(Float64(1.0 - t_1) / Float64(Float64(2.0 * Float64(Float64(t_m / l_m) / Float64(l_m / t_m))) + 1.0)))); else tmp = asin(Float64(Float64(l_m * Float64(sqrt(0.5) / t_m)) * Float64(Float64(t_1 * -0.5) + 1.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 = (Om / Omc) / (Omc / Om); tmp = 0.0; if ((t_m / l_m) <= 1e+146) tmp = asin(sqrt(((1.0 - t_1) / ((2.0 * ((t_m / l_m) / (l_m / t_m))) + 1.0)))); else tmp = asin(((l_m * (sqrt(0.5) / t_m)) * ((t_1 * -0.5) + 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_] := Block[{t$95$1 = N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 1e+146], N[ArcSin[N[Sqrt[N[(N[(1.0 - t$95$1), $MachinePrecision] / N[(N[(2.0 * N[(N[(t$95$m / l$95$m), $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * -0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}\\
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 10^{+146}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - t\_1}{2 \cdot \frac{\frac{t\_m}{l\_m}}{\frac{l\_m}{t\_m}} + 1}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right) \cdot \left(t\_1 \cdot -0.5 + 1\right)\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 9.99999999999999934e145Initial program 91.4%
unpow291.4%
clear-num91.4%
un-div-inv91.4%
Applied egg-rr91.4%
unpow291.4%
clear-num91.4%
un-div-inv91.4%
Applied egg-rr91.4%
if 9.99999999999999934e145 < (/.f64 t l) Initial program 47.5%
Taylor expanded in t around inf 93.6%
*-commutative93.6%
unpow293.6%
unpow293.6%
times-frac99.6%
unpow299.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in Om around 0 93.6%
unpow293.6%
unpow293.6%
times-frac99.6%
unpow299.6%
Simplified99.6%
unpow247.5%
clear-num47.5%
un-div-inv47.5%
Applied egg-rr99.6%
Final simplification92.5%
t_m = (fabs.f64 t)
l_m = (fabs.f64 l)
(FPCore (t_m l_m Om Omc)
:precision binary64
(if (<= (/ t_m l_m) 4e+30)
(asin (pow (+ (/ (* 2.0 (/ t_m l_m)) (/ l_m t_m)) 1.0) -0.5))
(asin
(*
(* l_m (/ (sqrt 0.5) t_m))
(+ (* (/ (/ Om Omc) (/ Omc Om)) -0.5) 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 / l_m) <= 4e+30) {
tmp = asin(pow((((2.0 * (t_m / l_m)) / (l_m / t_m)) + 1.0), -0.5));
} else {
tmp = asin(((l_m * (sqrt(0.5) / t_m)) * ((((Om / Omc) / (Omc / Om)) * -0.5) + 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 / l_m) <= 4d+30) then
tmp = asin(((((2.0d0 * (t_m / l_m)) / (l_m / t_m)) + 1.0d0) ** (-0.5d0)))
else
tmp = asin(((l_m * (sqrt(0.5d0) / t_m)) * ((((om / omc) / (omc / om)) * (-0.5d0)) + 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 / l_m) <= 4e+30) {
tmp = Math.asin(Math.pow((((2.0 * (t_m / l_m)) / (l_m / t_m)) + 1.0), -0.5));
} else {
tmp = Math.asin(((l_m * (Math.sqrt(0.5) / t_m)) * ((((Om / Omc) / (Omc / Om)) * -0.5) + 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 / l_m) <= 4e+30: tmp = math.asin(math.pow((((2.0 * (t_m / l_m)) / (l_m / t_m)) + 1.0), -0.5)) else: tmp = math.asin(((l_m * (math.sqrt(0.5) / t_m)) * ((((Om / Omc) / (Omc / Om)) * -0.5) + 1.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) <= 4e+30) tmp = asin((Float64(Float64(Float64(2.0 * Float64(t_m / l_m)) / Float64(l_m / t_m)) + 1.0) ^ -0.5)); else tmp = asin(Float64(Float64(l_m * Float64(sqrt(0.5) / t_m)) * Float64(Float64(Float64(Float64(Om / Omc) / Float64(Omc / Om)) * -0.5) + 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 / l_m) <= 4e+30) tmp = asin(((((2.0 * (t_m / l_m)) / (l_m / t_m)) + 1.0) ^ -0.5)); else tmp = asin(((l_m * (sqrt(0.5) / t_m)) * ((((Om / Omc) / (Omc / Om)) * -0.5) + 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[N[(t$95$m / l$95$m), $MachinePrecision], 4e+30], N[ArcSin[N[Power[N[(N[(N[(2.0 * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], -0.5], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision] + 1.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 4 \cdot 10^{+30}:\\
\;\;\;\;\sin^{-1} \left({\left(\frac{2 \cdot \frac{t\_m}{l\_m}}{\frac{l\_m}{t\_m}} + 1\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right) \cdot \left(\frac{\frac{Om}{Omc}}{\frac{Omc}{Om}} \cdot -0.5 + 1\right)\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 4.0000000000000001e30Initial program 90.6%
sqrt-div90.6%
clear-num90.6%
add-sqr-sqrt90.6%
hypot-1-def90.6%
*-commutative90.6%
sqrt-prod91.0%
sqrt-pow198.3%
metadata-eval98.3%
pow198.3%
Applied egg-rr98.3%
*-commutative98.3%
pow198.3%
metadata-eval98.3%
sqrt-pow191.0%
sqrt-prod90.6%
unpow290.6%
clear-num90.6%
div-inv90.6%
associate-*r/90.6%
sqrt-div35.8%
Applied egg-rr35.8%
associate-*r/35.8%
Simplified35.8%
Taylor expanded in Om around 0 35.0%
inv-pow35.0%
/-rgt-identity35.0%
hypot-undefine35.0%
sqrt-pow235.0%
metadata-eval35.0%
sqrt-undiv35.0%
sqrt-undiv89.8%
add-sqr-sqrt89.9%
associate-/l*89.9%
metadata-eval89.9%
Applied egg-rr89.9%
if 4.0000000000000001e30 < (/.f64 t l) Initial program 67.1%
Taylor expanded in t around inf 90.1%
*-commutative90.1%
unpow290.1%
unpow290.1%
times-frac99.4%
unpow299.4%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in Om around 0 90.0%
unpow290.0%
unpow290.0%
times-frac99.3%
unpow299.3%
Simplified99.3%
unpow267.1%
clear-num67.1%
un-div-inv67.1%
Applied egg-rr99.3%
Final simplification91.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.01) (asin (- 1.0 (pow (/ t_m l_m) 2.0))) (asin (* 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 tmp;
if ((t_m / l_m) <= 0.01) {
tmp = asin((1.0 - pow((t_m / l_m), 2.0)));
} else {
tmp = asin((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) :: tmp
if ((t_m / l_m) <= 0.01d0) then
tmp = asin((1.0d0 - ((t_m / l_m) ** 2.0d0)))
else
tmp = asin((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 tmp;
if ((t_m / l_m) <= 0.01) {
tmp = Math.asin((1.0 - Math.pow((t_m / l_m), 2.0)));
} else {
tmp = Math.asin((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): tmp = 0 if (t_m / l_m) <= 0.01: tmp = math.asin((1.0 - math.pow((t_m / l_m), 2.0))) else: tmp = math.asin((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) tmp = 0.0 if (Float64(t_m / l_m) <= 0.01) tmp = asin(Float64(1.0 - (Float64(t_m / l_m) ^ 2.0))); else tmp = asin(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) tmp = 0.0; if ((t_m / l_m) <= 0.01) tmp = asin((1.0 - ((t_m / l_m) ^ 2.0))); else tmp = asin((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_] := If[LessEqual[N[(t$95$m / l$95$m), $MachinePrecision], 0.01], N[ArcSin[N[(1.0 - N[Power[N[(t$95$m / l$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $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.01:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t\_m}{l\_m}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(l\_m \cdot \frac{\sqrt{0.5}}{t\_m}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 0.0100000000000000002Initial program 90.0%
sqrt-div90.0%
clear-num90.0%
add-sqr-sqrt90.0%
hypot-1-def90.0%
*-commutative90.0%
sqrt-prod90.4%
sqrt-pow198.2%
metadata-eval98.2%
pow198.2%
Applied egg-rr98.2%
*-commutative98.2%
pow198.2%
metadata-eval98.2%
sqrt-pow190.4%
sqrt-prod90.0%
unpow290.0%
clear-num90.0%
div-inv90.0%
associate-*r/90.0%
sqrt-div31.4%
Applied egg-rr31.4%
associate-*r/31.4%
Simplified31.4%
Taylor expanded in Om around 0 30.6%
Taylor expanded in t around 0 53.8%
associate-/l*53.8%
*-commutative53.8%
associate-*l*53.8%
associate-*r/53.8%
associate-*l/53.8%
unpow253.8%
rem-square-sqrt53.8%
metadata-eval53.8%
associate-*r/53.8%
mul-1-neg53.8%
unsub-neg53.8%
unpow253.8%
unpow253.8%
times-frac64.4%
unpow264.4%
Simplified64.4%
if 0.0100000000000000002 < (/.f64 t l) Initial program 73.5%
Taylor expanded in t around inf 87.1%
*-commutative87.1%
unpow287.1%
unpow287.1%
times-frac96.8%
unpow296.8%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in Om around 0 96.0%
Final simplification72.5%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= (/ t_m l_m) 0.01) (asin (- 1.0 (pow (/ t_m l_m) 2.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 / l_m) <= 0.01) {
tmp = asin((1.0 - pow((t_m / l_m), 2.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 / l_m) <= 0.01d0) then
tmp = asin((1.0d0 - ((t_m / l_m) ** 2.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 / l_m) <= 0.01) {
tmp = Math.asin((1.0 - Math.pow((t_m / l_m), 2.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 / l_m) <= 0.01: tmp = math.asin((1.0 - math.pow((t_m / l_m), 2.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 (Float64(t_m / l_m) <= 0.01) tmp = asin(Float64(1.0 - (Float64(t_m / l_m) ^ 2.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 / l_m) <= 0.01) tmp = asin((1.0 - ((t_m / l_m) ^ 2.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[N[(t$95$m / l$95$m), $MachinePrecision], 0.01], N[ArcSin[N[(1.0 - N[Power[N[(t$95$m / l$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l$95$m / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t\_m}{l\_m} \leq 0.01:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t\_m}{l\_m}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < 0.0100000000000000002Initial program 90.0%
sqrt-div90.0%
clear-num90.0%
add-sqr-sqrt90.0%
hypot-1-def90.0%
*-commutative90.0%
sqrt-prod90.4%
sqrt-pow198.2%
metadata-eval98.2%
pow198.2%
Applied egg-rr98.2%
*-commutative98.2%
pow198.2%
metadata-eval98.2%
sqrt-pow190.4%
sqrt-prod90.0%
unpow290.0%
clear-num90.0%
div-inv90.0%
associate-*r/90.0%
sqrt-div31.4%
Applied egg-rr31.4%
associate-*r/31.4%
Simplified31.4%
Taylor expanded in Om around 0 30.6%
Taylor expanded in t around 0 53.8%
associate-/l*53.8%
*-commutative53.8%
associate-*l*53.8%
associate-*r/53.8%
associate-*l/53.8%
unpow253.8%
rem-square-sqrt53.8%
metadata-eval53.8%
associate-*r/53.8%
mul-1-neg53.8%
unsub-neg53.8%
unpow253.8%
unpow253.8%
times-frac64.4%
unpow264.4%
Simplified64.4%
if 0.0100000000000000002 < (/.f64 t l) Initial program 73.5%
sqrt-div73.5%
frac-2neg73.5%
add-sqr-sqrt73.5%
hypot-1-def73.5%
*-commutative73.5%
sqrt-prod73.3%
sqrt-pow195.5%
metadata-eval95.5%
pow195.5%
Applied egg-rr95.5%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in Om around 0 94.8%
Taylor expanded in t around inf 96.0%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= l_m 2.6e-86) (asin (/ (/ l_m t_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 (l_m <= 2.6e-86) {
tmp = asin(((l_m / t_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 (l_m <= 2.6d-86) then
tmp = asin(((l_m / t_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 (l_m <= 2.6e-86) {
tmp = Math.asin(((l_m / t_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 l_m <= 2.6e-86: tmp = math.asin(((l_m / t_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 (l_m <= 2.6e-86) tmp = asin(Float64(Float64(l_m / t_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 (l_m <= 2.6e-86) tmp = asin(((l_m / t_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[l$95$m, 2.6e-86], N[ArcSin[N[(N[(l$95$m / t$95$m), $MachinePrecision] / N[Sqrt[2.0], $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 2.6 \cdot 10^{-86}:\\
\;\;\;\;\sin^{-1} \left(\frac{\frac{l\_m}{t\_m}}{\sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < 2.6000000000000001e-86Initial program 84.2%
sqrt-div84.2%
clear-num84.2%
add-sqr-sqrt84.2%
hypot-1-def84.2%
*-commutative84.2%
sqrt-prod84.0%
sqrt-pow196.9%
metadata-eval96.9%
pow196.9%
Applied egg-rr96.9%
*-commutative96.9%
pow196.9%
metadata-eval96.9%
sqrt-pow184.0%
sqrt-prod84.2%
unpow284.2%
clear-num84.1%
div-inv84.1%
associate-*r/84.1%
sqrt-div45.5%
Applied egg-rr45.5%
associate-*r/45.5%
Simplified45.5%
Taylor expanded in Om around 0 45.5%
Taylor expanded in t around inf 38.0%
associate-/r*38.0%
Simplified38.0%
if 2.6000000000000001e-86 < l Initial program 89.3%
Taylor expanded in t around 0 64.7%
unpow264.7%
unpow264.7%
times-frac72.6%
unpow272.6%
Simplified72.6%
Taylor expanded in Om around 0 70.6%
t_m = (fabs.f64 t) l_m = (fabs.f64 l) (FPCore (t_m l_m Om Omc) :precision binary64 (if (<= l_m 3e-86) (asin (/ l_m (* t_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 (l_m <= 3e-86) {
tmp = asin((l_m / (t_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 (l_m <= 3d-86) then
tmp = asin((l_m / (t_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 (l_m <= 3e-86) {
tmp = Math.asin((l_m / (t_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 l_m <= 3e-86: tmp = math.asin((l_m / (t_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 (l_m <= 3e-86) tmp = asin(Float64(l_m / Float64(t_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 (l_m <= 3e-86) tmp = asin((l_m / (t_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[l$95$m, 3e-86], N[ArcSin[N[(l$95$m / N[(t$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}\;l\_m \leq 3 \cdot 10^{-86}:\\
\;\;\;\;\sin^{-1} \left(\frac{l\_m}{t\_m \cdot \sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if l < 3.0000000000000001e-86Initial program 84.2%
sqrt-div84.2%
frac-2neg84.2%
add-sqr-sqrt84.2%
hypot-1-def84.2%
*-commutative84.2%
sqrt-prod84.0%
sqrt-pow196.8%
metadata-eval96.8%
pow196.8%
Applied egg-rr96.8%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in Om around 0 96.7%
Taylor expanded in t around inf 38.0%
if 3.0000000000000001e-86 < l Initial program 89.3%
Taylor expanded in t around 0 64.7%
unpow264.7%
unpow264.7%
times-frac72.6%
unpow272.6%
Simplified72.6%
Taylor expanded in Om around 0 70.6%
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 85.7%
Taylor expanded in t around 0 46.0%
unpow246.0%
unpow246.0%
times-frac50.8%
unpow250.8%
Simplified50.8%
Taylor expanded in Om around 0 50.2%
herbie shell --seed 2024117
(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)))))))