Documentation Index

Fetch the complete documentation index at: https://docs.lobster-world.com/llms.txt

Use this file to discover all available pages before exploring further.

round(a, b)

Prev Next

This function rounds numerical value a to the nearest double value with b digits after the decimal separator. Since this function uses double values internally, rounding errors may occur. Use function round(bigdecimal a, b) to avoid this.

If a is not a numerical value, the function returns 0.0, see examples below.

Parameters

Parameter

Description

a

Numerical value.

b

Number of decimal places in resulting value.

Examples

Parameter a

Parameter b

Result

2.135

0

2

2.135

1

2.1

2.135

2

2.14

abc

2

0.0