15.4. toPrecision()

The toPrecision() service formats the number to the length specified by the parameter. If needed, a decimal point and zeros are added. The default is the original number.

Table 15.4: Example

M2DocNumberType
{ m:node.number }0.0081444Numeric
{ m:node.number.toPrecision() }0.0081444String
{ m:node.number.toPrecision(2) }0.0081String
{ m:node.number.toPrecision(5) }0.0081444String
{ m:node.number.toPrecision(10) }0.008144400000String