
(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 10 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 (pow (/ Om Omc) 2.0)) (t_2 (- 1.0 t_1)))
(if (<= (/ t_2 (+ 1.0 (* 2.0 (pow (/ t_m l) 2.0)))) 0.0)
(asin (* (+ 1.0 (* t_1 -0.5)) (/ (fabs (* l (sqrt 0.5))) t_m)))
(asin (sqrt (/ t_2 (+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m))))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = pow((Om / Omc), 2.0);
double t_2 = 1.0 - t_1;
double tmp;
if ((t_2 / (1.0 + (2.0 * pow((t_m / l), 2.0)))) <= 0.0) {
tmp = asin(((1.0 + (t_1 * -0.5)) * (fabs((l * sqrt(0.5))) / t_m)));
} else {
tmp = asin(sqrt((t_2 / (1.0 + (2.0 * ((t_m / l) / (l / 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) :: t_2
real(8) :: tmp
t_1 = (om / omc) ** 2.0d0
t_2 = 1.0d0 - t_1
if ((t_2 / (1.0d0 + (2.0d0 * ((t_m / l) ** 2.0d0)))) <= 0.0d0) then
tmp = asin(((1.0d0 + (t_1 * (-0.5d0))) * (abs((l * sqrt(0.5d0))) / t_m)))
else
tmp = asin(sqrt((t_2 / (1.0d0 + (2.0d0 * ((t_m / l) / (l / 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 = Math.pow((Om / Omc), 2.0);
double t_2 = 1.0 - t_1;
double tmp;
if ((t_2 / (1.0 + (2.0 * Math.pow((t_m / l), 2.0)))) <= 0.0) {
tmp = Math.asin(((1.0 + (t_1 * -0.5)) * (Math.abs((l * Math.sqrt(0.5))) / t_m)));
} else {
tmp = Math.asin(Math.sqrt((t_2 / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = math.pow((Om / Omc), 2.0) t_2 = 1.0 - t_1 tmp = 0 if (t_2 / (1.0 + (2.0 * math.pow((t_m / l), 2.0)))) <= 0.0: tmp = math.asin(((1.0 + (t_1 * -0.5)) * (math.fabs((l * math.sqrt(0.5))) / t_m))) else: tmp = math.asin(math.sqrt((t_2 / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(Om / Omc) ^ 2.0 t_2 = Float64(1.0 - t_1) tmp = 0.0 if (Float64(t_2 / Float64(1.0 + Float64(2.0 * (Float64(t_m / l) ^ 2.0)))) <= 0.0) tmp = asin(Float64(Float64(1.0 + Float64(t_1 * -0.5)) * Float64(abs(Float64(l * sqrt(0.5))) / t_m))); else tmp = asin(sqrt(Float64(t_2 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m))))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = (Om / Omc) ^ 2.0; t_2 = 1.0 - t_1; tmp = 0.0; if ((t_2 / (1.0 + (2.0 * ((t_m / l) ^ 2.0)))) <= 0.0) tmp = asin(((1.0 + (t_1 * -0.5)) * (abs((l * sqrt(0.5))) / t_m))); else tmp = asin(sqrt((t_2 / (1.0 + (2.0 * ((t_m / l) / (l / 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[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - t$95$1), $MachinePrecision]}, If[LessEqual[N[(t$95$2 / N[(1.0 + N[(2.0 * N[Power[N[(t$95$m / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[ArcSin[N[(N[(1.0 + N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(t$95$2 / 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]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := {\left(\frac{Om}{Omc}\right)}^{2}\\
t_2 := 1 - t_1\\
\mathbf{if}\;\frac{t_2}{1 + 2 \cdot {\left(\frac{t_m}{\ell}\right)}^{2}} \leq 0:\\
\;\;\;\;\sin^{-1} \left(\left(1 + t_1 \cdot -0.5\right) \cdot \frac{\left|\ell \cdot \sqrt{0.5}\right|}{t_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_2}{1 + 2 \cdot \frac{\frac{t_m}{\ell}}{\frac{\ell}{t_m}}}}\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 1 (pow.f64 (/.f64 Om Omc) 2)) (+.f64 1 (*.f64 2 (pow.f64 (/.f64 t l) 2)))) < 0.0Initial program 38.6%
Taylor expanded in Om around 0 35.1%
associate-*r*35.1%
distribute-rgt1-in35.1%
unpow235.1%
unpow235.1%
times-frac38.6%
unpow238.6%
+-commutative38.6%
fma-def38.6%
unpow238.6%
unpow238.6%
times-frac38.6%
unpow238.6%
Simplified38.6%
Taylor expanded in t around inf 66.0%
add-sqr-sqrt38.4%
sqrt-unprod54.6%
pow254.6%
Applied egg-rr54.6%
unpow254.6%
rem-sqrt-square64.5%
Simplified64.5%
if 0.0 < (/.f64 (-.f64 1 (pow.f64 (/.f64 Om Omc) 2)) (+.f64 1 (*.f64 2 (pow.f64 (/.f64 t l) 2)))) Initial program 99.0%
unpow299.0%
clear-num99.0%
un-div-inv99.0%
Applied egg-rr99.0%
Final simplification90.5%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (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 asin((sqrt((1.0 - pow((Om / Omc), 2.0))) / 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.asin((Math.sqrt((1.0 - Math.pow((Om / Omc), 2.0))) / 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.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.0))) / math.hypot(1.0, ((t_m * math.sqrt(2.0)) / l))))
t_m = abs(t) function code(t_m, l, 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)))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) ^ 2.0))) / hypot(1.0, ((t_m * sqrt(2.0)) / l)))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, 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), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t_m \cdot \sqrt{2}}{\ell}\right)}\right)
\end{array}
Initial program 84.1%
sqrt-div84.1%
div-inv84.1%
add-sqr-sqrt84.1%
hypot-1-def84.1%
*-commutative84.1%
sqrt-prod84.0%
unpow284.0%
sqrt-prod55.4%
add-sqr-sqrt98.8%
Applied egg-rr98.8%
associate-*r/98.8%
*-rgt-identity98.8%
associate-*l/98.8%
Simplified98.8%
Final simplification98.8%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ Om (* Omc (/ Omc Om))))))
(if (<= l -3.5e-305)
(asin
(sqrt
(/
(- 1.0 (pow (/ Om Omc) 2.0))
(+ 1.0 (* 2.0 (/ t_m (* l (/ l t_m))))))))
(if (<= l 2.1e-57)
(asin (* (sqrt t_1) (/ l (* t_m (sqrt 2.0)))))
(asin
(sqrt (/ t_1 (+ 1.0 (* 2.0 (* t_m (* (/ t_m l) (/ 1.0 l))))))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - (Om / (Omc * (Omc / Om)));
double tmp;
if (l <= -3.5e-305) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * (t_m / (l * (l / t_m))))))));
} else if (l <= 2.1e-57) {
tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0)))));
} else {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
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 * (omc / om)))
if (l <= (-3.5d-305)) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * (t_m / (l * (l / t_m))))))))
else if (l <= 2.1d-57) then
tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0d0)))))
else
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * (t_m * ((t_m / l) * (1.0d0 / l))))))))
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 - (Om / (Omc * (Omc / Om)));
double tmp;
if (l <= -3.5e-305) {
tmp = Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * (t_m / (l * (l / t_m))))))));
} else if (l <= 2.1e-57) {
tmp = Math.asin((Math.sqrt(t_1) * (l / (t_m * Math.sqrt(2.0)))));
} else {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 - (Om / (Omc * (Omc / Om))) tmp = 0 if l <= -3.5e-305: tmp = math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * (t_m / (l * (l / t_m)))))))) elif l <= 2.1e-57: tmp = math.asin((math.sqrt(t_1) * (l / (t_m * math.sqrt(2.0))))) else: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 - Float64(Om / Float64(Omc * Float64(Omc / Om)))) tmp = 0.0 if (l <= -3.5e-305) tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(t_m / Float64(l * Float64(l / t_m)))))))); elseif (l <= 2.1e-57) tmp = asin(Float64(sqrt(t_1) * Float64(l / Float64(t_m * sqrt(2.0))))); else tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(t_m * Float64(Float64(t_m / l) * Float64(1.0 / l)))))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = 1.0 - (Om / (Omc * (Omc / Om))); tmp = 0.0; if (l <= -3.5e-305) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * (t_m / (l * (l / t_m)))))))); elseif (l <= 2.1e-57) tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0))))); else tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))); 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[(Om / N[(Omc * N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.5e-305], 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[(t$95$m / N[(l * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.1e-57], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 - \frac{Om}{Omc \cdot \frac{Omc}{Om}}\\
\mathbf{if}\;\ell \leq -3.5 \cdot 10^{-305}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \frac{t_m}{\ell \cdot \frac{\ell}{t_m}}}}\right)\\
\mathbf{elif}\;\ell \leq 2.1 \cdot 10^{-57}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \frac{\ell}{t_m \cdot \sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(t_m \cdot \left(\frac{t_m}{\ell} \cdot \frac{1}{\ell}\right)\right)}}\right)\\
\end{array}
\end{array}
if l < -3.4999999999999998e-305Initial program 86.1%
unpow286.1%
clear-num86.1%
frac-times84.4%
*-un-lft-identity84.4%
Applied egg-rr84.4%
if -3.4999999999999998e-305 < l < 2.0999999999999999e-57Initial program 66.4%
sqrt-div66.2%
div-inv66.2%
add-sqr-sqrt66.2%
hypot-1-def66.2%
*-commutative66.2%
sqrt-prod66.3%
unpow266.3%
sqrt-prod43.3%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
associate-*r/98.1%
*-rgt-identity98.1%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in t around inf 51.3%
*-commutative51.3%
unpow251.3%
unpow251.3%
times-frac58.3%
unpow258.3%
Simplified58.3%
unpow216.4%
clear-num16.4%
frac-times16.4%
*-un-lft-identity16.4%
Applied egg-rr58.3%
if 2.0999999999999999e-57 < l Initial program 89.9%
unpow289.9%
div-inv89.9%
associate-*l*89.9%
Applied egg-rr89.9%
unpow268.9%
clear-num68.9%
frac-times68.9%
*-un-lft-identity68.9%
Applied egg-rr89.9%
Final simplification81.9%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ Om (* Omc (/ Omc Om))))))
(if (<= l -3.5e-305)
(asin
(sqrt
(/
(- 1.0 (pow (/ Om Omc) 2.0))
(+ 1.0 (* 2.0 (/ (/ t_m l) (/ l t_m)))))))
(if (<= l 2.5e-57)
(asin (* (sqrt t_1) (/ l (* t_m (sqrt 2.0)))))
(asin
(sqrt (/ t_1 (+ 1.0 (* 2.0 (* t_m (* (/ t_m l) (/ 1.0 l))))))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - (Om / (Omc * (Omc / Om)));
double tmp;
if (l <= -3.5e-305) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else if (l <= 2.5e-57) {
tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0)))));
} else {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
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 * (omc / om)))
if (l <= (-3.5d-305)) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t_m / l) / (l / t_m)))))))
else if (l <= 2.5d-57) then
tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0d0)))))
else
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * (t_m * ((t_m / l) * (1.0d0 / l))))))))
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 - (Om / (Omc * (Omc / Om)));
double tmp;
if (l <= -3.5e-305) {
tmp = Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) / (l / t_m)))))));
} else if (l <= 2.5e-57) {
tmp = Math.asin((Math.sqrt(t_1) * (l / (t_m * Math.sqrt(2.0)))));
} else {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 - (Om / (Omc * (Omc / Om))) tmp = 0 if l <= -3.5e-305: tmp = math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))) elif l <= 2.5e-57: tmp = math.asin((math.sqrt(t_1) * (l / (t_m * math.sqrt(2.0))))) else: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 - Float64(Om / Float64(Omc * Float64(Omc / Om)))) tmp = 0.0 if (l <= -3.5e-305) tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m / l) / Float64(l / t_m))))))); elseif (l <= 2.5e-57) tmp = asin(Float64(sqrt(t_1) * Float64(l / Float64(t_m * sqrt(2.0))))); else tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(t_m * Float64(Float64(t_m / l) * Float64(1.0 / l)))))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = 1.0 - (Om / (Omc * (Omc / Om))); tmp = 0.0; if (l <= -3.5e-305) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t_m / l) / (l / t_m))))))); elseif (l <= 2.5e-57) tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0))))); else tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))); 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[(Om / N[(Omc * N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.5e-305], 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[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.5e-57], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 - \frac{Om}{Omc \cdot \frac{Omc}{Om}}\\
\mathbf{if}\;\ell \leq -3.5 \cdot 10^{-305}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \frac{\frac{t_m}{\ell}}{\frac{\ell}{t_m}}}}\right)\\
\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{-57}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \frac{\ell}{t_m \cdot \sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(t_m \cdot \left(\frac{t_m}{\ell} \cdot \frac{1}{\ell}\right)\right)}}\right)\\
\end{array}
\end{array}
if l < -3.4999999999999998e-305Initial program 86.1%
unpow286.1%
clear-num86.1%
un-div-inv86.1%
Applied egg-rr86.1%
if -3.4999999999999998e-305 < l < 2.5000000000000001e-57Initial program 66.4%
sqrt-div66.2%
div-inv66.2%
add-sqr-sqrt66.2%
hypot-1-def66.2%
*-commutative66.2%
sqrt-prod66.3%
unpow266.3%
sqrt-prod43.3%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
associate-*r/98.1%
*-rgt-identity98.1%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in t around inf 51.3%
*-commutative51.3%
unpow251.3%
unpow251.3%
times-frac58.3%
unpow258.3%
Simplified58.3%
unpow216.4%
clear-num16.4%
frac-times16.4%
*-un-lft-identity16.4%
Applied egg-rr58.3%
if 2.5000000000000001e-57 < l Initial program 89.9%
unpow289.9%
div-inv89.9%
associate-*l*89.9%
Applied egg-rr89.9%
unpow268.9%
clear-num68.9%
frac-times68.9%
*-un-lft-identity68.9%
Applied egg-rr89.9%
Final simplification82.8%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (/ Om (* Omc (/ Omc Om))))))
(if (<= l -3.5e-305)
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (* t_m (/ t_m l)) l))))))
(if (<= l 2.7e-57)
(asin (* (sqrt t_1) (/ l (* t_m (sqrt 2.0)))))
(asin
(sqrt (/ t_1 (+ 1.0 (* 2.0 (* t_m (* (/ t_m l) (/ 1.0 l))))))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 - (Om / (Omc * (Omc / Om)));
double tmp;
if (l <= -3.5e-305) {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m * (t_m / l)) / l))))));
} else if (l <= 2.7e-57) {
tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0)))));
} else {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
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 * (omc / om)))
if (l <= (-3.5d-305)) then
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * ((t_m * (t_m / l)) / l))))))
else if (l <= 2.7d-57) then
tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0d0)))))
else
tmp = asin(sqrt((t_1 / (1.0d0 + (2.0d0 * (t_m * ((t_m / l) * (1.0d0 / l))))))))
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 - (Om / (Omc * (Omc / Om)));
double tmp;
if (l <= -3.5e-305) {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t_m * (t_m / l)) / l))))));
} else if (l <= 2.7e-57) {
tmp = Math.asin((Math.sqrt(t_1) * (l / (t_m * Math.sqrt(2.0)))));
} else {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 - (Om / (Omc * (Omc / Om))) tmp = 0 if l <= -3.5e-305: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t_m * (t_m / l)) / l)))))) elif l <= 2.7e-57: tmp = math.asin((math.sqrt(t_1) * (l / (t_m * math.sqrt(2.0))))) else: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 - Float64(Om / Float64(Omc * Float64(Omc / Om)))) tmp = 0.0 if (l <= -3.5e-305) tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l)) / l)))))); elseif (l <= 2.7e-57) tmp = asin(Float64(sqrt(t_1) * Float64(l / Float64(t_m * sqrt(2.0))))); else tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(t_m * Float64(Float64(t_m / l) * Float64(1.0 / l)))))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = 1.0 - (Om / (Omc * (Omc / Om))); tmp = 0.0; if (l <= -3.5e-305) tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t_m * (t_m / l)) / l)))))); elseif (l <= 2.7e-57) tmp = asin((sqrt(t_1) * (l / (t_m * sqrt(2.0))))); else tmp = asin(sqrt((t_1 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))); 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[(Om / N[(Omc * N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -3.5e-305], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.7e-57], N[ArcSin[N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(l / N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 - \frac{Om}{Omc \cdot \frac{Omc}{Om}}\\
\mathbf{if}\;\ell \leq -3.5 \cdot 10^{-305}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{t_m \cdot \frac{t_m}{\ell}}{\ell}}}\right)\\
\mathbf{elif}\;\ell \leq 2.7 \cdot 10^{-57}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{t_1} \cdot \frac{\ell}{t_m \cdot \sqrt{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \left(t_m \cdot \left(\frac{t_m}{\ell} \cdot \frac{1}{\ell}\right)\right)}}\right)\\
\end{array}
\end{array}
if l < -3.4999999999999998e-305Initial program 86.1%
unpow286.1%
associate-*r/83.8%
Applied egg-rr83.8%
unpow261.2%
clear-num61.2%
frac-times61.2%
*-un-lft-identity61.2%
Applied egg-rr83.8%
if -3.4999999999999998e-305 < l < 2.7000000000000002e-57Initial program 66.4%
sqrt-div66.2%
div-inv66.2%
add-sqr-sqrt66.2%
hypot-1-def66.2%
*-commutative66.2%
sqrt-prod66.3%
unpow266.3%
sqrt-prod43.3%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
associate-*r/98.1%
*-rgt-identity98.1%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in t around inf 51.3%
*-commutative51.3%
unpow251.3%
unpow251.3%
times-frac58.3%
unpow258.3%
Simplified58.3%
unpow216.4%
clear-num16.4%
frac-times16.4%
*-un-lft-identity16.4%
Applied egg-rr58.3%
if 2.7000000000000002e-57 < l Initial program 89.9%
unpow289.9%
div-inv89.9%
associate-*l*89.9%
Applied egg-rr89.9%
unpow268.9%
clear-num68.9%
frac-times68.9%
*-un-lft-identity68.9%
Applied egg-rr89.9%
Final simplification81.7%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (/ Om (* Omc (/ Omc Om)))) (t_2 (- 1.0 t_1)))
(if (<= l -3.5e-305)
(asin (sqrt (/ t_2 (+ 1.0 (* 2.0 (/ (* t_m (/ t_m l)) l))))))
(if (<= l 1.7e-57)
(asin (* (+ 1.0 (* -0.5 t_1)) (/ (* l (sqrt 0.5)) t_m)))
(asin
(sqrt (/ t_2 (+ 1.0 (* 2.0 (* t_m (* (/ t_m l) (/ 1.0 l))))))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = Om / (Omc * (Omc / Om));
double t_2 = 1.0 - t_1;
double tmp;
if (l <= -3.5e-305) {
tmp = asin(sqrt((t_2 / (1.0 + (2.0 * ((t_m * (t_m / l)) / l))))));
} else if (l <= 1.7e-57) {
tmp = asin(((1.0 + (-0.5 * t_1)) * ((l * sqrt(0.5)) / t_m)));
} else {
tmp = asin(sqrt((t_2 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
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) :: t_2
real(8) :: tmp
t_1 = om / (omc * (omc / om))
t_2 = 1.0d0 - t_1
if (l <= (-3.5d-305)) then
tmp = asin(sqrt((t_2 / (1.0d0 + (2.0d0 * ((t_m * (t_m / l)) / l))))))
else if (l <= 1.7d-57) then
tmp = asin(((1.0d0 + ((-0.5d0) * t_1)) * ((l * sqrt(0.5d0)) / t_m)))
else
tmp = asin(sqrt((t_2 / (1.0d0 + (2.0d0 * (t_m * ((t_m / l) * (1.0d0 / l))))))))
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 = Om / (Omc * (Omc / Om));
double t_2 = 1.0 - t_1;
double tmp;
if (l <= -3.5e-305) {
tmp = Math.asin(Math.sqrt((t_2 / (1.0 + (2.0 * ((t_m * (t_m / l)) / l))))));
} else if (l <= 1.7e-57) {
tmp = Math.asin(((1.0 + (-0.5 * t_1)) * ((l * Math.sqrt(0.5)) / t_m)));
} else {
tmp = Math.asin(Math.sqrt((t_2 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l))))))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = Om / (Omc * (Omc / Om)) t_2 = 1.0 - t_1 tmp = 0 if l <= -3.5e-305: tmp = math.asin(math.sqrt((t_2 / (1.0 + (2.0 * ((t_m * (t_m / l)) / l)))))) elif l <= 1.7e-57: tmp = math.asin(((1.0 + (-0.5 * t_1)) * ((l * math.sqrt(0.5)) / t_m))) else: tmp = math.asin(math.sqrt((t_2 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(Om / Float64(Omc * Float64(Omc / Om))) t_2 = Float64(1.0 - t_1) tmp = 0.0 if (l <= -3.5e-305) tmp = asin(sqrt(Float64(t_2 / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l)) / l)))))); elseif (l <= 1.7e-57) tmp = asin(Float64(Float64(1.0 + Float64(-0.5 * t_1)) * Float64(Float64(l * sqrt(0.5)) / t_m))); else tmp = asin(sqrt(Float64(t_2 / Float64(1.0 + Float64(2.0 * Float64(t_m * Float64(Float64(t_m / l) * Float64(1.0 / l)))))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = Om / (Omc * (Omc / Om)); t_2 = 1.0 - t_1; tmp = 0.0; if (l <= -3.5e-305) tmp = asin(sqrt((t_2 / (1.0 + (2.0 * ((t_m * (t_m / l)) / l)))))); elseif (l <= 1.7e-57) tmp = asin(((1.0 + (-0.5 * t_1)) * ((l * sqrt(0.5)) / t_m))); else tmp = asin(sqrt((t_2 / (1.0 + (2.0 * (t_m * ((t_m / l) * (1.0 / l)))))))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(Om / N[(Omc * N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - t$95$1), $MachinePrecision]}, If[LessEqual[l, -3.5e-305], N[ArcSin[N[Sqrt[N[(t$95$2 / N[(1.0 + N[(2.0 * N[(N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.7e-57], N[ArcSin[N[(N[(1.0 + N[(-0.5 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(t$95$2 / N[(1.0 + N[(2.0 * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := \frac{Om}{Omc \cdot \frac{Omc}{Om}}\\
t_2 := 1 - t_1\\
\mathbf{if}\;\ell \leq -3.5 \cdot 10^{-305}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_2}{1 + 2 \cdot \frac{t_m \cdot \frac{t_m}{\ell}}{\ell}}}\right)\\
\mathbf{elif}\;\ell \leq 1.7 \cdot 10^{-57}:\\
\;\;\;\;\sin^{-1} \left(\left(1 + -0.5 \cdot t_1\right) \cdot \frac{\ell \cdot \sqrt{0.5}}{t_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_2}{1 + 2 \cdot \left(t_m \cdot \left(\frac{t_m}{\ell} \cdot \frac{1}{\ell}\right)\right)}}\right)\\
\end{array}
\end{array}
if l < -3.4999999999999998e-305Initial program 86.1%
unpow286.1%
associate-*r/83.8%
Applied egg-rr83.8%
unpow261.2%
clear-num61.2%
frac-times61.2%
*-un-lft-identity61.2%
Applied egg-rr83.8%
if -3.4999999999999998e-305 < l < 1.70000000000000008e-57Initial program 66.4%
Taylor expanded in Om around 0 41.6%
associate-*r*41.6%
distribute-rgt1-in41.6%
unpow241.6%
unpow241.6%
times-frac46.4%
unpow246.4%
+-commutative46.4%
fma-def46.4%
unpow246.4%
unpow246.4%
times-frac66.4%
unpow266.4%
Simplified66.4%
Taylor expanded in t around inf 58.1%
unpow216.4%
clear-num16.4%
frac-times16.4%
*-un-lft-identity16.4%
Applied egg-rr58.1%
if 1.70000000000000008e-57 < l Initial program 89.9%
unpow289.9%
div-inv89.9%
associate-*l*89.9%
Applied egg-rr89.9%
unpow268.9%
clear-num68.9%
frac-times68.9%
*-un-lft-identity68.9%
Applied egg-rr89.9%
Final simplification81.6%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (/ Om (* Omc (/ Omc Om)))))
(if (<= t_m 1e+222)
(asin (sqrt (/ (- 1.0 t_1) (+ 1.0 (* 2.0 (/ (* t_m (/ t_m l)) l))))))
(asin (* (+ 1.0 (* -0.5 t_1)) (/ l (/ t_m (sqrt 0.5))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = Om / (Omc * (Omc / Om));
double tmp;
if (t_m <= 1e+222) {
tmp = asin(sqrt(((1.0 - t_1) / (1.0 + (2.0 * ((t_m * (t_m / l)) / l))))));
} else {
tmp = asin(((1.0 + (-0.5 * t_1)) * (l / (t_m / sqrt(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) :: t_1
real(8) :: tmp
t_1 = om / (omc * (omc / om))
if (t_m <= 1d+222) then
tmp = asin(sqrt(((1.0d0 - t_1) / (1.0d0 + (2.0d0 * ((t_m * (t_m / l)) / l))))))
else
tmp = asin(((1.0d0 + ((-0.5d0) * t_1)) * (l / (t_m / sqrt(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 t_1 = Om / (Omc * (Omc / Om));
double tmp;
if (t_m <= 1e+222) {
tmp = Math.asin(Math.sqrt(((1.0 - t_1) / (1.0 + (2.0 * ((t_m * (t_m / l)) / l))))));
} else {
tmp = Math.asin(((1.0 + (-0.5 * t_1)) * (l / (t_m / Math.sqrt(0.5)))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = Om / (Omc * (Omc / Om)) tmp = 0 if t_m <= 1e+222: tmp = math.asin(math.sqrt(((1.0 - t_1) / (1.0 + (2.0 * ((t_m * (t_m / l)) / l)))))) else: tmp = math.asin(((1.0 + (-0.5 * t_1)) * (l / (t_m / math.sqrt(0.5))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(Om / Float64(Omc * Float64(Omc / Om))) tmp = 0.0 if (t_m <= 1e+222) tmp = asin(sqrt(Float64(Float64(1.0 - t_1) / Float64(1.0 + Float64(2.0 * Float64(Float64(t_m * Float64(t_m / l)) / l)))))); else tmp = asin(Float64(Float64(1.0 + Float64(-0.5 * t_1)) * Float64(l / Float64(t_m / sqrt(0.5))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = Om / (Omc * (Omc / Om)); tmp = 0.0; if (t_m <= 1e+222) tmp = asin(sqrt(((1.0 - t_1) / (1.0 + (2.0 * ((t_m * (t_m / l)) / l)))))); else tmp = asin(((1.0 + (-0.5 * t_1)) * (l / (t_m / sqrt(0.5))))); end tmp_2 = tmp; end
t_m = N[Abs[t], $MachinePrecision]
code[t$95$m_, l_, Om_, Omc_] := Block[{t$95$1 = N[(Om / N[(Omc * N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$m, 1e+222], N[ArcSin[N[Sqrt[N[(N[(1.0 - t$95$1), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(1.0 + N[(-0.5 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := \frac{Om}{Omc \cdot \frac{Omc}{Om}}\\
\mathbf{if}\;t_m \leq 10^{+222}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - t_1}{1 + 2 \cdot \frac{t_m \cdot \frac{t_m}{\ell}}{\ell}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\left(1 + -0.5 \cdot t_1\right) \cdot \frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if t < 1e222Initial program 83.8%
unpow283.8%
associate-*r/83.0%
Applied egg-rr83.0%
unpow260.2%
clear-num60.2%
frac-times60.2%
*-un-lft-identity60.2%
Applied egg-rr83.0%
if 1e222 < t Initial program 86.8%
Taylor expanded in Om around 0 46.6%
associate-*r*46.6%
distribute-rgt1-in46.6%
unpow246.6%
unpow246.6%
times-frac46.6%
unpow246.6%
+-commutative46.6%
fma-def46.6%
unpow246.6%
unpow246.6%
times-frac86.9%
unpow286.9%
Simplified86.9%
Taylor expanded in t around inf 79.2%
associate-/l*79.1%
Simplified79.1%
unpow219.2%
clear-num19.2%
frac-times19.2%
*-un-lft-identity19.2%
Applied egg-rr79.1%
Final simplification82.7%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (+ 1.0 (* -0.5 (/ Om (* Omc (/ Omc Om)))))))
(if (or (<= l -1.45e-300) (not (<= l 6.4e+60)))
(asin t_1)
(asin (* t_1 (/ l (/ t_m (sqrt 0.5))))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 + (-0.5 * (Om / (Omc * (Omc / Om))));
double tmp;
if ((l <= -1.45e-300) || !(l <= 6.4e+60)) {
tmp = asin(t_1);
} else {
tmp = asin((t_1 * (l / (t_m / sqrt(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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 + ((-0.5d0) * (om / (omc * (omc / om))))
if ((l <= (-1.45d-300)) .or. (.not. (l <= 6.4d+60))) then
tmp = asin(t_1)
else
tmp = asin((t_1 * (l / (t_m / sqrt(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 t_1 = 1.0 + (-0.5 * (Om / (Omc * (Omc / Om))));
double tmp;
if ((l <= -1.45e-300) || !(l <= 6.4e+60)) {
tmp = Math.asin(t_1);
} else {
tmp = Math.asin((t_1 * (l / (t_m / Math.sqrt(0.5)))));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 + (-0.5 * (Om / (Omc * (Omc / Om)))) tmp = 0 if (l <= -1.45e-300) or not (l <= 6.4e+60): tmp = math.asin(t_1) else: tmp = math.asin((t_1 * (l / (t_m / math.sqrt(0.5))))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 + Float64(-0.5 * Float64(Om / Float64(Omc * Float64(Omc / Om))))) tmp = 0.0 if ((l <= -1.45e-300) || !(l <= 6.4e+60)) tmp = asin(t_1); else tmp = asin(Float64(t_1 * Float64(l / Float64(t_m / sqrt(0.5))))); end return tmp end
t_m = abs(t); function tmp_2 = code(t_m, l, Om, Omc) t_1 = 1.0 + (-0.5 * (Om / (Omc * (Omc / Om)))); tmp = 0.0; if ((l <= -1.45e-300) || ~((l <= 6.4e+60))) tmp = asin(t_1); else tmp = asin((t_1 * (l / (t_m / sqrt(0.5))))); 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[(-0.5 * N[(Om / N[(Omc * N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[l, -1.45e-300], N[Not[LessEqual[l, 6.4e+60]], $MachinePrecision]], N[ArcSin[t$95$1], $MachinePrecision], N[ArcSin[N[(t$95$1 * N[(l / N[(t$95$m / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 + -0.5 \cdot \frac{Om}{Omc \cdot \frac{Omc}{Om}}\\
\mathbf{if}\;\ell \leq -1.45 \cdot 10^{-300} \lor \neg \left(\ell \leq 6.4 \cdot 10^{+60}\right):\\
\;\;\;\;\sin^{-1} t_1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{\ell}{\frac{t_m}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if l < -1.44999999999999996e-300 or 6.39999999999999982e60 < l Initial program 89.7%
Taylor expanded in Om around 0 57.9%
associate-*r*57.9%
distribute-rgt1-in57.9%
unpow257.9%
unpow257.9%
times-frac67.8%
unpow267.8%
+-commutative67.8%
fma-def67.8%
unpow267.8%
unpow267.8%
times-frac89.8%
unpow289.8%
Simplified89.8%
Taylor expanded in t around 0 68.1%
unpow268.1%
clear-num68.1%
frac-times68.1%
*-un-lft-identity68.1%
Applied egg-rr68.1%
if -1.44999999999999996e-300 < l < 6.39999999999999982e60Initial program 70.6%
Taylor expanded in Om around 0 52.3%
associate-*r*52.3%
distribute-rgt1-in52.3%
unpow252.3%
unpow252.3%
times-frac57.7%
unpow257.7%
+-commutative57.7%
fma-def57.7%
unpow257.7%
unpow257.7%
times-frac70.6%
unpow270.6%
Simplified70.6%
Taylor expanded in t around inf 49.6%
associate-/l*49.7%
Simplified49.7%
unpow228.0%
clear-num28.0%
frac-times28.0%
*-un-lft-identity28.0%
Applied egg-rr49.7%
Final simplification62.7%
t_m = (fabs.f64 t)
(FPCore (t_m l Om Omc)
:precision binary64
(let* ((t_1 (+ 1.0 (* -0.5 (/ Om (* Omc (/ Omc Om)))))))
(if (or (<= l -1.45e-300) (not (<= l 5e+60)))
(asin t_1)
(asin (* t_1 (/ (* l (sqrt 0.5)) t_m))))))t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
double t_1 = 1.0 + (-0.5 * (Om / (Omc * (Omc / Om))));
double tmp;
if ((l <= -1.45e-300) || !(l <= 5e+60)) {
tmp = asin(t_1);
} else {
tmp = asin((t_1 * ((l * 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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 + ((-0.5d0) * (om / (omc * (omc / om))))
if ((l <= (-1.45d-300)) .or. (.not. (l <= 5d+60))) then
tmp = asin(t_1)
else
tmp = asin((t_1 * ((l * 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 t_1 = 1.0 + (-0.5 * (Om / (Omc * (Omc / Om))));
double tmp;
if ((l <= -1.45e-300) || !(l <= 5e+60)) {
tmp = Math.asin(t_1);
} else {
tmp = Math.asin((t_1 * ((l * Math.sqrt(0.5)) / t_m)));
}
return tmp;
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): t_1 = 1.0 + (-0.5 * (Om / (Omc * (Omc / Om)))) tmp = 0 if (l <= -1.45e-300) or not (l <= 5e+60): tmp = math.asin(t_1) else: tmp = math.asin((t_1 * ((l * math.sqrt(0.5)) / t_m))) return tmp
t_m = abs(t) function code(t_m, l, Om, Omc) t_1 = Float64(1.0 + Float64(-0.5 * Float64(Om / Float64(Omc * Float64(Omc / Om))))) tmp = 0.0 if ((l <= -1.45e-300) || !(l <= 5e+60)) tmp = asin(t_1); else tmp = asin(Float64(t_1 * Float64(Float64(l * sqrt(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 + (-0.5 * (Om / (Omc * (Omc / Om)))); tmp = 0.0; if ((l <= -1.45e-300) || ~((l <= 5e+60))) tmp = asin(t_1); else tmp = asin((t_1 * ((l * sqrt(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[(-0.5 * N[(Om / N[(Omc * N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[l, -1.45e-300], N[Not[LessEqual[l, 5e+60]], $MachinePrecision]], N[ArcSin[t$95$1], $MachinePrecision], N[ArcSin[N[(t$95$1 * N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
\begin{array}{l}
t_1 := 1 + -0.5 \cdot \frac{Om}{Omc \cdot \frac{Omc}{Om}}\\
\mathbf{if}\;\ell \leq -1.45 \cdot 10^{-300} \lor \neg \left(\ell \leq 5 \cdot 10^{+60}\right):\\
\;\;\;\;\sin^{-1} t_1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(t_1 \cdot \frac{\ell \cdot \sqrt{0.5}}{t_m}\right)\\
\end{array}
\end{array}
if l < -1.44999999999999996e-300 or 4.99999999999999975e60 < l Initial program 89.7%
Taylor expanded in Om around 0 57.9%
associate-*r*57.9%
distribute-rgt1-in57.9%
unpow257.9%
unpow257.9%
times-frac67.8%
unpow267.8%
+-commutative67.8%
fma-def67.8%
unpow267.8%
unpow267.8%
times-frac89.8%
unpow289.8%
Simplified89.8%
Taylor expanded in t around 0 68.1%
unpow268.1%
clear-num68.1%
frac-times68.1%
*-un-lft-identity68.1%
Applied egg-rr68.1%
if -1.44999999999999996e-300 < l < 4.99999999999999975e60Initial program 70.6%
Taylor expanded in Om around 0 52.3%
associate-*r*52.3%
distribute-rgt1-in52.3%
unpow252.3%
unpow252.3%
times-frac57.7%
unpow257.7%
+-commutative57.7%
fma-def57.7%
unpow257.7%
unpow257.7%
times-frac70.6%
unpow270.6%
Simplified70.6%
Taylor expanded in t around inf 49.6%
unpow228.0%
clear-num28.0%
frac-times28.0%
*-un-lft-identity28.0%
Applied egg-rr49.6%
Final simplification62.7%
t_m = (fabs.f64 t) (FPCore (t_m l Om Omc) :precision binary64 (asin (+ 1.0 (* -0.5 (/ Om (* Omc (/ Omc Om)))))))
t_m = fabs(t);
double code(double t_m, double l, double Om, double Omc) {
return asin((1.0 + (-0.5 * (Om / (Omc * (Omc / Om))))));
}
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((1.0d0 + ((-0.5d0) * (om / (omc * (omc / om))))))
end function
t_m = Math.abs(t);
public static double code(double t_m, double l, double Om, double Omc) {
return Math.asin((1.0 + (-0.5 * (Om / (Omc * (Omc / Om))))));
}
t_m = math.fabs(t) def code(t_m, l, Om, Omc): return math.asin((1.0 + (-0.5 * (Om / (Omc * (Omc / Om))))))
t_m = abs(t) function code(t_m, l, Om, Omc) return asin(Float64(1.0 + Float64(-0.5 * Float64(Om / Float64(Omc * Float64(Omc / Om)))))) end
t_m = abs(t); function tmp = code(t_m, l, Om, Omc) tmp = asin((1.0 + (-0.5 * (Om / (Omc * (Omc / Om)))))); end
t_m = N[Abs[t], $MachinePrecision] code[t$95$m_, l_, Om_, Omc_] := N[ArcSin[N[(1.0 + N[(-0.5 * N[(Om / N[(Omc * N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
\sin^{-1} \left(1 + -0.5 \cdot \frac{Om}{Omc \cdot \frac{Omc}{Om}}\right)
\end{array}
Initial program 84.1%
Taylor expanded in Om around 0 56.3%
associate-*r*56.3%
distribute-rgt1-in56.3%
unpow256.3%
unpow256.3%
times-frac64.9%
unpow264.9%
+-commutative64.9%
fma-def64.9%
unpow264.9%
unpow264.9%
times-frac84.1%
unpow284.1%
Simplified84.1%
Taylor expanded in t around 0 56.4%
unpow256.4%
clear-num56.4%
frac-times56.4%
*-un-lft-identity56.4%
Applied egg-rr56.4%
Final simplification56.4%
herbie shell --seed 2023337
(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)))))))