
(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}
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+126)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 2e+140)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ 1.0 (* (/ l t) (/ l t))))))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+126) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 2e+140) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t) * (l / t))))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-2d+126)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 2d+140) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * (1.0d0 / ((l / t) * (l / t))))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+126) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 2e+140) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t) * (l / t))))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+126: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 2e+140: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t) * (l / t)))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+126) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 2e+140) tmp = 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) * Float64(l / t)))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+126) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 2e+140) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t) * (l / t)))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+126], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+140], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(1.0 / N[(N[(l / t), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+126}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+140}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.99999999999999985e126Initial program 51.6%
Taylor expanded in t around -inf 94.3%
mul-1-neg94.3%
*-commutative94.3%
distribute-rgt-neg-in94.3%
unpow294.3%
unpow294.3%
times-frac99.6%
unpow299.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.6%
mul-1-neg99.6%
associate-/l*99.7%
Simplified99.7%
if -1.99999999999999985e126 < (/.f64 t l) < 2.00000000000000012e140Initial program 97.8%
unpow297.8%
clear-num97.9%
clear-num97.8%
frac-times97.9%
metadata-eval97.9%
Applied egg-rr97.9%
unpow297.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
if 2.00000000000000012e140 < (/.f64 t l) Initial program 51.7%
sqrt-div51.7%
div-inv51.7%
add-sqr-sqrt51.7%
hypot-1-def51.7%
*-commutative51.7%
sqrt-prod51.7%
unpow251.7%
sqrt-prod98.9%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
unpow251.7%
clear-num51.7%
un-div-inv51.7%
Applied egg-rr99.1%
Taylor expanded in Om around 0 48.5%
associate-/l*48.5%
unpow248.5%
rem-square-sqrt48.6%
unpow248.6%
unpow248.6%
times-frac51.7%
Simplified51.7%
Taylor expanded in l around 0 99.4%
Final simplification98.4%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (- 1.0 (pow (/ Om Omc) 2.0))))
(if (<= (/ t_1 (+ 1.0 (* 2.0 (pow (/ t l) 2.0)))) 0.0)
(asin (/ 1.0 (hypot 1.0 (* (/ t l) (sqrt 2.0)))))
(asin (sqrt (/ t_1 (+ 1.0 (* 2.0 (/ (/ t l) (/ l t))))))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - pow((Om / Omc), 2.0);
double tmp;
if ((t_1 / (1.0 + (2.0 * pow((t / l), 2.0)))) <= 0.0) {
tmp = asin((1.0 / hypot(1.0, ((t / l) * sqrt(2.0)))));
} else {
tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
}
return tmp;
}
public static double code(double t, double l, double Om, double Omc) {
double t_1 = 1.0 - Math.pow((Om / Omc), 2.0);
double tmp;
if ((t_1 / (1.0 + (2.0 * Math.pow((t / l), 2.0)))) <= 0.0) {
tmp = Math.asin((1.0 / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))));
} else {
tmp = Math.asin(Math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) / (l / t)))))));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = 1.0 - math.pow((Om / Omc), 2.0) tmp = 0 if (t_1 / (1.0 + (2.0 * math.pow((t / l), 2.0)))) <= 0.0: tmp = math.asin((1.0 / math.hypot(1.0, ((t / l) * math.sqrt(2.0))))) else: tmp = math.asin(math.sqrt((t_1 / (1.0 + (2.0 * ((t / l) / (l / t))))))) return tmp
function code(t, l, Om, Omc) t_1 = Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) tmp = 0.0 if (Float64(t_1 / Float64(1.0 + Float64(2.0 * (Float64(t / l) ^ 2.0)))) <= 0.0) tmp = asin(Float64(1.0 / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0))))); else tmp = asin(sqrt(Float64(t_1 / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = 1.0 - ((Om / Omc) ^ 2.0); tmp = 0.0; if ((t_1 / (1.0 + (2.0 * ((t / l) ^ 2.0)))) <= 0.0) tmp = asin((1.0 / hypot(1.0, ((t / l) * sqrt(2.0))))); else tmp = asin(sqrt((t_1 / (1.0 + (2.0 * ((t / l) / (l / t))))))); end tmp_2 = tmp; end
code[t_, 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$1 / N[(1.0 + N[(2.0 * N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[ArcSin[N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(t / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[Sqrt[N[(t$95$1 / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - {\left(\frac{Om}{Omc}\right)}^{2}\\
\mathbf{if}\;\frac{t_1}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}} \leq 0:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{t_1}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\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 46.6%
sqrt-div46.6%
div-inv46.6%
add-sqr-sqrt46.6%
hypot-1-def46.6%
*-commutative46.6%
sqrt-prod46.6%
unpow246.6%
sqrt-prod57.3%
add-sqr-sqrt99.3%
Applied egg-rr99.3%
unpow246.6%
clear-num46.6%
un-div-inv46.6%
Applied egg-rr99.3%
Taylor expanded in Om around 0 46.6%
associate-/l*46.6%
unpow246.6%
rem-square-sqrt46.6%
unpow246.6%
unpow246.6%
times-frac46.6%
Simplified46.6%
sqrt-div46.6%
metadata-eval46.6%
div-inv46.6%
frac-times46.6%
clear-num46.6%
clear-num46.6%
frac-times46.6%
div-inv46.6%
add-sqr-sqrt46.6%
hypot-1-def46.6%
div-inv46.6%
frac-times46.6%
clear-num46.6%
Applied egg-rr99.1%
if 0.0 < (/.f64 (-.f64 1 (pow.f64 (/.f64 Om Omc) 2)) (+.f64 1 (*.f64 2 (pow.f64 (/.f64 t l) 2)))) Initial program 97.9%
unpow297.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Final simplification98.3%
(FPCore (t l Om Omc) :precision binary64 (asin (* (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))) (/ 1.0 (hypot 1.0 (* (/ t l) (sqrt 2.0)))))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (1.0 / hypot(1.0, ((t / l) * sqrt(2.0))))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (1.0 / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0))))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (1.0 / math.hypot(1.0, ((t / l) * math.sqrt(2.0))))))
function code(t, l, Om, Omc) return asin(Float64(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om)))) * Float64(1.0 / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((sqrt((1.0 - ((Om / Omc) / (Omc / Om)))) * (1.0 / hypot(1.0, ((t / l) * sqrt(2.0)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(t / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}} \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 82.7%
sqrt-div82.6%
div-inv82.7%
add-sqr-sqrt82.7%
hypot-1-def82.7%
*-commutative82.7%
sqrt-prod82.6%
unpow282.6%
sqrt-prod61.0%
add-sqr-sqrt98.2%
Applied egg-rr98.2%
unpow282.7%
clear-num82.7%
un-div-inv82.7%
Applied egg-rr98.2%
Final simplification98.2%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (pow (/ t l) 2.0) 2e+280)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ 1.0 (* (/ l t) (/ l t))))))))
(asin (/ 1.0 (hypot 1.0 (* (/ t l) (sqrt 2.0)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (pow((t / l), 2.0) <= 2e+280) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t) * (l / t))))))));
} else {
tmp = asin((1.0 / hypot(1.0, ((t / l) * sqrt(2.0)))));
}
return tmp;
}
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (Math.pow((t / l), 2.0) <= 2e+280) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t) * (l / t))))))));
} else {
tmp = Math.asin((1.0 / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if math.pow((t / l), 2.0) <= 2e+280: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t) * (l / t)))))))) else: tmp = math.asin((1.0 / math.hypot(1.0, ((t / l) * math.sqrt(2.0))))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if ((Float64(t / l) ^ 2.0) <= 2e+280) tmp = 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) * Float64(l / t)))))))); else tmp = asin(Float64(1.0 / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0))))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (((t / l) ^ 2.0) <= 2e+280) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (1.0 / ((l / t) * (l / t)))))))); else tmp = asin((1.0 / hypot(1.0, ((t / l) * sqrt(2.0))))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision], 2e+280], 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), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(t / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{t}{\ell}\right)}^{2} \leq 2 \cdot 10^{+280}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{1}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)\\
\end{array}
\end{array}
if (pow.f64 (/.f64 t l) 2) < 2.0000000000000001e280Initial program 97.9%
unpow297.9%
clear-num97.9%
clear-num97.9%
frac-times97.9%
metadata-eval97.9%
Applied egg-rr97.9%
unpow297.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
if 2.0000000000000001e280 < (pow.f64 (/.f64 t l) 2) Initial program 49.3%
sqrt-div49.3%
div-inv49.3%
add-sqr-sqrt49.3%
hypot-1-def49.3%
*-commutative49.3%
sqrt-prod49.3%
unpow249.3%
sqrt-prod58.1%
add-sqr-sqrt99.3%
Applied egg-rr99.3%
unpow249.3%
clear-num49.3%
un-div-inv49.3%
Applied egg-rr99.3%
Taylor expanded in Om around 0 46.2%
associate-/l*46.2%
unpow246.2%
rem-square-sqrt46.2%
unpow246.2%
unpow246.2%
times-frac49.3%
Simplified49.3%
sqrt-div49.3%
metadata-eval49.3%
div-inv49.3%
frac-times46.2%
clear-num46.2%
clear-num46.2%
frac-times49.3%
div-inv49.3%
add-sqr-sqrt49.3%
hypot-1-def49.3%
div-inv49.3%
frac-times46.2%
clear-num46.2%
Applied egg-rr99.2%
Final simplification98.3%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+116)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 5e+34)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ t (* l (/ l t))))))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+116) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 5e+34) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t / (l * (l / t))))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-1d+116)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 5d+34) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * (t / (l * (l / t))))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+116) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 5e+34) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t / (l * (l / t))))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+116: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 5e+34: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t / (l * (l / t)))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+116) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 5e+34) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(t / Float64(l * Float64(l / t)))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+116) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 5e+34) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * (t / (l * (l / t)))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+116], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+34], 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[(t / N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+116}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+34}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{t}{\ell \cdot \frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.00000000000000002e116Initial program 52.8%
Taylor expanded in t around -inf 94.4%
mul-1-neg94.4%
*-commutative94.4%
distribute-rgt-neg-in94.4%
unpow294.4%
unpow294.4%
times-frac99.6%
unpow299.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.6%
mul-1-neg99.6%
associate-/l*99.7%
Simplified99.7%
if -1.00000000000000002e116 < (/.f64 t l) < 4.9999999999999998e34Initial program 97.7%
unpow297.7%
clear-num97.7%
clear-num97.6%
frac-times97.7%
metadata-eval97.7%
Applied egg-rr97.7%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
Applied egg-rr97.7%
*-un-lft-identity97.7%
associate-/r*97.7%
clear-num97.7%
Applied egg-rr97.7%
*-lft-identity97.7%
associate-/l/97.4%
*-commutative97.4%
Simplified97.4%
if 4.9999999999999998e34 < (/.f64 t l) Initial program 63.8%
sqrt-div63.9%
div-inv63.9%
add-sqr-sqrt63.9%
hypot-1-def63.9%
*-commutative63.9%
sqrt-prod63.8%
unpow263.8%
sqrt-prod98.9%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
unpow263.8%
clear-num63.8%
un-div-inv63.8%
Applied egg-rr99.2%
Taylor expanded in Om around 0 39.8%
associate-/l*39.8%
unpow239.8%
rem-square-sqrt39.9%
unpow239.9%
unpow239.9%
times-frac63.7%
Simplified63.7%
Taylor expanded in l around 0 99.3%
Final simplification98.2%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+126)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 2e+140)
(asin (sqrt (/ 1.0 (+ 1.0 (/ 2.0 (* (/ l t) (/ l t)))))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+126) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 2e+140) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 / ((l / t) * (l / t)))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-2d+126)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 2d+140) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 / ((l / t) * (l / t)))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+126) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 2e+140) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 / ((l / t) * (l / t)))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+126: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 2e+140: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 / ((l / t) * (l / t))))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+126) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 2e+140) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 / Float64(Float64(l / t) * Float64(l / t))))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+126) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 2e+140) tmp = asin(sqrt((1.0 / (1.0 + (2.0 / ((l / t) * (l / t))))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+126], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+140], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 / N[(N[(l / t), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+126}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+140}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{2}{\frac{\ell}{t} \cdot \frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.99999999999999985e126Initial program 51.6%
Taylor expanded in t around -inf 94.3%
mul-1-neg94.3%
*-commutative94.3%
distribute-rgt-neg-in94.3%
unpow294.3%
unpow294.3%
times-frac99.6%
unpow299.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.6%
mul-1-neg99.6%
associate-/l*99.7%
Simplified99.7%
if -1.99999999999999985e126 < (/.f64 t l) < 2.00000000000000012e140Initial program 97.8%
sqrt-div97.8%
div-inv97.8%
add-sqr-sqrt97.8%
hypot-1-def97.8%
*-commutative97.8%
sqrt-prod97.7%
unpow297.7%
sqrt-prod63.8%
add-sqr-sqrt97.7%
Applied egg-rr97.7%
unpow297.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.7%
Taylor expanded in Om around 0 70.8%
associate-/l*70.8%
unpow270.8%
rem-square-sqrt70.8%
unpow270.8%
unpow270.8%
times-frac95.2%
Simplified95.2%
if 2.00000000000000012e140 < (/.f64 t l) Initial program 51.7%
sqrt-div51.7%
div-inv51.7%
add-sqr-sqrt51.7%
hypot-1-def51.7%
*-commutative51.7%
sqrt-prod51.7%
unpow251.7%
sqrt-prod98.9%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
unpow251.7%
clear-num51.7%
un-div-inv51.7%
Applied egg-rr99.1%
Taylor expanded in Om around 0 48.5%
associate-/l*48.5%
unpow248.5%
rem-square-sqrt48.6%
unpow248.6%
unpow248.6%
times-frac51.7%
Simplified51.7%
Taylor expanded in l around 0 99.4%
Final simplification96.6%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+116)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 5e+34)
(asin (sqrt (/ 1.0 (+ 1.0 (/ 2.0 (/ (* l (/ l t)) t))))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+116) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 5e+34) {
tmp = asin(sqrt((1.0 / (1.0 + (2.0 / ((l * (l / t)) / t))))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-1d+116)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 5d+34) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + (2.0d0 / ((l * (l / t)) / t))))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+116) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 5e+34) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + (2.0 / ((l * (l / t)) / t))))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+116: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 5e+34: tmp = math.asin(math.sqrt((1.0 / (1.0 + (2.0 / ((l * (l / t)) / t)))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+116) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 5e+34) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(2.0 / Float64(Float64(l * Float64(l / t)) / t)))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+116) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 5e+34) tmp = asin(sqrt((1.0 / (1.0 + (2.0 / ((l * (l / t)) / t)))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+116], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+34], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(2.0 / N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+116}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+34}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{2}{\frac{\ell \cdot \frac{\ell}{t}}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.00000000000000002e116Initial program 52.8%
Taylor expanded in t around -inf 94.4%
mul-1-neg94.4%
*-commutative94.4%
distribute-rgt-neg-in94.4%
unpow294.4%
unpow294.4%
times-frac99.6%
unpow299.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in Om around 0 99.6%
mul-1-neg99.6%
associate-/l*99.7%
Simplified99.7%
if -1.00000000000000002e116 < (/.f64 t l) < 4.9999999999999998e34Initial program 97.7%
sqrt-div97.6%
div-inv97.6%
add-sqr-sqrt97.6%
hypot-1-def97.6%
*-commutative97.6%
sqrt-prod97.6%
unpow297.6%
sqrt-prod60.6%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
unpow297.7%
clear-num97.7%
un-div-inv97.7%
Applied egg-rr97.6%
Taylor expanded in Om around 0 77.1%
associate-/l*77.1%
unpow277.1%
rem-square-sqrt77.1%
unpow277.1%
unpow277.1%
times-frac94.8%
Simplified94.8%
associate-*r/94.8%
Applied egg-rr94.8%
if 4.9999999999999998e34 < (/.f64 t l) Initial program 63.8%
sqrt-div63.9%
div-inv63.9%
add-sqr-sqrt63.9%
hypot-1-def63.9%
*-commutative63.9%
sqrt-prod63.8%
unpow263.8%
sqrt-prod98.9%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
unpow263.8%
clear-num63.8%
un-div-inv63.8%
Applied egg-rr99.2%
Taylor expanded in Om around 0 39.8%
associate-/l*39.8%
unpow239.8%
rem-square-sqrt39.9%
unpow239.9%
unpow239.9%
times-frac63.7%
Simplified63.7%
Taylor expanded in l around 0 99.3%
Final simplification96.6%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -50.0)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 0.0005)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -50.0) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-50.0d0)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.0005d0) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -50.0) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -50.0: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.0005: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -50.0) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 0.0005) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -50.0) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.0005) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -50.0], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0005], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -50:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -50Initial program 68.9%
Taylor expanded in t around -inf 90.8%
mul-1-neg90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
unpow290.8%
unpow290.8%
times-frac97.1%
unpow297.1%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in Om around 0 95.2%
mul-1-neg95.2%
associate-/l*95.3%
Simplified95.3%
if -50 < (/.f64 t l) < 5.0000000000000001e-4Initial program 97.3%
Taylor expanded in t around 0 83.3%
unpow283.3%
unpow283.3%
times-frac95.7%
unpow295.7%
Simplified95.7%
unpow297.3%
clear-num97.3%
un-div-inv97.3%
Applied egg-rr95.7%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 66.9%
sqrt-div67.0%
div-inv67.0%
add-sqr-sqrt67.0%
hypot-1-def67.0%
*-commutative67.0%
sqrt-prod66.9%
unpow266.9%
sqrt-prod98.9%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
unpow267.0%
clear-num67.0%
un-div-inv67.0%
Applied egg-rr99.1%
Taylor expanded in Om around 0 37.6%
associate-/l*37.6%
unpow237.6%
rem-square-sqrt37.6%
unpow237.6%
unpow237.6%
times-frac65.8%
Simplified65.8%
Taylor expanded in l around 0 98.2%
Final simplification96.3%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -50.0)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 0.0005)
(asin (+ 1.0 (* (pow (/ Om Omc) 2.0) -0.5)))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -50.0) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = asin((1.0 + (pow((Om / Omc), 2.0) * -0.5)));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-50.0d0)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.0005d0) then
tmp = asin((1.0d0 + (((om / omc) ** 2.0d0) * (-0.5d0))))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -50.0) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin((1.0 + (Math.pow((Om / Omc), 2.0) * -0.5)));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -50.0: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.0005: tmp = math.asin((1.0 + (math.pow((Om / Omc), 2.0) * -0.5))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -50.0) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 0.0005) tmp = asin(Float64(1.0 + Float64((Float64(Om / Omc) ^ 2.0) * -0.5))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -50.0) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.0005) tmp = asin((1.0 + (((Om / Omc) ^ 2.0) * -0.5))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -50.0], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0005], N[ArcSin[N[(1.0 + N[(N[Power[N[(Om / Omc), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -50:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} \left(1 + {\left(\frac{Om}{Omc}\right)}^{2} \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -50Initial program 68.9%
Taylor expanded in t around -inf 90.8%
mul-1-neg90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
unpow290.8%
unpow290.8%
times-frac97.1%
unpow297.1%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in Om around 0 95.2%
mul-1-neg95.2%
associate-/l*95.3%
Simplified95.3%
if -50 < (/.f64 t l) < 5.0000000000000001e-4Initial program 97.3%
add-sqr-sqrt97.2%
pow297.2%
pow1/297.2%
sqrt-pow197.3%
+-commutative97.3%
fma-def97.3%
metadata-eval97.3%
Applied egg-rr97.3%
Taylor expanded in t around 0 83.3%
unpow283.3%
unpow283.3%
times-frac95.8%
unpow295.8%
Simplified95.8%
Taylor expanded in Om around 0 82.8%
unpow282.8%
unpow282.8%
times-frac95.2%
unpow295.2%
Simplified95.2%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 66.9%
sqrt-div67.0%
div-inv67.0%
add-sqr-sqrt67.0%
hypot-1-def67.0%
*-commutative67.0%
sqrt-prod66.9%
unpow266.9%
sqrt-prod98.9%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
unpow267.0%
clear-num67.0%
un-div-inv67.0%
Applied egg-rr99.1%
Taylor expanded in Om around 0 37.6%
associate-/l*37.6%
unpow237.6%
rem-square-sqrt37.6%
unpow237.6%
unpow237.6%
times-frac65.8%
Simplified65.8%
Taylor expanded in l around 0 98.2%
Final simplification96.0%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -50.0)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 0.0005)
(asin (- 1.0 (pow (/ t l) 2.0)))
(asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -50.0) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = asin((1.0 - pow((t / l), 2.0)));
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-50.0d0)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.0005d0) then
tmp = asin((1.0d0 - ((t / l) ** 2.0d0)))
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -50.0) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin((1.0 - Math.pow((t / l), 2.0)));
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -50.0: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.0005: tmp = math.asin((1.0 - math.pow((t / l), 2.0))) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -50.0) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 0.0005) tmp = asin(Float64(1.0 - (Float64(t / l) ^ 2.0))); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -50.0) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.0005) tmp = asin((1.0 - ((t / l) ^ 2.0))); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -50.0], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0005], N[ArcSin[N[(1.0 - N[Power[N[(t / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -50:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} \left(1 - {\left(\frac{t}{\ell}\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -50Initial program 68.9%
Taylor expanded in t around -inf 90.8%
mul-1-neg90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
unpow290.8%
unpow290.8%
times-frac97.1%
unpow297.1%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in Om around 0 95.2%
mul-1-neg95.2%
associate-/l*95.3%
Simplified95.3%
if -50 < (/.f64 t l) < 5.0000000000000001e-4Initial program 97.3%
sqrt-div97.2%
div-inv97.2%
add-sqr-sqrt97.2%
hypot-1-def97.2%
*-commutative97.2%
sqrt-prod97.2%
unpow297.2%
sqrt-prod68.2%
add-sqr-sqrt97.2%
Applied egg-rr97.2%
unpow297.3%
clear-num97.3%
un-div-inv97.3%
Applied egg-rr97.2%
Taylor expanded in Om around 0 85.0%
associate-/l*85.0%
unpow285.0%
rem-square-sqrt85.0%
unpow285.0%
unpow285.0%
times-frac95.2%
Simplified95.2%
Taylor expanded in l around inf 84.7%
mul-1-neg84.7%
unsub-neg84.7%
unpow284.7%
unpow284.7%
times-frac94.9%
unpow294.9%
Simplified94.9%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 66.9%
sqrt-div67.0%
div-inv67.0%
add-sqr-sqrt67.0%
hypot-1-def67.0%
*-commutative67.0%
sqrt-prod66.9%
unpow266.9%
sqrt-prod98.9%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
unpow267.0%
clear-num67.0%
un-div-inv67.0%
Applied egg-rr99.1%
Taylor expanded in Om around 0 37.6%
associate-/l*37.6%
unpow237.6%
rem-square-sqrt37.6%
unpow237.6%
unpow237.6%
times-frac65.8%
Simplified65.8%
Taylor expanded in l around 0 98.2%
Final simplification95.9%
(FPCore (t l Om Omc) :precision binary64 (if (or (<= (/ t l) -5e+217) (not (<= (/ t l) 0.0005))) (asin (/ (sqrt 0.5) (/ t l))) (asin 1.0)))
double code(double t, double l, double Om, double Omc) {
double tmp;
if (((t / l) <= -5e+217) || !((t / l) <= 0.0005)) {
tmp = asin((sqrt(0.5) / (t / l)));
} else {
tmp = asin(1.0);
}
return tmp;
}
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
real(8) :: tmp
if (((t / l) <= (-5d+217)) .or. (.not. ((t / l) <= 0.0005d0))) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else
tmp = asin(1.0d0)
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if (((t / l) <= -5e+217) || !((t / l) <= 0.0005)) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else {
tmp = Math.asin(1.0);
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if ((t / l) <= -5e+217) or not ((t / l) <= 0.0005): tmp = math.asin((math.sqrt(0.5) / (t / l))) else: tmp = math.asin(1.0) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if ((Float64(t / l) <= -5e+217) || !(Float64(t / l) <= 0.0005)) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); else tmp = asin(1.0); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if (((t / l) <= -5e+217) || ~(((t / l) <= 0.0005))) tmp = asin((sqrt(0.5) / (t / l))); else tmp = asin(1.0); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[Or[LessEqual[N[(t / l), $MachinePrecision], -5e+217], N[Not[LessEqual[N[(t / l), $MachinePrecision], 0.0005]], $MachinePrecision]], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[1.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+217} \lor \neg \left(\frac{t}{\ell} \leq 0.0005\right):\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} 1\\
\end{array}
\end{array}
if (/.f64 t l) < -5.00000000000000041e217 or 5.0000000000000001e-4 < (/.f64 t l) Initial program 66.3%
sqrt-div66.4%
div-inv66.4%
add-sqr-sqrt66.4%
hypot-1-def66.4%
*-commutative66.4%
sqrt-prod66.3%
unpow266.3%
sqrt-prod75.9%
add-sqr-sqrt99.3%
Applied egg-rr99.3%
unpow266.4%
clear-num66.4%
un-div-inv66.4%
Applied egg-rr99.3%
Taylor expanded in Om around 0 43.9%
associate-/l*43.9%
unpow243.9%
rem-square-sqrt43.9%
unpow243.9%
unpow243.9%
times-frac65.5%
Simplified65.5%
Taylor expanded in l around 0 90.2%
associate-/l*89.9%
Simplified89.9%
if -5.00000000000000041e217 < (/.f64 t l) < 5.0000000000000001e-4Initial program 91.5%
sqrt-div91.4%
div-inv91.5%
add-sqr-sqrt91.5%
hypot-1-def91.5%
*-commutative91.5%
sqrt-prod91.4%
unpow291.4%
sqrt-prod53.0%
add-sqr-sqrt97.7%
Applied egg-rr97.7%
unpow291.5%
clear-num91.5%
un-div-inv91.5%
Applied egg-rr97.7%
Taylor expanded in Om around 0 73.7%
associate-/l*73.7%
unpow273.7%
rem-square-sqrt73.7%
unpow273.7%
unpow273.7%
times-frac89.2%
Simplified89.2%
Taylor expanded in l around inf 74.5%
Final simplification79.9%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -5e+217) (asin (/ (sqrt 0.5) (/ t l))) (if (<= (/ t l) 0.0005) (asin 1.0) (asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+217) {
tmp = asin((sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = asin(1.0);
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-5d+217)) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.0005d0) then
tmp = asin(1.0d0)
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+217) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -5e+217: tmp = math.asin((math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.0005: tmp = math.asin(1.0) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -5e+217) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); elseif (Float64(t / l) <= 0.0005) tmp = asin(1.0); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -5e+217) tmp = asin((sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.0005) tmp = asin(1.0); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+217], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0005], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+217}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.00000000000000041e217Initial program 64.5%
sqrt-div64.5%
div-inv64.5%
add-sqr-sqrt64.5%
hypot-1-def64.5%
*-commutative64.5%
sqrt-prod64.5%
unpow264.5%
sqrt-prod0.0%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
unpow264.5%
clear-num64.5%
un-div-inv64.5%
Applied egg-rr99.7%
Taylor expanded in Om around 0 64.5%
associate-/l*64.5%
unpow264.5%
rem-square-sqrt64.5%
unpow264.5%
unpow264.5%
times-frac64.5%
Simplified64.5%
Taylor expanded in l around 0 63.9%
associate-/l*63.9%
Simplified63.9%
if -5.00000000000000041e217 < (/.f64 t l) < 5.0000000000000001e-4Initial program 91.5%
sqrt-div91.4%
div-inv91.5%
add-sqr-sqrt91.5%
hypot-1-def91.5%
*-commutative91.5%
sqrt-prod91.4%
unpow291.4%
sqrt-prod53.0%
add-sqr-sqrt97.7%
Applied egg-rr97.7%
unpow291.5%
clear-num91.5%
un-div-inv91.5%
Applied egg-rr97.7%
Taylor expanded in Om around 0 73.7%
associate-/l*73.7%
unpow273.7%
rem-square-sqrt73.7%
unpow273.7%
unpow273.7%
times-frac89.2%
Simplified89.2%
Taylor expanded in l around inf 74.5%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 66.9%
sqrt-div67.0%
div-inv67.0%
add-sqr-sqrt67.0%
hypot-1-def67.0%
*-commutative67.0%
sqrt-prod66.9%
unpow266.9%
sqrt-prod98.9%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
unpow267.0%
clear-num67.0%
un-div-inv67.0%
Applied egg-rr99.1%
Taylor expanded in Om around 0 37.6%
associate-/l*37.6%
unpow237.6%
rem-square-sqrt37.6%
unpow237.6%
unpow237.6%
times-frac65.8%
Simplified65.8%
Taylor expanded in l around 0 98.2%
Final simplification80.0%
(FPCore (t l Om Omc) :precision binary64 (if (<= (/ t l) -50.0) (asin (/ (- (sqrt 0.5)) (/ t l))) (if (<= (/ t l) 0.0005) (asin 1.0) (asin (/ (* l (sqrt 0.5)) t)))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -50.0) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = asin(1.0);
} else {
tmp = asin(((l * sqrt(0.5)) / t));
}
return tmp;
}
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
real(8) :: tmp
if ((t / l) <= (-50.0d0)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.0005d0) then
tmp = asin(1.0d0)
else
tmp = asin(((l * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -50.0) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.0005) {
tmp = Math.asin(1.0);
} else {
tmp = Math.asin(((l * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -50.0: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.0005: tmp = math.asin(1.0) else: tmp = math.asin(((l * math.sqrt(0.5)) / t)) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -50.0) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 0.0005) tmp = asin(1.0); else tmp = asin(Float64(Float64(l * sqrt(0.5)) / t)); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -50.0) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.0005) tmp = asin(1.0); else tmp = asin(((l * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -50.0], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.0005], N[ArcSin[1.0], $MachinePrecision], N[ArcSin[N[(N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -50:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.0005:\\
\;\;\;\;\sin^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -50Initial program 68.9%
Taylor expanded in t around -inf 90.8%
mul-1-neg90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
unpow290.8%
unpow290.8%
times-frac97.1%
unpow297.1%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in Om around 0 95.2%
mul-1-neg95.2%
associate-/l*95.3%
Simplified95.3%
if -50 < (/.f64 t l) < 5.0000000000000001e-4Initial program 97.3%
sqrt-div97.2%
div-inv97.2%
add-sqr-sqrt97.2%
hypot-1-def97.2%
*-commutative97.2%
sqrt-prod97.2%
unpow297.2%
sqrt-prod68.2%
add-sqr-sqrt97.2%
Applied egg-rr97.2%
unpow297.3%
clear-num97.3%
un-div-inv97.3%
Applied egg-rr97.2%
Taylor expanded in Om around 0 85.0%
associate-/l*85.0%
unpow285.0%
rem-square-sqrt85.0%
unpow285.0%
unpow285.0%
times-frac95.2%
Simplified95.2%
Taylor expanded in l around inf 94.0%
if 5.0000000000000001e-4 < (/.f64 t l) Initial program 66.9%
sqrt-div67.0%
div-inv67.0%
add-sqr-sqrt67.0%
hypot-1-def67.0%
*-commutative67.0%
sqrt-prod66.9%
unpow266.9%
sqrt-prod98.9%
add-sqr-sqrt99.1%
Applied egg-rr99.1%
unpow267.0%
clear-num67.0%
un-div-inv67.0%
Applied egg-rr99.1%
Taylor expanded in Om around 0 37.6%
associate-/l*37.6%
unpow237.6%
rem-square-sqrt37.6%
unpow237.6%
unpow237.6%
times-frac65.8%
Simplified65.8%
Taylor expanded in l around 0 98.2%
Final simplification95.4%
(FPCore (t l Om Omc) :precision binary64 (asin 1.0))
double code(double t, double l, double Om, double Omc) {
return asin(1.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(1.0d0)
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(1.0);
}
def code(t, l, Om, Omc): return math.asin(1.0)
function code(t, l, Om, Omc) return asin(1.0) end
function tmp = code(t, l, Om, Omc) tmp = asin(1.0); end
code[t_, l_, Om_, Omc_] := N[ArcSin[1.0], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} 1
\end{array}
Initial program 82.7%
sqrt-div82.6%
div-inv82.7%
add-sqr-sqrt82.7%
hypot-1-def82.7%
*-commutative82.7%
sqrt-prod82.6%
unpow282.6%
sqrt-prod61.0%
add-sqr-sqrt98.2%
Applied egg-rr98.2%
unpow282.7%
clear-num82.7%
un-div-inv82.7%
Applied egg-rr98.2%
Taylor expanded in Om around 0 63.2%
associate-/l*63.2%
unpow263.2%
rem-square-sqrt63.2%
unpow263.2%
unpow263.2%
times-frac80.9%
Simplified80.9%
Taylor expanded in l around inf 49.9%
Final simplification49.9%
herbie shell --seed 2023182
(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)))))))