apoc.number.exact.div

Details

Syntax

apoc.number.exact.div(stringA, stringB [, precision, roundingMode ])

Description

Returns the result of dividing a given large number with another given large number (using Java BigDecimal).

Arguments

Name

Type

Description

stringA

STRING

A string representation of a number to be divided by the second number.

stringB

STRING

A string representation of a number to divide the first number by.

precision

INTEGER

The rounding precision. The default is: 0.

roundingMode

STRING

A precision rounding mode (UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN). The default is: HALF_UP.

Returns

STRING

Usage Examples

RETURN apoc.number.exact.div('550058444','662557', 18, 'HALF_DOWN') as output;
Results
output

"830.205467605051339"