Loading TOC...

xdmp:add64

xdmp:add64(
   $x as xs:unsignedLong,
   $y as xs:unsignedLong
) as xs:unsignedLong

Summary

Add two 64-bit integer values, discarding overflow.

Parameters
$x The first value.
$y The second value.

Example

xdmp:add64(11442580934957149475,14565934789622151058)
=> 7561771650869748917

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • will report following error if too large [1.0-ml] XDMP-LEXNUM: (err:FORG0001) 123456789012345678901 is not a valid lexical representation of a number
    • Yes, the limit is 64 bits. The number you tested with is a 67-bit number.