
query.zeta.rq Maven / Gradle / Ivy
#
# zeta(2) = pi^2 / 6
# zeta(4) = pi^4 / 90
#
prefix ex:
select
(power(6 * ex:zeta(?n, 2), 1/2) as ?pi1)
(power(90 * ex:zeta(?n, 4), 1/4) as ?pi2)
where {
function ex:fun(?n, ?p) { 1 / power(?n, ?p) }
function ex:zeta(?n, ?p) {
apply(kg:plus, (maplist(ex:fun, xt:iota(?n), ?p)))
}
}
values ?n { 1000 }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy