--- title: "round(a)" slug: "math-round" updated: 2026-08-13T13:20:31Z published: 2026-08-13T13:20:31Z canonical: "docs.lobstersoftware.com/math-round" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # round(a) This function rounds **a** to the nearest integer value. The result will have the data type BigDecimal if the param **a** was a BigDecimal or BigInteger. Otherwise, the result will have the type Double. If **a** is not a numerical value, the function returns 0.0, see examples below. > [!NOTE] > **NOTE:** > > Please use values **type-safe**. In a commercial context, values should consistently be handled as BigDecimal data types. In a scientific field, the high-precision data type Double is better suited. ## Parameters | Parameter | Description | | --- | --- | | a | Numerical value | ## Examples | Parameter a | Result | | --- | --- | | 1.2 (type: BigDecimal) | 1 | | 1.5 (type: BigDecimal) | 2 | | -2.3 (type: BigDecimal) | -2 | | -2.3 (type: Double) | -2.0 | | -2.5 (type: BigDecimal) | -3 | | abc (type: String) | 0.0 |