All Downloads are FREE. Search and download functionalities are using the official Maven repository.

query.leibniz.rq Maven / Gradle / Ivy

Go to download

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