Decimal128#

class swordfish._swordfishcpp.Decimal128(data: int, scale: int = EXPARAM_DEFAULT)#
class swordfish._swordfishcpp.Decimal128(data: Decimal, scale: int = EXPARAM_DEFAULT)

Represents a Swordfish Decimal128 object.

Parameters:
  • data (int or Decimal) – The raw data representation or value of the Decimal128.

  • scale (int, optional) – The scale of the Decimal128. Defaults to EXPARAM_DEFAULT.

Examples

>>> import swordfish as sf
>>> sf.data.Decimal128(12345, 6)
Decimal128(0.012345, scale=6)
>>> sf.data.Decimal128(3.14,5)
Decimal128(3.14000, scale=5)
NULL_VALUE: Decimal128#