官术网_书友最值得收藏!

Floating point and decimal numbers

Cassandra has three types that store non-integer numbers:

  • The float type stores 32-bit IEEE-754 floating point numbers.
  • The double type stores 64-bit IEEE-754 floating point numbers.
  • The decimal type stores variable-precision decimal numbers, with no upper bound on size. Unlike a floating point number, a variable-precision decimal will never suffer from base 10 rounding errors in the fractional part of the number.

Like the integer types, the floating point and decimal types are always signed. In CQL, floating point and decimal literals are represented by an optional minus sign, followed by a series of digits, followed by a period, followed by another series of digits, such as 7,152.6846. You can also write them using exponential notation, such as 9.021e14.

主站蜘蛛池模板: 拉萨市| 郓城县| 威远县| 彭州市| 绥滨县| 乐至县| 土默特左旗| 平原县| 天全县| 临泽县| 广灵县| 泰来县| 青神县| 红原县| 九寨沟县| 金湖县| 宁陵县| 宣恩县| 翁源县| 永州市| 涿鹿县| 辽阳县| 古丈县| 宁远县| 海阳市| 辰溪县| 铜陵市| 台安县| 霍山县| 清水河县| 额济纳旗| 合水县| 佛冈县| 库伦旗| 东兰县| 华亭县| 深圳市| 南开区| 临高县| 济阳县| 三江|