数学函数

常用数学运算函数

限定名称 类型

apoc.math.maxByte() - 返回字节的最大值。

函数

apoc.math.maxDouble() - 返回 double 类型的最大正有限值。

函数

apoc.math.maxInt() - 返回整数的最大值。

函数

apoc.math.maxLong() - 返回 long 的最大值。

函数

apoc.math.minByte() - 返回字节的最小值。

函数

apoc.math.minDouble() - 返回 double 类型的最小正非零值。

函数

apoc.math.minInt() - 返回整数的最小值。

函数

apoc.math.minLong() - 返回 long 的最小值。

函数

apoc.number.arabicToRoman(number ANY) - 将给定的阿拉伯数字转换为罗马数字。

函数

apoc.number.romanToArabic(romanNumber STRING) - 将给定的罗马数字转换为阿拉伯数字。

函数

示例

以下返回最大 long 值
RETURN apoc.math.maxLong() AS output;
表 1. 结果
输出

9223372036854775807

以下返回最小 long 值
RETURN apoc.math.minLong() AS output;
表 2. 结果
输出

-9223372036854775808

以下返回最大 double 值
RETURN apoc.math.maxDouble() AS output;
表 3. 结果
输出

1.7976931348623157e+308.0

以下返回最小 double 值
RETURN apoc.math.minDouble() AS output;
表 4. 结果
输出

5e-324

以下返回最大 int 值
RETURN apoc.math.maxInt() AS output;
表 5. 结果
输出

2147483647

以下返回最小 int 值
RETURN apoc.math.minInt() AS output;
表 6. 结果
输出

-2147483648

以下返回最大 byte 值
RETURN apoc.math.maxByte() AS output;
表 7. 结果
输出

127

以下返回最小 byte 值
RETURN apoc.math.minByte() AS output;
表 8. 结果
输出

-128

© . All rights reserved.