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

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.

主站蜘蛛池模板: 密云县| 巧家县| 大悟县| 太仆寺旗| 巴彦县| 绥芬河市| 耿马| 西盟| 涟源市| 靖江市| 威宁| 桃江县| 集贤县| 蒙自县| 池州市| 平远县| 雅安市| 彭泽县| 乌恰县| 石台县| 铁力市| 阳山县| 若羌县| 马龙县| 西乌珠穆沁旗| 鄄城县| 沂南县| 昌图县| 怀远县| 太仓市| 枝江市| 凤凰县| 呼伦贝尔市| 临桂县| 日土县| 余庆县| 神农架林区| 潮安县| 乌兰察布市| 板桥市| 安龙县|