apoc.math.round

Function APOC Core

apoc.math.round(value,[precision],mode=['CEILING','FLOOR','UP','DOWN','HALF_EVEN','HALF_DOWN','HALF_UP','DOWN','UNNECESSARY'])

Signature

apoc.math.round(value :: FLOAT?, precision = 0 :: INTEGER?, mode = HALF_UP :: STRING?) :: (FLOAT?)

Input parameters

Name Type Default

value

FLOAT?

null

precision

INTEGER?

0

mode

STRING?

HALF_UP

Usage Examples

RETURN apoc.math.round(1.783, 0, "HALF_UP") AS output;
Table 1. Results
output

2.0

RETURN apoc.math.round(1.783, 0, "DOWN") AS output;
Table 2. Results
output

1.0

This function has been deprecated and will be removed in version 5.0. Use Neo4j’s round() function, which has the same signature since Neo4j 4.2, instead.