-
Notifications
You must be signed in to change notification settings - Fork 19
XPATH math:exp
JervenBolleman edited this page May 29, 2019
·
5 revisions
Signature
xsd:double EXP (numeric)
The result is the mathematical constant e raised to the power of $arg, as defined in the [IEEE 754-2008] specification of the exp function applied to 64-bit binary floating point values.
This function is the same as math:exp.
ASK {FILTER(EXP(1.0) >= "2.718281828459045"^^xsd:double)}
ASK {FILTER(EXP(1.0) <= "2.718281828459046"^^xsd:double)}
ASK {FILTER(EXP(0) = "1.0e0"^^xsd:double)}
ASK {FILTER(EXP(2.0) = "7.38905609893065e0"^^xsd:double)}
ASK {FILTER(EXP(2) = "7.38905609893065e0"^^xsd:double)}
ASK {FILTER(EXP(-1) = "0.36787944117144233e0"^^xsd:double)}
ASK {FILTER(EXP(PI()) = "23.140692632779267e0"^^xsd:double)}
Should return true
exp()
called without a variable/value should be a parse error.
exp()
cast with a numeric should have an attempted cast to the xsd:double.
Note that EXP has an approximate answer for common test values e.g. the 1.0