Mathematical Functions

Functions for common mathematical operations

Qualified Name Type

apoc.math.maxByte() - returns the maximum value of a byte.

Function

apoc.math.maxDouble() - returns the largest positive finite value of type double.

Function

apoc.math.maxInt() - returns the maximum value of an integer.

Function

apoc.math.maxLong() - returns the maximum value of a long.

Function

apoc.math.minByte() - returns the minimum value of a byte.

Function

apoc.math.minDouble() - returns the smallest positive non-zero value of type double.

Function

apoc.math.minInt() - returns the minimum value of an integer.

Function

apoc.math.minLong() - returns the minimum value of a long.

Function

apoc.number.arabicToRoman(number ANY) - converts the given Arabic numbers to Roman numbers.

Function

apoc.number.romanToArabic(romanNumber STRING) - converts the given Roman numbers to Arabic numbers.

Function

Examples

The following returns the maximum long value:
RETURN apoc.math.maxLong() AS output;
Table 1. Results
Output

9223372036854775807

The following returns the minimum long value:
RETURN apoc.math.minLong() AS output;
Table 2. Results
Output

-9223372036854775808

The following returns the maximum double value:
RETURN apoc.math.maxDouble() AS output;
Table 3. Results
Output

1.7976931348623157e+308.0

The following returns the minimum double value:
RETURN apoc.math.minDouble() AS output;
Table 4. Results
Output

5e-324

The following returns the maximum int value:
RETURN apoc.math.maxInt() AS output;
Table 5. Results
Output

2147483647

The following returns the minimum int value:
RETURN apoc.math.minInt() AS output;
Table 6. Results
Output

-2147483648

The following returns the maximum byte value:
RETURN apoc.math.maxByte() AS output;
Table 7. Results
Output

127

The following returns the minimum byte value:
RETURN apoc.math.minByte() AS output;
Table 8. Results
Output

-128