apoc.number.exact.toFloat
Function
apoc.number.exact.toFloat(string STRING, precision INTEGER, roundingMode STRING)
- returns the FLOAT
of the given large number (using Java BigDecimal).
Signature
apoc.number.exact.toFloat(stringA :: STRING, precision = 0 :: INTEGER, roundingMode = HALF_UP :: STRING) :: FLOAT
Input parameters
Name | Type | Default |
---|---|---|
stringA |
STRING |
null |
precision |
INTEGER |
0 |
roundingMode |
STRING |
HALF_UP |
Usage Examples
RETURN apoc.number.exact.toFloat('50423.1656', 10) as output;
output |
---|
50423.1656 |
RETURN apoc.number.exact.toFloat('50423.1656', 3) as output;
output |
---|
50400.0 |
RETURN apoc.number.exact.toFloat('50423.1656', 5, "CEILING") as output;
output |
---|
50424.0 |
RETURN apoc.number.exact.toFloat('50423.1656', 5, "FLOOR") as output;
output |
---|
50423.0 |