
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l Om Omc) :precision binary64 (asin (sqrt (/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * pow((t / l), 2.0))))));
}
real(8) function code(t, l, om, omc)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) ** 2.0d0))))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * Math.pow((t / l), 2.0))))));
}
def code(t, l, Om, Omc): return math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * math.pow((t / l), 2.0))))))
function code(t, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) ^ 2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)
\end{array}
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (pow (/ Om Omc) 2.0))))
(if (<= (/ t_m l) -1e+170)
(fabs (asin (/ l (/ t_m (sqrt 0.5)))))
(if (<= (/ t_m l) 1e+118)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m)))))))
(asin (* (sqrt t_1) (/ l (* t_m (sqrt 2.0)))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - pow((Om / Omc), 2.0);
double tmp;
if ((t_m / l) <= -1e+170) {
tmp = fabs(asin((l / (t_m / sqrt(0.5)))));
} else if ((t_m / l) <= 1e+118) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else {
tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0)))));
}
return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) ** 2.0d0)
if ((t_m / l) <= (-1d+170)) then
tmp = abs(asin((l / (t_m / sqrt(0.5d0)))))
else if ((t_m / l) <= 1d+118) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) / (l / t_m)))))))
else
tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0d0)))))
end if
code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - Math.pow((Om / Omc), 2.0);
double tmp;
if ((t_m / l) <= -1e+170) {
tmp = Math.abs(Math.asin((l / (t_m / Math.sqrt(0.5)))));
} else if ((t_m / l) <= 1e+118) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else {
tmp = Math.asin((Math.sqrt(t_1) * (l / (t_m * Math.sqrt(2.0)))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 - math.pow((Om / Omc), 2.0) tmp = 0 if (t_m / l) <= -1e+170: tmp = math.fabs(math.asin((l / (t_m / math.sqrt(0.5))))) elif (t_m / l) <= 1e+118: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))) else: tmp = math.asin((math.sqrt(t_1) * (l / (t_m * math.sqrt(2.0))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) tmp = 0.0 if (Float64(t_m / l) <= -1e+170) tmp = abs(asin(Float64(l / Float64(t_m / sqrt(0.5))))); elseif (Float64(t_m / l) <= 1e+118) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m))))))); else tmp = asin(Float64(sqrt(t_1) * Float64(l / Float64(t_m * sqrt(2.0))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) ^ 2.0); tmp = 0.0; if ((t_m / l) <= -1e+170) tmp = abs(asin((l / (t_m / sqrt(0.5))))); elseif ((t_m / l) <= 1e+118) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))); else tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0))))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l), $MachinePrecision], -1e+170], N[Abs[N[ArcSin[N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 1e+118], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\
\mathbf{if}\;\frac{t_m}{\ell} \leq -1 \cdot 10^{+170}:\\
\;\;\;\;\left|\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\right|\\
\mathbf{elif}\;\frac{t_m}{\ell} \leq 10^{+118}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{\frac{t_m}{\ell}}{\frac{\ell}{t_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \frac{\ell}{t_m \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.00000000000000003e170Initial program 68.1%
unpow268.1%
frac-2neg68.1%
frac-times68.1%
Applied egg-rr68.1%
Taylor expanded in t around inf 59.3%
*-commutative59.3%
associate-*l/59.3%
*-commutative59.3%
associate-*l*59.3%
unpow259.3%
unpow259.3%
times-frac67.6%
unpow267.6%
Simplified67.6%
Taylor expanded in Om around 0 67.6%
associate-/l*67.6%
Simplified67.6%
add-sqr-sqrt65.8%
sqrt-unprod68.1%
pow268.1%
associate-/r/68.1%
Applied egg-rr68.1%
unpow268.1%
rem-sqrt-square99.9%
associate-*l/99.8%
associate-/l*99.8%
Simplified99.8%
if -1.00000000000000003e170 < (/.f64 t l) < 9.99999999999999967e117Initial program 97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.8%
Applied egg-rr97.8%
if 9.99999999999999967e117 < (/.f64 t l) Initial program 54.4%
sqrt-div54.3%
div-inv54.3%
add-sqr-sqrt54.3%
hypot-1-def54.3%
*-commutative54.3%
sqrt-prod54.4%
unpow254.4%
sqrt-prod99.2%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in t around inf 81.9%
*-commutative81.9%
unpow281.9%
unpow281.9%
times-frac99.8%
unpow299.8%
Simplified99.8%
Final simplification98.4%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(expm1
(log1p
(asin
(/
(sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om))))
(hypot 1.0 (/ (* t_m (sqrt 2.0)) l)))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return expm1(log1p(asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, ((t_m * sqrt(2.0)) / l))))));
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.expm1(Math.log1p(Math.asin((Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / Math.hypot(1.0, ((t_m * Math.sqrt(2.0)) / l))))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.expm1(math.log1p(math.asin((math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / math.hypot(1.0, ((t_m * math.sqrt(2.0)) / l))))))
t_m = abs(t) function code(t_m, l, Om, Omc) return expm1(log1p(asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) / hypot(1.0, Float64(Float64(t_m * sqrt(2.0)) / l)))))) end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[(Exp[N[Log[1 + N[ArcSin[N[(N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\mathsf{expm1}\left(\mathsf{log1p}\left(\sin^{-1} \left(\frac{\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}}{\mathsf{hypot}\left(1, \frac{t_m \cdot \sqrt{2}}{\ell}\right)}\right)\right)\right)
\end{array}
Initial program 86.7%
sqrt-div86.6%
div-inv86.6%
add-sqr-sqrt86.6%
hypot-1-def86.6%
*-commutative86.6%
sqrt-prod86.6%
unpow286.6%
sqrt-prod58.3%
add-sqr-sqrt98.5%
Applied egg-rr98.5%
associate-*r/98.5%
*-rgt-identity98.5%
Simplified98.5%
unpow250.1%
clear-num50.1%
un-div-inv50.1%
Applied egg-rr98.5%
expm1-log1p-u98.5%
sub-neg98.5%
div-inv98.5%
clear-num98.5%
unpow298.5%
sub-neg98.5%
associate-*l/98.5%
Applied egg-rr98.5%
unpow250.1%
clear-num50.1%
un-div-inv50.1%
Applied egg-rr98.5%
Final simplification98.5%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (pow (/ Om Omc) 2.0))))
(if (<= (pow (/ t_m l) 2.0) 2e+302)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m)))))))
(fabs (asin (* l (/ (sqrt (* t_1 0.5)) t_m)))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - pow((Om / Omc), 2.0);
double tmp;
if (pow((t_m / l), 2.0) <= 2e+302) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else {
tmp = fabs(asin((l * (sqrt((t_1 * 0.5)) / t_m))));
}
return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) ** 2.0d0)
if (((t_m / l) ** 2.0d0) <= 2d+302) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) / (l / t_m)))))))
else
tmp = abs(asin((l * (sqrt((t_1 * 0.5d0)) / t_m))))
end if
code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - Math.pow((Om / Omc), 2.0);
double tmp;
if (Math.pow((t_m / l), 2.0) <= 2e+302) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else {
tmp = Math.abs(Math.asin((l * (Math.sqrt((t_1 * 0.5)) / t_m))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 - math.pow((Om / Omc), 2.0) tmp = 0 if math.pow((t_m / l), 2.0) <= 2e+302: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))) else: tmp = math.fabs(math.asin((l * (math.sqrt((t_1 * 0.5)) / t_m)))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) tmp = 0.0 if ((Float64(t_m / l) ^ 2.0) <= 2e+302) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m))))))); else tmp = abs(asin(Float64(l * Float64(sqrt(Float64(t_1 * 0.5)) / t_m)))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) ^ 2.0); tmp = 0.0; if (((t_m / l) ^ 2.0) <= 2e+302) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))); else tmp = abs(asin((l * (sqrt((t_1 * 0.5)) / t_m)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[N[(t$95$m / l), $MachinePrecision], 2.0], $MachinePrecision], 2e+302], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Abs[N[ArcSin[N[(l * N[(N[Sqrt[N[(t$95$1 * 0.5), $MachinePrecision]], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\
\mathbf{if}\;{\left(\frac{t_m}{\ell}\right)}^{2} \leq 2 \cdot 10^{+302}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{\frac{t_m}{\ell}}{\frac{\ell}{t_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left|\sin^{-1} \left(\ell \cdot \frac{\sqrt{t_1 \cdot 0.5}}{t_m}\right)\right|\\
\end{array}
\end{array}
if (pow.f64 (/.f64 t l) 2) < 2.0000000000000002e302Initial program 98.3%
unpow298.3%
clear-num98.3%
un-div-inv98.3%
Applied egg-rr98.3%
if 2.0000000000000002e302 < (pow.f64 (/.f64 t l) 2) Initial program 56.0%
unpow256.0%
frac-2neg56.0%
frac-times55.2%
Applied egg-rr55.2%
Taylor expanded in t around inf 66.4%
*-commutative66.4%
associate-*l/66.4%
*-commutative66.4%
associate-*l*66.4%
unpow266.4%
unpow266.4%
times-frac80.9%
unpow280.9%
Simplified80.9%
add-sqr-sqrt79.6%
sqrt-unprod56.4%
pow256.4%
associate-*l/56.4%
sqrt-unprod56.4%
Applied egg-rr56.4%
unpow256.4%
rem-sqrt-square99.7%
Simplified99.7%
Final simplification98.7%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))) (hypot 1.0 (* (sqrt 2.0) (/ t_m l))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, (sqrt(2.0) * (t_m / l)))));
}
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / Math.hypot(1.0, (Math.sqrt(2.0) * (t_m / l)))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin((math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / math.hypot(1.0, (math.sqrt(2.0) * (t_m / l)))))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) / hypot(1.0, Float64(sqrt(2.0) * Float64(t_m / l))))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) / hypot(1.0, (sqrt(2.0) * (t_m / l))))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\frac{\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}}{\mathsf{hypot}\left(1, \sqrt{2} \cdot \frac{t_m}{\ell}\right)}\right)
\end{array}
Initial program 86.7%
sqrt-div86.6%
div-inv86.6%
add-sqr-sqrt86.6%
hypot-1-def86.6%
*-commutative86.6%
sqrt-prod86.6%
unpow286.6%
sqrt-prod58.3%
add-sqr-sqrt98.5%
Applied egg-rr98.5%
associate-*r/98.5%
*-rgt-identity98.5%
Simplified98.5%
unpow250.1%
clear-num50.1%
un-div-inv50.1%
Applied egg-rr98.5%
Final simplification98.5%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(if (<= (/ t_m l) -1e+170)
(fabs (asin (/ l (/ t_m (sqrt 0.5)))))
(if (<= (/ t_m l) 2e+128)
(asin
(sqrt
(/
(- 1.0 (pow (/ Om Omc) 2.0))
(+ 1.0 (* 2.0 (* (/ t_m l) (/ t_m l)))))))
(asin
(* l (* (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))) (/ (sqrt 0.5) t_m)))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double tmp;
if ((t_m / l) <= -1e+170) {
tmp = fabs(asin((l / (t_m / sqrt(0.5)))));
} else if ((t_m / l) <= 2e+128) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
} else {
tmp = asin((l * (sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (sqrt(0.5) / t_m))));
}
return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((t_m / l) <= (-1d+170)) then
tmp = abs(asin((l / (t_m / sqrt(0.5d0)))))
else if ((t_m / l) <= 2d+128) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t_m / l) * (t_m / l)))))))
else
tmp = asin((l * (sqrt((1.0d0 - ((om / omc) / (omc / om)))) * (sqrt(0.5d0) / t_m))))
end if
code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double tmp;
if ((t_m / l) <= -1e+170) {
tmp = Math.abs(Math.asin((l / (t_m / Math.sqrt(0.5)))));
} else if ((t_m / l) <= 2e+128) {
tmp = Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) * (t_m / l)))))));
} else {
tmp = Math.asin((l * (Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (Math.sqrt(0.5) / t_m))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): tmp = 0 if (t_m / l) <= -1e+170: tmp = math.fabs(math.asin((l / (t_m / math.sqrt(0.5))))) elif (t_m / l) <= 2e+128: tmp = math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) * (t_m / l))))))) else: tmp = math.asin((l * (math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (math.sqrt(0.5) / t_m)))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) tmp = 0.0 if (Float64(t_m / l) <= -1e+170) tmp = abs(asin(Float64(l / Float64(t_m / sqrt(0.5))))); elseif (Float64(t_m / l) <= 2e+128) tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) * Float64(t_m / l))))))); else tmp = asin(Float64(l * Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) * Float64(sqrt(0.5) / t_m)))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) tmp = 0.0; if ((t_m / l) <= -1e+170) tmp = abs(asin((l / (t_m / sqrt(0.5))))); elseif ((t_m / l) <= 2e+128) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t_m / l) * (t_m / l))))))); else tmp = asin((l * (sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (sqrt(0.5) / t_m)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := If[LessEqual[N[(t$95$m / l), $MachinePrecision], -1e+170], N[Abs[N[ArcSin[N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 2e+128], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[0.5], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{t_m}{\ell} \leq -1 \cdot 10^{+170}:\\
\;\;\;\;\left|\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\right|\\
\mathbf{elif}\;\frac{t_m}{\ell} \leq 2 \cdot 10^{+128}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t_m}{\ell} \cdot \frac{t_m}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}} \cdot \frac{\sqrt{0.5}}{t_m}\right)\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.00000000000000003e170Initial program 68.1%
unpow268.1%
frac-2neg68.1%
frac-times68.1%
Applied egg-rr68.1%
Taylor expanded in t around inf 59.3%
*-commutative59.3%
associate-*l/59.3%
*-commutative59.3%
associate-*l*59.3%
unpow259.3%
unpow259.3%
times-frac67.6%
unpow267.6%
Simplified67.6%
Taylor expanded in Om around 0 67.6%
associate-/l*67.6%
Simplified67.6%
add-sqr-sqrt65.8%
sqrt-unprod68.1%
pow268.1%
associate-/r/68.1%
Applied egg-rr68.1%
unpow268.1%
rem-sqrt-square99.9%
associate-*l/99.8%
associate-/l*99.8%
Simplified99.8%
if -1.00000000000000003e170 < (/.f64 t l) < 2.0000000000000002e128Initial program 97.7%
unpow297.7%
Applied egg-rr97.7%
if 2.0000000000000002e128 < (/.f64 t l) Initial program 52.0%
unpow252.0%
frac-2neg52.0%
frac-times37.6%
Applied egg-rr37.6%
Taylor expanded in t around inf 80.7%
*-commutative80.7%
associate-*l/80.6%
*-commutative80.6%
associate-*l*80.6%
unpow280.6%
unpow280.6%
times-frac99.5%
unpow299.5%
Simplified99.5%
unpow23.8%
clear-num3.8%
un-div-inv3.8%
Applied egg-rr99.5%
Final simplification98.3%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (pow (/ Om Omc) 2.0))))
(if (<= (/ t_m l) -1e+170)
(fabs (asin (/ l (/ t_m (sqrt 0.5)))))
(if (<= (/ t_m l) 2e+139)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m)))))))
(asin (* l (/ (sqrt (* t_1 0.5)) t_m)))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - pow((Om / Omc), 2.0);
double tmp;
if ((t_m / l) <= -1e+170) {
tmp = fabs(asin((l / (t_m / sqrt(0.5)))));
} else if ((t_m / l) <= 2e+139) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else {
tmp = asin((l * (sqrt((t_1 * 0.5)) / t_m)));
}
return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 - ((om / omc) ** 2.0d0)
if ((t_m / l) <= (-1d+170)) then
tmp = abs(asin((l / (t_m / sqrt(0.5d0)))))
else if ((t_m / l) <= 2d+139) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m / l) / (l / t_m)))))))
else
tmp = asin((l * (sqrt((t_1 * 0.5d0)) / t_m)))
end if
code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - Math.pow((Om / Omc), 2.0);
double tmp;
if ((t_m / l) <= -1e+170) {
tmp = Math.abs(Math.asin((l / (t_m / Math.sqrt(0.5)))));
} else if ((t_m / l) <= 2e+139) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else {
tmp = Math.asin((l * (Math.sqrt((t_1 * 0.5)) / t_m)));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 - math.pow((Om / Omc), 2.0) tmp = 0 if (t_m / l) <= -1e+170: tmp = math.fabs(math.asin((l / (t_m / math.sqrt(0.5))))) elif (t_m / l) <= 2e+139: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))) else: tmp = math.asin((l * (math.sqrt((t_1 * 0.5)) / t_m))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) tmp = 0.0 if (Float64(t_m / l) <= -1e+170) tmp = abs(asin(Float64(l / Float64(t_m / sqrt(0.5))))); elseif (Float64(t_m / l) <= 2e+139) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m))))))); else tmp = asin(Float64(l * Float64(sqrt(Float64(t_1 * 0.5)) / t_m))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) ^ 2.0); tmp = 0.0; if ((t_m / l) <= -1e+170) tmp = abs(asin((l / (t_m / sqrt(0.5))))); elseif ((t_m / l) <= 2e+139) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))); else tmp = asin((l * (sqrt((t_1 * 0.5)) / t_m))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(1.0 - N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$m / l), $MachinePrecision], -1e+170], N[Abs[N[ArcSin[N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t$95$m / l), $MachinePrecision], 2e+139], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m / l), $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l * N[(N[Sqrt[N[(t$95$1 * 0.5), $MachinePrecision]], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\
\mathbf{if}\;\frac{t_m}{\ell} \leq -1 \cdot 10^{+170}:\\
\;\;\;\;\left|\sin^{-1} \left(\frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\right|\\
\mathbf{elif}\;\frac{t_m}{\ell} \leq 2 \cdot 10^{+139}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{\frac{t_m}{\ell}}{\frac{\ell}{t_m}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\ell \cdot \frac{\sqrt{t_1 \cdot 0.5}}{t_m}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.00000000000000003e170Initial program 68.1%
unpow268.1%
frac-2neg68.1%
frac-times68.1%
Applied egg-rr68.1%
Taylor expanded in t around inf 59.3%
*-commutative59.3%
associate-*l/59.3%
*-commutative59.3%
associate-*l*59.3%
unpow259.3%
unpow259.3%
times-frac67.6%
unpow267.6%
Simplified67.6%
Taylor expanded in Om around 0 67.6%
associate-/l*67.6%
Simplified67.6%
add-sqr-sqrt65.8%
sqrt-unprod68.1%
pow268.1%
associate-/r/68.1%
Applied egg-rr68.1%
unpow268.1%
rem-sqrt-square99.9%
associate-*l/99.8%
associate-/l*99.8%
Simplified99.8%
if -1.00000000000000003e170 < (/.f64 t l) < 2.00000000000000007e139Initial program 97.8%
unpow297.8%
clear-num97.7%
un-div-inv97.8%
Applied egg-rr97.8%
if 2.00000000000000007e139 < (/.f64 t l) Initial program 49.3%
unpow249.3%
frac-2neg49.3%
frac-times39.5%
Applied egg-rr39.5%
Taylor expanded in t around inf 79.7%
*-commutative79.7%
associate-*l/79.6%
*-commutative79.6%
associate-*l*79.6%
unpow279.6%
unpow279.6%
times-frac99.5%
unpow299.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef35.8%
associate-*l/35.8%
sqrt-unprod35.8%
Applied egg-rr35.8%
expm1-def99.5%
expm1-log1p99.5%
Simplified99.5%
Final simplification98.3%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ 1.0 (* (/ l t_m) (/ l t_m)))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m))))))));
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * (1.0d0 / ((l / t_m) * (l / t_m))))))))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m))))))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m))))))))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(1.0 / Float64(Float64(l / t_m) * Float64(l / t_m)))))))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t_m) * (l / t_m)))))))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(1.0 / N[(N[(l / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{1}{\frac{\ell}{t_m} \cdot \frac{\ell}{t_m}}}}\right)
\end{array}
Initial program 86.7%
unpow286.7%
clear-num86.7%
clear-num86.7%
frac-times86.7%
metadata-eval86.7%
Applied egg-rr86.7%
unpow250.1%
clear-num50.1%
un-div-inv50.1%
Applied egg-rr86.7%
Final simplification86.7%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (if (or (<= l -1.2e-101) (not (<= l 6.5e+72))) (asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om))))) (asin (/ l (* t_m (pow 0.5 -0.5))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double tmp;
if ((l <= -1.2e-101) || !(l <= 6.5e+72)) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin((l / (t_m * pow(0.5, -0.5))));
}
return tmp;
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
real(8) :: tmp
if ((l <= (-1.2d-101)) .or. (.not. (l <= 6.5d+72))) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin((l / (t_m * (0.5d0 ** (-0.5d0)))))
end if
code = tmp
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
double tmp;
if ((l <= -1.2e-101) || !(l <= 6.5e+72)) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin((l / (t_m * Math.pow(0.5, -0.5))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): tmp = 0 if (l <= -1.2e-101) or not (l <= 6.5e+72): tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin((l / (t_m * math.pow(0.5, -0.5)))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) tmp = 0.0 if ((l <= -1.2e-101) || !(l <= 6.5e+72)) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(Float64(l / Float64(t_m * (0.5 ^ -0.5)))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) tmp = 0.0; if ((l <= -1.2e-101) || ~((l <= 6.5e+72))) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin((l / (t_m * (0.5 ^ -0.5)))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := If[Or[LessEqual[l, -1.2e-101], N[Not[LessEqual[l, 6.5e+72]], $MachinePrecision]], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t$95$m * N[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.2 \cdot 10^{-101} \lor \neg \left(\ell \leq 6.5 \cdot 10^{+72}\right):\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{t_m \cdot {0.5}^{-0.5}}\right)\\
\end{array}
\end{array}
if l < -1.2e-101 or 6.5000000000000001e72 < l Initial program 93.1%
Taylor expanded in t around 0 65.2%
unpow265.2%
unpow265.2%
times-frac72.6%
unpow272.6%
Simplified72.6%
unpow272.6%
clear-num72.6%
un-div-inv72.6%
Applied egg-rr72.6%
if -1.2e-101 < l < 6.5000000000000001e72Initial program 79.2%
unpow279.2%
frac-2neg79.2%
frac-times49.8%
Applied egg-rr49.8%
Taylor expanded in t around inf 49.2%
*-commutative49.2%
associate-*l/49.1%
*-commutative49.1%
associate-*l*49.1%
unpow249.1%
unpow249.1%
times-frac57.7%
unpow257.7%
Simplified57.7%
Taylor expanded in Om around 0 57.3%
associate-/l*57.2%
Simplified57.2%
div-inv57.2%
pow1/257.2%
pow-flip57.4%
metadata-eval57.4%
Applied egg-rr57.4%
Final simplification65.6%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (/ l (* t_m (pow 0.5 -0.5)))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin((l / (t_m * pow(0.5, -0.5))));
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin((l / (t_m * (0.5d0 ** (-0.5d0)))))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin((l / (t_m * Math.pow(0.5, -0.5))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin((l / (t_m * math.pow(0.5, -0.5))))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(Float64(l / Float64(t_m * (0.5 ^ -0.5)))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin((l / (t_m * (0.5 ^ -0.5)))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[(l / N[(t$95$m * N[Power[0.5, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\frac{\ell}{t_m \cdot {0.5}^{-0.5}}\right)
\end{array}
Initial program 86.7%
unpow286.7%
frac-2neg86.7%
frac-times59.0%
Applied egg-rr59.0%
Taylor expanded in t around inf 28.6%
*-commutative28.6%
associate-*l/28.6%
*-commutative28.6%
associate-*l*28.6%
unpow228.6%
unpow228.6%
times-frac34.1%
unpow234.1%
Simplified34.1%
Taylor expanded in Om around 0 33.9%
associate-/l*33.8%
Simplified33.8%
div-inv33.8%
pow1/233.8%
pow-flip33.9%
metadata-eval33.9%
Applied egg-rr33.9%
Final simplification33.9%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (* (/ l t_m) (sqrt 0.5))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin(((l / t_m) * sqrt(0.5)));
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(((l / t_m) * sqrt(0.5d0)))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin(((l / t_m) * Math.sqrt(0.5)));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin(((l / t_m) * math.sqrt(0.5)))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(Float64(Float64(l / t_m) * sqrt(0.5))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin(((l / t_m) * sqrt(0.5))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[(N[(l / t$95$m), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\frac{\ell}{t_m} \cdot \sqrt{0.5}\right)
\end{array}
Initial program 86.7%
unpow286.7%
frac-2neg86.7%
frac-times59.0%
Applied egg-rr59.0%
Taylor expanded in t around inf 28.6%
*-commutative28.6%
associate-*l/28.6%
*-commutative28.6%
associate-*l*28.6%
unpow228.6%
unpow228.6%
times-frac34.1%
unpow234.1%
Simplified34.1%
Taylor expanded in Om around 0 33.9%
associate-/l*33.8%
Simplified33.8%
associate-/r/33.9%
Applied egg-rr33.9%
Final simplification33.9%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (/ (* l (sqrt 0.5)) t_m)))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin(((l * sqrt(0.5)) / t_m));
}
t_m = abs(t)
real(8) function code(t_m, l, om, omc)
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: omc
code = asin(((l * sqrt(0.5d0)) / t_m))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin(((l * Math.sqrt(0.5)) / t_m));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin(((l * math.sqrt(0.5)) / t_m))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(Float64(Float64(l * sqrt(0.5)) / t_m)) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin(((l * sqrt(0.5)) / t_m)); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t_m}\right)
\end{array}
Initial program 86.7%
unpow286.7%
frac-2neg86.7%
frac-times59.0%
Applied egg-rr59.0%
Taylor expanded in t around inf 28.6%
*-commutative28.6%
associate-*l/28.6%
*-commutative28.6%
associate-*l*28.6%
unpow228.6%
unpow228.6%
times-frac34.1%
unpow234.1%
Simplified34.1%
Taylor expanded in Om around 0 33.9%
Final simplification33.9%
herbie shell --seed 2023332
(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)))))))