apoc.number.exact.toFloat
Function APOC Core
apoc.number.exact.toFloat(string,[prec],[roundingMode]) - return the Float value of a large number
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 |