
query.leibniz.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-gui Show documentation
Show all versions of corese-gui Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint)
implementing RDF, RDFS, SPARQL 1.1 Query and Update, Shacl. STTL. LDScript.
The newest version!
prefix ex:
select (4 * ex:leibniz(?n) as ?pi)
where {
function ex:leibniz(?n) {
let (
?x = reduce(kg:plus, maplist(ex:inv, xt:iota(1, ?n, 4))),
?y = reduce(kg:plus, maplist(ex:inv, xt:iota(3, ?n, 4)))){
?x - ?y
}
}
function ex:inv(?n) { 1 / ?n }
}
values ?n { 1000000 }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy