- TIBCO BusinessEvents®
- Standard
- Math

# Math.round()

## Signature

`long round (double a)`

## Domain

ACTION, CONDITION, QUERY, BUI

## Description

Returns the closest `long` to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type `long`. In other words, the result is equal to the value of the expression:

    (long)Math.floor(a + 0.5d)

Special cases:
If the argument is NaN, the result is 0.
If the argument is negative infinity or any value less than or equal to the value of `Long.MIN_VALUE`, the result is equal to the value of `Long.MIN_VALUE`.
If the argument is positive infinity or any value greater than or equal to the value of `Long.MAX_VALUE`, the result is equal to the value of `Long.MAX_VALUE`.

## Parameters

Name | Type | Description
--- | --- | ---
`a` | `double` | A floating-point value to be rounded to a `long`.

## Returns

Type | Description
--- | ---
`long` | The value of the argument rounded to the nearest `long` value.

## Cautions

none

## See Also

java.lang.Long#MIN_VALUE