Decimal32#

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

Represents a Swordfish Decimal32 object.

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

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

Examples

>>> import swordfish as sf
>>> sf.data.Decimal32(314, 2)
Decimal32(3.14, scale=2)
>>> sf.data.Decimal32(3.141,3)
Decimal32(3.141, scale=3)
NULL_VALUE: Decimal32#