Home
Categories
Dictionary
Download
Project Details
Changes Log
FAQ
License

Mathematical functions support


By default the following mathematical funxtions are supported as of SPARQL 1.1:
  • The abs(arg) function returns the absolute value of an argument
  • The round(arg) function rounds an argument
  • The floor(arg) function returns the floor of an argument
  • The ceil(arg) function returns the ceil of an argument
  • The rand(arg) function returns a random value

Adding additional mathematical functions support

Main Article: prefix declarations

The SparqlPrefixDeclarations.addXPathPrefix(boolean) allows to ensure that the XPath math prefix will be included in the prefixes declarations. It will add support for the mathematical functions which are declared in XPath functions:
  • The math:pi constant returns the value of PI
  • The exp(arg) function returns the value of e with the argument as exponent
  • The exp10(arg) function returns the value of 10 with the argument as exponent
  • The log(arg) function returns the natural logarithm of the argument
  • The log10(arg) function returns the base-ten logarithm of the argument
  • The pow(x, y) function returns x power y
  • The sqrt(arg) function returns the square root of an argument
  • The sin(arg) function returns the sine of an argument (as an angle in radians)
  • The cos(arg) function returns the cosine of an argument (as an angle in radians)
  • The tan(arg) function returns the tangent of an argument (as an angle in radians)
  • The asin(arg) function returns the arc sine of an argument
  • The acos(arg) function returns the arc cosine of an argument
  • The atan(arg) function returns the arc tangent of an argument
  • The atan2(x, y) function returns the arc tangent2 of x and y

See also


Categories: Requestcreation

Copyright 2025 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence

Project Web Hosted by SourceForge.net Copyright 1999-2010 - Geeknet, Inc., All Rights Reserved About - Legal - Help