
(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 16 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
(let* ((t_1 (* (/ Om Omc) (/ Om Omc))) (t_2 (* t (sqrt 2.0))))
(if (<= (/ t l) -5e+158)
(asin (* (/ (- l) t_2) (sqrt (- 1.0 t_1))))
(if (<= (/ t l) 1e+126)
(asin
(sqrt
(/ (- 1.0 (pow (/ Om Omc) 2.0)) (+ 1.0 (* 2.0 (* (/ t l) (/ t l)))))))
(asin (* (+ 1.0 (* -0.5 t_1)) (/ l t_2)))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = (Om / Omc) * (Om / Omc);
double t_2 = t * sqrt(2.0);
double tmp;
if ((t / l) <= -5e+158) {
tmp = asin(((-l / t_2) * sqrt((1.0 - t_1))));
} else if ((t / l) <= 1e+126) {
tmp = asin(sqrt(((1.0 - pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = asin(((1.0 + (-0.5 * t_1)) * (l / t_2)));
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (om / omc) * (om / omc)
t_2 = t * sqrt(2.0d0)
if ((t / l) <= (-5d+158)) then
tmp = asin(((-l / t_2) * sqrt((1.0d0 - t_1))))
else if ((t / l) <= 1d+126) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) ** 2.0d0)) / (1.0d0 + (2.0d0 * ((t / l) * (t / l)))))))
else
tmp = asin(((1.0d0 + ((-0.5d0) * t_1)) * (l / t_2)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = (Om / Omc) * (Om / Omc);
double t_2 = t * Math.sqrt(2.0);
double tmp;
if ((t / l) <= -5e+158) {
tmp = Math.asin(((-l / t_2) * Math.sqrt((1.0 - t_1))));
} else if ((t / l) <= 1e+126) {
tmp = Math.asin(Math.sqrt(((1.0 - Math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t / l) * (t / l)))))));
} else {
tmp = Math.asin(((1.0 + (-0.5 * t_1)) * (l / t_2)));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = (Om / Omc) * (Om / Omc) t_2 = t * math.sqrt(2.0) tmp = 0 if (t / l) <= -5e+158: tmp = math.asin(((-l / t_2) * math.sqrt((1.0 - t_1)))) elif (t / l) <= 1e+126: tmp = math.asin(math.sqrt(((1.0 - math.pow((Om / Omc), 2.0)) / (1.0 + (2.0 * ((t / l) * (t / l))))))) else: tmp = math.asin(((1.0 + (-0.5 * t_1)) * (l / t_2))) return tmp
function code(t, l, Om, Omc) t_1 = Float64(Float64(Om / Omc) * Float64(Om / Omc)) t_2 = Float64(t * sqrt(2.0)) tmp = 0.0 if (Float64(t / l) <= -5e+158) tmp = asin(Float64(Float64(Float64(-l) / t_2) * sqrt(Float64(1.0 - t_1)))); elseif (Float64(t / l) <= 1e+126) tmp = asin(sqrt(Float64(Float64(1.0 - (Float64(Om / Omc) ^ 2.0)) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) * Float64(t / l))))))); else tmp = asin(Float64(Float64(1.0 + Float64(-0.5 * t_1)) * Float64(l / t_2))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = (Om / Omc) * (Om / Omc); t_2 = t * sqrt(2.0); tmp = 0.0; if ((t / l) <= -5e+158) tmp = asin(((-l / t_2) * sqrt((1.0 - t_1)))); elseif ((t / l) <= 1e+126) tmp = asin(sqrt(((1.0 - ((Om / Omc) ^ 2.0)) / (1.0 + (2.0 * ((t / l) * (t / l))))))); else tmp = asin(((1.0 + (-0.5 * t_1)) * (l / t_2))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -5e+158], N[ArcSin[N[(N[((-l) / t$95$2), $MachinePrecision] * N[Sqrt[N[(1.0 - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e+126], 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 / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(1.0 + N[(-0.5 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{Om}{Omc} \cdot \frac{Om}{Omc}\\
t_2 := t \cdot \sqrt{2}\\
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+158}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t_2} \cdot \sqrt{1 - t_1}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+126}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\left(1 + -0.5 \cdot t_1\right) \cdot \frac{\ell}{t_2}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -4.9999999999999996e158Initial program 58.0%
sqrt-div58.0%
div-inv58.0%
add-sqr-sqrt58.0%
hypot-1-def58.0%
*-commutative58.0%
sqrt-prod58.0%
unpow258.0%
sqrt-prod0.0%
add-sqr-sqrt96.7%
Applied egg-rr96.7%
Taylor expanded in t around -inf 80.6%
associate-*r*80.6%
associate-*r/80.6%
neg-mul-180.6%
unpow280.6%
unpow280.6%
times-frac99.8%
unpow299.8%
unpow299.8%
times-frac80.6%
Simplified80.6%
times-frac99.8%
Applied egg-rr99.8%
if -4.9999999999999996e158 < (/.f64 t l) < 9.99999999999999925e125Initial program 98.3%
unpow298.3%
Applied egg-rr98.3%
if 9.99999999999999925e125 < (/.f64 t l) Initial program 48.0%
sqrt-div48.1%
div-inv48.1%
add-sqr-sqrt48.1%
hypot-1-def48.1%
*-commutative48.1%
sqrt-prod48.0%
unpow248.0%
sqrt-prod98.5%
add-sqr-sqrt98.7%
Applied egg-rr98.7%
Taylor expanded in Om around 0 89.0%
unpow289.0%
unpow289.0%
Simplified89.0%
times-frac39.5%
Applied egg-rr98.7%
Taylor expanded in t around inf 99.6%
Final simplification98.7%
(FPCore (t l Om Omc) :precision binary64 (asin (* (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (/ 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 - pow((Om / Omc), 2.0))) * (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 - Math.pow((Om / Omc), 2.0))) * (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 - math.pow((Om / Omc), 2.0))) * (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(Om / Omc) ^ 2.0))) * 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) ^ 2.0))) * (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[Power[N[(Om / Omc), $MachinePrecision], 2.0], $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 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 86.0%
sqrt-div86.0%
div-inv86.0%
add-sqr-sqrt86.0%
hypot-1-def86.0%
*-commutative86.0%
sqrt-prod85.9%
unpow285.9%
sqrt-prod53.2%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
Final simplification98.1%
(FPCore (t l Om Omc) :precision binary64 (asin (/ (sqrt (- 1.0 (pow (/ Om Omc) 2.0))) (hypot 1.0 (* (/ t l) (sqrt 2.0))))))
double code(double t, double l, double Om, double Omc) {
return asin((sqrt((1.0 - pow((Om / Omc), 2.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 - Math.pow((Om / Omc), 2.0))) / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))));
}
def code(t, l, Om, Omc): return math.asin((math.sqrt((1.0 - math.pow((Om / Omc), 2.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(Om / Omc) ^ 2.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) ^ 2.0))) / hypot(1.0, ((t / l) * sqrt(2.0))))); end
code[t_, 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 / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)}\right)
\end{array}
Initial program 86.0%
sqrt-div86.0%
div-inv86.0%
add-sqr-sqrt86.0%
hypot-1-def86.0%
*-commutative86.0%
sqrt-prod85.9%
unpow285.9%
sqrt-prod53.2%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
unpow298.1%
times-frac87.4%
unpow287.4%
unpow287.4%
associate-*r/87.4%
*-rgt-identity87.4%
unpow287.4%
unpow287.4%
times-frac98.1%
unpow298.1%
Simplified98.1%
Final simplification98.1%
(FPCore (t l Om Omc)
:precision binary64
(let* ((t_1 (* (/ Om Omc) (/ Om Omc))) (t_2 (* t (sqrt 2.0))))
(if (<= (/ t l) -2e+144)
(asin (* (/ (- l) t_2) (sqrt (- 1.0 t_1))))
(if (<= (/ t l) 1e+135)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin (* (+ 1.0 (* -0.5 t_1)) (/ l t_2)))))))
double code(double t, double l, double Om, double Omc) {
double t_1 = (Om / Omc) * (Om / Omc);
double t_2 = t * sqrt(2.0);
double tmp;
if ((t / l) <= -2e+144) {
tmp = asin(((-l / t_2) * sqrt((1.0 - t_1))));
} else if ((t / l) <= 1e+135) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin(((1.0 + (-0.5 * t_1)) * (l / t_2)));
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (om / omc) * (om / omc)
t_2 = t * sqrt(2.0d0)
if ((t / l) <= (-2d+144)) then
tmp = asin(((-l / t_2) * sqrt((1.0d0 - t_1))))
else if ((t / l) <= 1d+135) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin(((1.0d0 + ((-0.5d0) * t_1)) * (l / t_2)))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double t_1 = (Om / Omc) * (Om / Omc);
double t_2 = t * Math.sqrt(2.0);
double tmp;
if ((t / l) <= -2e+144) {
tmp = Math.asin(((-l / t_2) * Math.sqrt((1.0 - t_1))));
} else if ((t / l) <= 1e+135) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin(((1.0 + (-0.5 * t_1)) * (l / t_2)));
}
return tmp;
}
def code(t, l, Om, Omc): t_1 = (Om / Omc) * (Om / Omc) t_2 = t * math.sqrt(2.0) tmp = 0 if (t / l) <= -2e+144: tmp = math.asin(((-l / t_2) * math.sqrt((1.0 - t_1)))) elif (t / l) <= 1e+135: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin(((1.0 + (-0.5 * t_1)) * (l / t_2))) return tmp
function code(t, l, Om, Omc) t_1 = Float64(Float64(Om / Omc) * Float64(Om / Omc)) t_2 = Float64(t * sqrt(2.0)) tmp = 0.0 if (Float64(t / l) <= -2e+144) tmp = asin(Float64(Float64(Float64(-l) / t_2) * sqrt(Float64(1.0 - t_1)))); elseif (Float64(t / l) <= 1e+135) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); else tmp = asin(Float64(Float64(1.0 + Float64(-0.5 * t_1)) * Float64(l / t_2))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) t_1 = (Om / Omc) * (Om / Omc); t_2 = t * sqrt(2.0); tmp = 0.0; if ((t / l) <= -2e+144) tmp = asin(((-l / t_2) * sqrt((1.0 - t_1)))); elseif ((t / l) <= 1e+135) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin(((1.0 + (-0.5 * t_1)) * (l / t_2))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := Block[{t$95$1 = N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t / l), $MachinePrecision], -2e+144], N[ArcSin[N[(N[((-l) / t$95$2), $MachinePrecision] * N[Sqrt[N[(1.0 - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e+135], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(1.0 + N[(-0.5 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{Om}{Omc} \cdot \frac{Om}{Omc}\\
t_2 := t \cdot \sqrt{2}\\
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+144}:\\
\;\;\;\;\sin^{-1} \left(\frac{-\ell}{t_2} \cdot \sqrt{1 - t_1}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+135}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\left(1 + -0.5 \cdot t_1\right) \cdot \frac{\ell}{t_2}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -2.00000000000000005e144Initial program 59.3%
sqrt-div59.3%
div-inv59.3%
add-sqr-sqrt59.3%
hypot-1-def59.3%
*-commutative59.3%
sqrt-prod59.3%
unpow259.3%
sqrt-prod0.0%
add-sqr-sqrt96.8%
Applied egg-rr96.8%
Taylor expanded in t around -inf 81.2%
associate-*r*81.2%
associate-*r/81.2%
neg-mul-181.2%
unpow281.2%
unpow281.2%
times-frac99.8%
unpow299.8%
unpow299.8%
times-frac81.2%
Simplified81.2%
times-frac99.8%
Applied egg-rr99.8%
if -2.00000000000000005e144 < (/.f64 t l) < 9.99999999999999962e134Initial program 98.3%
unpow298.3%
clear-num98.3%
un-div-inv98.3%
Applied egg-rr98.3%
unpow275.2%
clear-num75.2%
un-div-inv75.2%
Applied egg-rr98.3%
if 9.99999999999999962e134 < (/.f64 t l) Initial 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-prod98.4%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
Taylor expanded in Om around 0 88.7%
unpow288.7%
unpow288.7%
Simplified88.7%
times-frac40.5%
Applied egg-rr98.7%
Taylor expanded in t around inf 99.7%
Final simplification98.7%
(FPCore (t l Om Omc) :precision binary64 (asin (* (/ 1.0 (hypot 1.0 (* (/ t l) (sqrt 2.0)))) (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc)))))))
double code(double t, double l, double Om, double Omc) {
return asin(((1.0 / hypot(1.0, ((t / l) * sqrt(2.0)))) * (1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(((1.0 / Math.hypot(1.0, ((t / l) * Math.sqrt(2.0)))) * (1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))));
}
def code(t, l, Om, Omc): return math.asin(((1.0 / math.hypot(1.0, ((t / l) * math.sqrt(2.0)))) * (1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))))
function code(t, l, Om, Omc) return asin(Float64(Float64(1.0 / hypot(1.0, Float64(Float64(t / l) * sqrt(2.0)))) * Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc)))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(((1.0 / hypot(1.0, ((t / l) * sqrt(2.0)))) * (1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(t / l), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\frac{1}{\mathsf{hypot}\left(1, \frac{t}{\ell} \cdot \sqrt{2}\right)} \cdot \left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right)\right)
\end{array}
Initial program 86.0%
sqrt-div86.0%
div-inv86.0%
add-sqr-sqrt86.0%
hypot-1-def86.0%
*-commutative86.0%
sqrt-prod85.9%
unpow285.9%
sqrt-prod53.2%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
Taylor expanded in Om around 0 87.2%
unpow287.2%
unpow287.2%
Simplified87.2%
times-frac29.0%
Applied egg-rr97.7%
Final simplification97.7%
(FPCore (t l Om Omc) :precision binary64 (asin (* (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc)))) (/ 1.0 (hypot 1.0 (/ (* t (sqrt 2.0)) l))))))
double code(double t, double l, double Om, double Omc) {
return asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (1.0 / hypot(1.0, ((t * sqrt(2.0)) / l)))));
}
public static double code(double t, double l, double Om, double Omc) {
return Math.asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (1.0 / Math.hypot(1.0, ((t * Math.sqrt(2.0)) / l)))));
}
def code(t, l, Om, Omc): return math.asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (1.0 / math.hypot(1.0, ((t * math.sqrt(2.0)) / l)))))
function code(t, l, Om, Omc) return asin(Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc)))) * Float64(1.0 / hypot(1.0, Float64(Float64(t * sqrt(2.0)) / l))))) end
function tmp = code(t, l, Om, Omc) tmp = asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (1.0 / hypot(1.0, ((t * sqrt(2.0)) / l))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(\left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right) \cdot \frac{1}{\mathsf{hypot}\left(1, \frac{t \cdot \sqrt{2}}{\ell}\right)}\right)
\end{array}
Initial program 86.0%
sqrt-div86.0%
div-inv86.0%
add-sqr-sqrt86.0%
hypot-1-def86.0%
*-commutative86.0%
sqrt-prod85.9%
unpow285.9%
sqrt-prod53.2%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
Taylor expanded in Om around 0 87.2%
unpow287.2%
unpow287.2%
Simplified87.2%
times-frac29.0%
Applied egg-rr97.7%
Taylor expanded in t around 0 97.7%
Final simplification97.7%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -1e+92)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 1e+135)
(asin
(sqrt
(/
(- 1.0 (/ (/ Om Omc) (/ Omc Om)))
(+ 1.0 (* 2.0 (/ (/ t l) (/ l t)))))))
(asin
(* (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc)))) (/ l (* t (sqrt 2.0))))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+92) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 1e+135) {
tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (l / (t * sqrt(2.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) <= (-1d+92)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 1d+135) then
tmp = asin(sqrt(((1.0d0 - ((om / omc) / (omc / om))) / (1.0d0 + (2.0d0 * ((t / l) / (l / t)))))))
else
tmp = asin(((1.0d0 + ((-0.5d0) * ((om / omc) * (om / omc)))) * (l / (t * sqrt(2.0d0)))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -1e+92) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 1e+135) {
tmp = Math.asin(Math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t)))))));
} else {
tmp = Math.asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (l / (t * Math.sqrt(2.0)))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -1e+92: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 1e+135: tmp = math.asin(math.sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t))))))) else: tmp = math.asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (l / (t * math.sqrt(2.0))))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -1e+92) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 1e+135) tmp = asin(sqrt(Float64(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))) / Float64(1.0 + Float64(2.0 * Float64(Float64(t / l) / Float64(l / t))))))); else tmp = asin(Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc)))) * Float64(l / Float64(t * sqrt(2.0))))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -1e+92) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 1e+135) tmp = asin(sqrt(((1.0 - ((Om / Omc) / (Omc / Om))) / (1.0 + (2.0 * ((t / l) / (l / t))))))); else tmp = asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (l / (t * sqrt(2.0))))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -1e+92], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 1e+135], N[ArcSin[N[Sqrt[N[(N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 * N[(N[(t / l), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -1 \cdot 10^{+92}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 10^{+135}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}{1 + 2 \cdot \frac{\frac{t}{\ell}}{\frac{\ell}{t}}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right) \cdot \frac{\ell}{t \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1e92Initial program 67.4%
sqrt-div67.4%
div-inv67.4%
add-sqr-sqrt67.4%
hypot-1-def67.4%
*-commutative67.4%
sqrt-prod67.4%
unpow267.4%
sqrt-prod0.0%
add-sqr-sqrt97.3%
Applied egg-rr97.3%
Taylor expanded in Om around 0 77.5%
unpow277.5%
unpow277.5%
Simplified77.5%
Taylor expanded in Om around 0 53.1%
unpow253.1%
rem-square-sqrt53.1%
unpow253.1%
times-frac56.7%
unpow256.7%
Simplified56.7%
Taylor expanded in t around -inf 99.5%
if -1e92 < (/.f64 t l) < 9.99999999999999962e134Initial program 98.3%
unpow298.3%
clear-num98.2%
un-div-inv98.3%
Applied egg-rr98.3%
unpow278.4%
clear-num78.4%
un-div-inv78.4%
Applied egg-rr98.3%
if 9.99999999999999962e134 < (/.f64 t l) Initial 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-prod98.4%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
Taylor expanded in Om around 0 88.7%
unpow288.7%
unpow288.7%
Simplified88.7%
times-frac40.5%
Applied egg-rr98.7%
Taylor expanded in t around inf 99.7%
Final simplification98.7%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+60)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 5e+30)
(asin (sqrt (/ 1.0 (+ 1.0 (* (/ 2.0 l) (* t (/ t l)))))))
(asin
(* (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc)))) (/ l (* t (sqrt 2.0))))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+60) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 5e+30) {
tmp = asin(sqrt((1.0 / (1.0 + ((2.0 / l) * (t * (t / l)))))));
} else {
tmp = asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (l / (t * sqrt(2.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) <= (-2d+60)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 5d+30) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + ((2.0d0 / l) * (t * (t / l)))))))
else
tmp = asin(((1.0d0 + ((-0.5d0) * ((om / omc) * (om / omc)))) * (l / (t * sqrt(2.0d0)))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+60) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 5e+30) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + ((2.0 / l) * (t * (t / l)))))));
} else {
tmp = Math.asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (l / (t * Math.sqrt(2.0)))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+60: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 5e+30: tmp = math.asin(math.sqrt((1.0 / (1.0 + ((2.0 / l) * (t * (t / l))))))) else: tmp = math.asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (l / (t * math.sqrt(2.0))))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+60) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 5e+30) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(Float64(2.0 / l) * Float64(t * Float64(t / l))))))); else tmp = asin(Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc)))) * Float64(l / Float64(t * sqrt(2.0))))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+60) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 5e+30) tmp = asin(sqrt((1.0 / (1.0 + ((2.0 / l) * (t * (t / l))))))); else tmp = asin(((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))) * (l / (t * sqrt(2.0))))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+60], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 5e+30], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(N[(2.0 / l), $MachinePrecision] * N[(t * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+60}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 5 \cdot 10^{+30}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{2}{\ell} \cdot \left(t \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right) \cdot \frac{\ell}{t \cdot \sqrt{2}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.9999999999999999e60Initial program 72.2%
sqrt-div72.2%
div-inv72.2%
add-sqr-sqrt72.2%
hypot-1-def72.2%
*-commutative72.2%
sqrt-prod72.1%
unpow272.1%
sqrt-prod0.0%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
Taylor expanded in Om around 0 80.8%
unpow280.8%
unpow280.8%
Simplified80.8%
Taylor expanded in Om around 0 47.5%
unpow247.5%
rem-square-sqrt47.6%
unpow247.6%
times-frac53.1%
unpow253.1%
Simplified53.1%
Taylor expanded in t around -inf 99.4%
if -1.9999999999999999e60 < (/.f64 t l) < 4.9999999999999998e30Initial program 98.1%
sqrt-div98.1%
div-inv98.1%
add-sqr-sqrt98.1%
hypot-1-def98.1%
*-commutative98.1%
sqrt-prod98.0%
unpow298.0%
sqrt-prod55.5%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Taylor expanded in Om around 0 88.6%
unpow288.6%
unpow288.6%
Simplified88.6%
Taylor expanded in Om around 0 82.5%
unpow282.5%
rem-square-sqrt82.6%
unpow282.6%
times-frac89.0%
unpow289.0%
Simplified89.0%
Taylor expanded in t around 0 89.0%
unpow289.0%
associate-*r/96.8%
Simplified96.8%
if 4.9999999999999998e30 < (/.f64 t l) Initial program 57.8%
sqrt-div57.9%
div-inv57.9%
add-sqr-sqrt57.9%
hypot-1-def57.9%
*-commutative57.9%
sqrt-prod57.8%
unpow257.8%
sqrt-prod98.5%
add-sqr-sqrt98.8%
Applied egg-rr98.8%
Taylor expanded in Om around 0 88.9%
unpow288.9%
unpow288.9%
Simplified88.9%
times-frac32.4%
Applied egg-rr98.8%
Taylor expanded in t around inf 99.6%
Final simplification97.8%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -2e+60)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 2e+116)
(asin (sqrt (/ 1.0 (+ 1.0 (* (/ 2.0 l) (* t (/ t l)))))))
(asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+60) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 2e+116) {
tmp = asin(sqrt((1.0 / (1.0 + ((2.0 / l) * (t * (t / l)))))));
} else {
tmp = asin((l / (t / sqrt(0.5))));
}
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+60)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 2d+116) then
tmp = asin(sqrt((1.0d0 / (1.0d0 + ((2.0d0 / l) * (t * (t / l)))))))
else
tmp = asin((l / (t / sqrt(0.5d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -2e+60) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 2e+116) {
tmp = Math.asin(Math.sqrt((1.0 / (1.0 + ((2.0 / l) * (t * (t / l)))))));
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -2e+60: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 2e+116: tmp = math.asin(math.sqrt((1.0 / (1.0 + ((2.0 / l) * (t * (t / l))))))) else: tmp = math.asin((l / (t / math.sqrt(0.5)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -2e+60) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 2e+116) tmp = asin(sqrt(Float64(1.0 / Float64(1.0 + Float64(Float64(2.0 / l) * Float64(t * Float64(t / l))))))); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -2e+60) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 2e+116) tmp = asin(sqrt((1.0 / (1.0 + ((2.0 / l) * (t * (t / l))))))); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -2e+60], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 2e+116], N[ArcSin[N[Sqrt[N[(1.0 / N[(1.0 + N[(N[(2.0 / l), $MachinePrecision] * N[(t * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -2 \cdot 10^{+60}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 2 \cdot 10^{+116}:\\
\;\;\;\;\sin^{-1} \left(\sqrt{\frac{1}{1 + \frac{2}{\ell} \cdot \left(t \cdot \frac{t}{\ell}\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -1.9999999999999999e60Initial program 72.2%
sqrt-div72.2%
div-inv72.2%
add-sqr-sqrt72.2%
hypot-1-def72.2%
*-commutative72.2%
sqrt-prod72.1%
unpow272.1%
sqrt-prod0.0%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
Taylor expanded in Om around 0 80.8%
unpow280.8%
unpow280.8%
Simplified80.8%
Taylor expanded in Om around 0 47.5%
unpow247.5%
rem-square-sqrt47.6%
unpow247.6%
times-frac53.1%
unpow253.1%
Simplified53.1%
Taylor expanded in t around -inf 99.4%
if -1.9999999999999999e60 < (/.f64 t l) < 2.00000000000000003e116Initial program 98.2%
sqrt-div98.2%
div-inv98.2%
add-sqr-sqrt98.2%
hypot-1-def98.2%
*-commutative98.2%
sqrt-prod98.1%
unpow298.1%
sqrt-prod57.6%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
Taylor expanded in Om around 0 88.5%
unpow288.5%
unpow288.5%
Simplified88.5%
Taylor expanded in Om around 0 79.1%
unpow279.1%
rem-square-sqrt79.2%
unpow279.2%
times-frac86.6%
unpow286.6%
Simplified86.6%
Taylor expanded in t around 0 86.6%
unpow286.6%
associate-*r/95.7%
Simplified95.7%
if 2.00000000000000003e116 < (/.f64 t l) 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-prod98.5%
add-sqr-sqrt98.7%
Applied egg-rr98.7%
Taylor expanded in Om around 0 89.3%
unpow289.3%
unpow289.3%
Simplified89.3%
Taylor expanded in Om around 0 46.8%
unpow246.8%
rem-square-sqrt46.9%
unpow246.9%
times-frac46.9%
unpow246.9%
Simplified46.9%
Taylor expanded in l around 0 99.4%
*-commutative99.4%
associate-/l*99.3%
Simplified99.3%
Final simplification96.9%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 0.05)
(asin (sqrt (- 1.0 (/ (/ Om Omc) (/ Omc Om)))))
(asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 0.05) {
tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = asin((l / (t / sqrt(0.5))));
}
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) <= (-100.0d0)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 0.05d0) then
tmp = asin(sqrt((1.0d0 - ((om / omc) / (omc / om)))))
else
tmp = asin((l / (t / sqrt(0.5d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 0.05) {
tmp = Math.asin(Math.sqrt((1.0 - ((Om / Omc) / (Omc / Om)))));
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -100.0: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 0.05: tmp = math.asin(math.sqrt((1.0 - ((Om / Omc) / (Omc / Om))))) else: tmp = math.asin((l / (t / math.sqrt(0.5)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 0.05) tmp = asin(sqrt(Float64(1.0 - Float64(Float64(Om / Omc) / Float64(Omc / Om))))); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -100.0) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 0.05) tmp = asin(sqrt((1.0 - ((Om / Omc) / (Omc / Om))))); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -100.0], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[N[Sqrt[N[(1.0 - N[(N[(Om / Omc), $MachinePrecision] / N[(Omc / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(\sqrt{1 - \frac{\frac{Om}{Omc}}{\frac{Omc}{Om}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 78.2%
sqrt-div78.2%
div-inv78.2%
add-sqr-sqrt78.2%
hypot-1-def78.2%
*-commutative78.2%
sqrt-prod78.0%
unpow278.0%
sqrt-prod0.0%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Taylor expanded in Om around 0 83.1%
unpow283.1%
unpow283.1%
Simplified83.1%
Taylor expanded in Om around 0 50.5%
unpow250.5%
rem-square-sqrt50.6%
unpow250.6%
times-frac55.6%
unpow255.6%
Simplified55.6%
Taylor expanded in t around -inf 98.2%
if -100 < (/.f64 t l) < 0.050000000000000003Initial program 97.9%
Taylor expanded in t around 0 87.3%
unpow287.3%
unpow287.3%
times-frac96.5%
unpow296.5%
Simplified96.5%
unpow296.5%
clear-num96.5%
un-div-inv96.5%
Applied egg-rr96.5%
if 0.050000000000000003 < (/.f64 t l) Initial program 63.2%
sqrt-div63.3%
div-inv63.3%
add-sqr-sqrt63.3%
hypot-1-def63.3%
*-commutative63.3%
sqrt-prod63.2%
unpow263.2%
sqrt-prod98.5%
add-sqr-sqrt98.9%
Applied egg-rr98.9%
Taylor expanded in Om around 0 90.3%
unpow290.3%
unpow290.3%
Simplified90.3%
Taylor expanded in Om around 0 44.5%
unpow244.5%
rem-square-sqrt44.6%
unpow244.6%
times-frac49.2%
unpow249.2%
Simplified49.2%
Taylor expanded in l around 0 96.6%
*-commutative96.6%
associate-/l*96.5%
Simplified96.5%
Final simplification96.9%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -5e+208)
(asin (/ (sqrt 0.5) (/ t l)))
(if (<= (/ t l) 0.05)
(asin (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc)))))
(asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+208) {
tmp = asin((sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.05) {
tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
} else {
tmp = asin((l / (t / sqrt(0.5))));
}
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+208)) then
tmp = asin((sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.05d0) then
tmp = asin((1.0d0 + ((-0.5d0) * ((om / omc) * (om / omc)))))
else
tmp = asin((l / (t / sqrt(0.5d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -5e+208) {
tmp = Math.asin((Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.05) {
tmp = Math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -5e+208: tmp = math.asin((math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.05: tmp = math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))) else: tmp = math.asin((l / (t / math.sqrt(0.5)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -5e+208) tmp = asin(Float64(sqrt(0.5) / Float64(t / l))); elseif (Float64(t / l) <= 0.05) tmp = asin(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc))))); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -5e+208) tmp = asin((sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.05) tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -5e+208], N[ArcSin[N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -5 \cdot 10^{+208}:\\
\;\;\;\;\sin^{-1} \left(\frac{\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -5.0000000000000004e208Initial program 70.7%
unpow270.7%
clear-num70.7%
un-div-inv70.7%
Applied egg-rr70.7%
Taylor expanded in t around inf 61.8%
associate-*r/61.8%
associate-*r*61.8%
unpow261.8%
unpow261.8%
unpow261.8%
unpow261.8%
Simplified61.8%
Taylor expanded in Om around 0 70.1%
associate-/l*70.2%
Simplified70.2%
if -5.0000000000000004e208 < (/.f64 t l) < 0.050000000000000003Initial program 95.1%
Taylor expanded in t around 0 71.3%
unpow271.3%
unpow271.3%
times-frac78.8%
unpow278.8%
Simplified78.8%
Taylor expanded in Om around 0 71.0%
unpow287.8%
unpow287.8%
Simplified71.0%
times-frac19.2%
Applied egg-rr78.3%
if 0.050000000000000003 < (/.f64 t l) Initial program 63.2%
sqrt-div63.3%
div-inv63.3%
add-sqr-sqrt63.3%
hypot-1-def63.3%
*-commutative63.3%
sqrt-prod63.2%
unpow263.2%
sqrt-prod98.5%
add-sqr-sqrt98.9%
Applied egg-rr98.9%
Taylor expanded in Om around 0 90.3%
unpow290.3%
unpow290.3%
Simplified90.3%
Taylor expanded in Om around 0 44.5%
unpow244.5%
rem-square-sqrt44.6%
unpow244.6%
times-frac49.2%
unpow249.2%
Simplified49.2%
Taylor expanded in l around 0 96.6%
*-commutative96.6%
associate-/l*96.5%
Simplified96.5%
Final simplification81.3%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(asin (/ (- (sqrt 0.5)) (/ t l)))
(if (<= (/ t l) 0.05)
(asin (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc)))))
(asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = asin((-sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.05) {
tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
} else {
tmp = asin((l / (t / sqrt(0.5))));
}
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) <= (-100.0d0)) then
tmp = asin((-sqrt(0.5d0) / (t / l)))
else if ((t / l) <= 0.05d0) then
tmp = asin((1.0d0 + ((-0.5d0) * ((om / omc) * (om / omc)))))
else
tmp = asin((l / (t / sqrt(0.5d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = Math.asin((-Math.sqrt(0.5) / (t / l)));
} else if ((t / l) <= 0.05) {
tmp = Math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -100.0: tmp = math.asin((-math.sqrt(0.5) / (t / l))) elif (t / l) <= 0.05: tmp = math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))) else: tmp = math.asin((l / (t / math.sqrt(0.5)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = asin(Float64(Float64(-sqrt(0.5)) / Float64(t / l))); elseif (Float64(t / l) <= 0.05) tmp = asin(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc))))); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -100.0) tmp = asin((-sqrt(0.5) / (t / l))); elseif ((t / l) <= 0.05) tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -100.0], N[ArcSin[N[((-N[Sqrt[0.5], $MachinePrecision]) / N[(t / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;\sin^{-1} \left(\frac{-\sqrt{0.5}}{\frac{t}{\ell}}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 78.2%
sqrt-div78.2%
div-inv78.2%
add-sqr-sqrt78.2%
hypot-1-def78.2%
*-commutative78.2%
sqrt-prod78.0%
unpow278.0%
sqrt-prod0.0%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Taylor expanded in Om around 0 83.1%
unpow283.1%
unpow283.1%
Simplified83.1%
Taylor expanded in Om around 0 50.5%
unpow250.5%
rem-square-sqrt50.6%
unpow250.6%
times-frac55.6%
unpow255.6%
Simplified55.6%
Taylor expanded in t around -inf 98.2%
mul-1-neg98.2%
associate-/l*97.0%
distribute-neg-frac97.0%
Simplified97.0%
if -100 < (/.f64 t l) < 0.050000000000000003Initial program 97.9%
Taylor expanded in t around 0 87.3%
unpow287.3%
unpow287.3%
times-frac96.5%
unpow296.5%
Simplified96.5%
Taylor expanded in Om around 0 86.9%
unpow287.8%
unpow287.8%
Simplified86.9%
times-frac0.0%
Applied egg-rr95.8%
if 0.050000000000000003 < (/.f64 t l) Initial program 63.2%
sqrt-div63.3%
div-inv63.3%
add-sqr-sqrt63.3%
hypot-1-def63.3%
*-commutative63.3%
sqrt-prod63.2%
unpow263.2%
sqrt-prod98.5%
add-sqr-sqrt98.9%
Applied egg-rr98.9%
Taylor expanded in Om around 0 90.3%
unpow290.3%
unpow290.3%
Simplified90.3%
Taylor expanded in Om around 0 44.5%
unpow244.5%
rem-square-sqrt44.6%
unpow244.6%
times-frac49.2%
unpow249.2%
Simplified49.2%
Taylor expanded in l around 0 96.6%
*-commutative96.6%
associate-/l*96.5%
Simplified96.5%
Final simplification96.2%
(FPCore (t l Om Omc)
:precision binary64
(if (<= (/ t l) -100.0)
(asin (/ (* l (- (sqrt 0.5))) t))
(if (<= (/ t l) 0.05)
(asin (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc)))))
(asin (/ l (/ t (sqrt 0.5)))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = asin(((l * -sqrt(0.5)) / t));
} else if ((t / l) <= 0.05) {
tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
} else {
tmp = asin((l / (t / sqrt(0.5))));
}
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) <= (-100.0d0)) then
tmp = asin(((l * -sqrt(0.5d0)) / t))
else if ((t / l) <= 0.05d0) then
tmp = asin((1.0d0 + ((-0.5d0) * ((om / omc) * (om / omc)))))
else
tmp = asin((l / (t / sqrt(0.5d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((t / l) <= -100.0) {
tmp = Math.asin(((l * -Math.sqrt(0.5)) / t));
} else if ((t / l) <= 0.05) {
tmp = Math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (t / l) <= -100.0: tmp = math.asin(((l * -math.sqrt(0.5)) / t)) elif (t / l) <= 0.05: tmp = math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))) else: tmp = math.asin((l / (t / math.sqrt(0.5)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if (Float64(t / l) <= -100.0) tmp = asin(Float64(Float64(l * Float64(-sqrt(0.5))) / t)); elseif (Float64(t / l) <= 0.05) tmp = asin(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc))))); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((t / l) <= -100.0) tmp = asin(((l * -sqrt(0.5)) / t)); elseif ((t / l) <= 0.05) tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[LessEqual[N[(t / l), $MachinePrecision], -100.0], N[ArcSin[N[(N[(l * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(t / l), $MachinePrecision], 0.05], N[ArcSin[N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{t}{\ell} \leq -100:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell \cdot \left(-\sqrt{0.5}\right)}{t}\right)\\
\mathbf{elif}\;\frac{t}{\ell} \leq 0.05:\\
\;\;\;\;\sin^{-1} \left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if (/.f64 t l) < -100Initial program 78.2%
sqrt-div78.2%
div-inv78.2%
add-sqr-sqrt78.2%
hypot-1-def78.2%
*-commutative78.2%
sqrt-prod78.0%
unpow278.0%
sqrt-prod0.0%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Taylor expanded in Om around 0 83.1%
unpow283.1%
unpow283.1%
Simplified83.1%
Taylor expanded in Om around 0 50.5%
unpow250.5%
rem-square-sqrt50.6%
unpow250.6%
times-frac55.6%
unpow255.6%
Simplified55.6%
Taylor expanded in t around -inf 98.2%
if -100 < (/.f64 t l) < 0.050000000000000003Initial program 97.9%
Taylor expanded in t around 0 87.3%
unpow287.3%
unpow287.3%
times-frac96.5%
unpow296.5%
Simplified96.5%
Taylor expanded in Om around 0 86.9%
unpow287.8%
unpow287.8%
Simplified86.9%
times-frac0.0%
Applied egg-rr95.8%
if 0.050000000000000003 < (/.f64 t l) Initial program 63.2%
sqrt-div63.3%
div-inv63.3%
add-sqr-sqrt63.3%
hypot-1-def63.3%
*-commutative63.3%
sqrt-prod63.2%
unpow263.2%
sqrt-prod98.5%
add-sqr-sqrt98.9%
Applied egg-rr98.9%
Taylor expanded in Om around 0 90.3%
unpow290.3%
unpow290.3%
Simplified90.3%
Taylor expanded in Om around 0 44.5%
unpow244.5%
rem-square-sqrt44.6%
unpow244.6%
times-frac49.2%
unpow249.2%
Simplified49.2%
Taylor expanded in l around 0 96.6%
*-commutative96.6%
associate-/l*96.5%
Simplified96.5%
Final simplification96.5%
(FPCore (t l Om Omc) :precision binary64 (if (or (<= l -7e-207) (not (<= l 1020000.0))) (asin (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc))))) (asin (/ l (/ t (sqrt 0.5))))))
double code(double t, double l, double Om, double Omc) {
double tmp;
if ((l <= -7e-207) || !(l <= 1020000.0)) {
tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
} else {
tmp = asin((l / (t / sqrt(0.5))));
}
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 ((l <= (-7d-207)) .or. (.not. (l <= 1020000.0d0))) then
tmp = asin((1.0d0 + ((-0.5d0) * ((om / omc) * (om / omc)))))
else
tmp = asin((l / (t / sqrt(0.5d0))))
end if
code = tmp
end function
public static double code(double t, double l, double Om, double Omc) {
double tmp;
if ((l <= -7e-207) || !(l <= 1020000.0)) {
tmp = Math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
} else {
tmp = Math.asin((l / (t / Math.sqrt(0.5))));
}
return tmp;
}
def code(t, l, Om, Omc): tmp = 0 if (l <= -7e-207) or not (l <= 1020000.0): tmp = math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))) else: tmp = math.asin((l / (t / math.sqrt(0.5)))) return tmp
function code(t, l, Om, Omc) tmp = 0.0 if ((l <= -7e-207) || !(l <= 1020000.0)) tmp = asin(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc))))); else tmp = asin(Float64(l / Float64(t / sqrt(0.5)))); end return tmp end
function tmp_2 = code(t, l, Om, Omc) tmp = 0.0; if ((l <= -7e-207) || ~((l <= 1020000.0))) tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))); else tmp = asin((l / (t / sqrt(0.5)))); end tmp_2 = tmp; end
code[t_, l_, Om_, Omc_] := If[Or[LessEqual[l, -7e-207], N[Not[LessEqual[l, 1020000.0]], $MachinePrecision]], N[ArcSin[N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[ArcSin[N[(l / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -7 \cdot 10^{-207} \lor \neg \left(\ell \leq 1020000\right):\\
\;\;\;\;\sin^{-1} \left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{\ell}{\frac{t}{\sqrt{0.5}}}\right)\\
\end{array}
\end{array}
if l < -7.0000000000000003e-207 or 1.02e6 < l Initial program 93.2%
Taylor expanded in t around 0 68.6%
unpow268.6%
unpow268.6%
times-frac75.7%
unpow275.7%
Simplified75.7%
Taylor expanded in Om around 0 68.3%
unpow287.1%
unpow287.1%
Simplified68.3%
times-frac14.5%
Applied egg-rr75.4%
if -7.0000000000000003e-207 < l < 1.02e6Initial program 71.7%
sqrt-div71.7%
div-inv71.7%
add-sqr-sqrt71.7%
hypot-1-def71.8%
*-commutative71.8%
sqrt-prod71.7%
unpow271.7%
sqrt-prod46.1%
add-sqr-sqrt97.2%
Applied egg-rr97.2%
Taylor expanded in Om around 0 87.5%
unpow287.5%
unpow287.5%
Simplified87.5%
Taylor expanded in Om around 0 47.9%
unpow247.9%
rem-square-sqrt47.9%
unpow247.9%
times-frac57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in l around 0 58.9%
*-commutative58.9%
associate-/l*58.9%
Simplified58.9%
Final simplification69.9%
(FPCore (t l Om Omc) :precision binary64 (asin (+ 1.0 (* -0.5 (* (/ Om Omc) (/ Om Omc))))))
double code(double t, double l, double Om, double Omc) {
return asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
}
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 + ((-0.5d0) * ((om / omc) * (om / omc)))))
end function
public static double code(double t, double l, double Om, double Omc) {
return Math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))));
}
def code(t, l, Om, Omc): return math.asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc)))))
function code(t, l, Om, Omc) return asin(Float64(1.0 + Float64(-0.5 * Float64(Float64(Om / Omc) * Float64(Om / Omc))))) end
function tmp = code(t, l, Om, Omc) tmp = asin((1.0 + (-0.5 * ((Om / Omc) * (Om / Omc))))); end
code[t_, l_, Om_, Omc_] := N[ArcSin[N[(1.0 + N[(-0.5 * N[(N[(Om / Omc), $MachinePrecision] * N[(Om / Omc), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sin^{-1} \left(1 + -0.5 \cdot \left(\frac{Om}{Omc} \cdot \frac{Om}{Omc}\right)\right)
\end{array}
Initial program 86.0%
Taylor expanded in t around 0 50.5%
unpow250.5%
unpow250.5%
times-frac55.9%
unpow255.9%
Simplified55.9%
Taylor expanded in Om around 0 50.3%
unpow287.2%
unpow287.2%
Simplified50.3%
times-frac29.0%
Applied egg-rr55.5%
Final simplification55.5%
(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 86.0%
sqrt-div86.0%
div-inv86.0%
add-sqr-sqrt86.0%
hypot-1-def86.0%
*-commutative86.0%
sqrt-prod85.9%
unpow285.9%
sqrt-prod53.2%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
Taylor expanded in Om around 0 87.2%
unpow287.2%
unpow287.2%
Simplified87.2%
Taylor expanded in Om around 0 68.4%
unpow268.4%
rem-square-sqrt68.4%
unpow268.4%
times-frac74.4%
unpow274.4%
Simplified74.4%
Taylor expanded in l around inf 55.2%
Final simplification55.2%
herbie shell --seed 2023224
(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)))))))