BigDecimal provides static properties for the numbers zero, one and ten. It's good practise to use these instead of using the actual numbers:
BigDecimal.ZERO
BigDecimal.ONE
BigDecimal.TEN
By using the static properties, you avoid an unnecessary instantiation, also you've got a literal in you...
Decimal fixed point types are typically used in accounting. They are characterised by both a delta and a number of decimal digits. Their arithmetical operations reflect the rules of accounting.
type Money is delta 0.001 digits 10;
Oil_Price : Money := 56.402;
Loss : Money := 0.002 / 3; -- ...
The following example illustrates use of the bitwise NOT (~) operator on decimal numbers.
To keep the example simple, decimal number 3.5 will be used, cause of it's simple representation in binary format.
let number = 3.5;
let complement = ~number;
Result of the complement number equals to -4;...