Decimal |
Information |
A real number (ℝ set) represented as a decimal value. The Decimal is composed of a 2 fixed parts: an integer on the left of the separator and a mantissa on the right. This representation support a lower range of values than floating point one: Approximate range from ±1,84467× 10-19 to ± 9,22337× 10+18
However it provides exact arithmetic computing except for division (fractions) and irrational numbers. This type is useful when accuracy is more important that performance. Its performance is nevertheless better than string based representation. |
Fields |
Integer |
The integer part of the decimal as an Integer sbyte. |
Mantissa |
The mantissa part of the decimal as an Integer sbyte. |
|
Properties |
Shared |
+∞ ,
-∞ |
Positive and negative infinity.
The “last” number, at ordinal 263-1, is noted +∞. The “first” number, at ordinal -263, is noted -∞. These ordinal values are a facility to supports the potential of infinity. |
+0,
-0 |
Positive and negative zero. |
π |
Ratio of a circle's circumference to its diameter: 3.14159… |
e |
Euler's number: 2.71828… |
φ |
The golden number: 1.61803… |
Unshared |
String |
The string follows this regular expression: \-∞|\+∞|(0|\-[0-9]+|(\+)?[0-9]+)\.[0-9]+ |
|
Attribute |
$ (Alias Value) |
The decimal value |
|
Constructors |
|
Base constructor. |
|
Conversion constructor from another Number if the origin type and Value are compatible. |
|
Commands |
+ |
Addition of the operands to the current object if they are ⊥. |
– |
Subtraction of the operands to the current object if they are ⊥. |
|
Multiplication of the operands to the current object if they are ⊥. |
|
Division of the operands to the current object if they are ⊥. |
|
Round with a given number of decimal following a rounding mode. |
|
Round to the desired multiple.
Example: Rounding 10.1 to the nearest multiple of 3.0 gives 9.0. |
|
Queries |
=,⊥ |
Overrides the Type queries. |
|
Overrides the Ordered queries. |
|
Invariants |
Name |
Value greater that (263)-2 (~ 9,22337× 10+18) is not allowed |
Information |
Upper value limit. |
Name |
Value least that (-263)+1 (~ -9,22337× 10+18) is not allowed
|
Information |
Lower value limit. |
Name |
The minimum absolute value and the resolution are 2-64 (~1,84467× 10-19)
|
Information |
Mantissa domain extend. |
|