You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decimals are fractional representations that are not stored as IEEE floating points. A.k.a. "fixed point".
They are necessary for specific applications that cannot tolerate the imprecise precision of floating points, most notably currency. They imply not only fixed point storage, but also fixed point arithmetic operations.
Due to the limitations of YAML parsing I propose that they be represented as strings. Examples:
data_types:
BankAccount:
properties:
balance: decimalservice_template:
node_templates:
my-account:
properties:
balance: '-127.40'# trailing zeroes are optionalyour-account:
properties:
balance: { $product: [ $get_property: [ my-account, balance ], '.02' ] } # note we seem to be multiplying by a string
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For TOSCA 2.1.
Decimals are fractional representations that are not stored as IEEE floating points. A.k.a. "fixed point".
They are necessary for specific applications that cannot tolerate the imprecise precision of floating points, most notably currency. They imply not only fixed point storage, but also fixed point arithmetic operations.
Due to the limitations of YAML parsing I propose that they be represented as strings. Examples:
Beta Was this translation helpful? Give feedback.
All reactions