Detailed Description
This group includes all functions used to create/convert zints.
Define Documentation
#define sat3_zintdigits |
( |
|
zint | ) |
(sat3_strsize(zint)-1) |
Get the number of digits in a ZINT.
Obtain the number of digits in a zint, not including the sign digit.
- Parameters:
-
- Returns:
- Number of digits in the given zint, or 0 if not a zint.
Definition at line 1778 of file sat3.h.
Function Documentation
Create a zint from double precision real numbers.
This function creates a zint object from a double.
- Parameters:
-
where | Defines where to allocate memory from. Can be one of the following constants: ALLOC_HEAP Allocates from the C-heap using malloc() ALLOC_TEMPOB Allocates memory from the TEMPOB calculator area or... it can be an element (SAT_OBJECT) within a composite object, (array, list or any other). |
value | Value to assign to the newly created number. |
- Returns:
- SAT_OBJECT with the new zint number, or zero if it fails. When a SAT_OBJECT is given to the 'where' parameter, the same SAT_OBJECT is returned, or zero if it fails.
- See also:
- sat3_createzint_xreal sat3_createzint_decn sat3_createzint_int sat3_createzint_llong Object creation and manipulation
Create a zint from variable precision real numbers (decNumber).
This function creates a zint object from a decNumber.
- Parameters:
-
where | Defines where to allocate memory from. Can be one of the following constants: ALLOC_HEAP Allocates from the C-heap using malloc() ALLOC_TEMPOB Allocates memory from the TEMPOB calculator area or... it can be an element (SAT_OBJECT) within a composite object, (array, list or any other). |
value | Pointer to the value to assign to the newly created number. |
- Returns:
- SAT_OBJECT with the new zint number, or zero if it fails. When a SAT_OBJECT is given to the 'where' parameter, the same SAT_OBJECT is returned, or zero if it fails.
- See also:
- sat3_createzint_xreal sat3_createzint_dbl sat3_createzint_int sat3_createzint_llong Object creation and manipulation
Create a zint from an int.
This function creates a zint object from a 32-bit integer.
- Parameters:
-
where | Defines where to allocate memory from. Can be one of the following constants: ALLOC_HEAP Allocates from the C-heap using malloc() ALLOC_TEMPOB Allocates memory from the TEMPOB calculator area or... it can be an element (SAT_OBJECT) within a composite object, (array, list or any other). |
value | Value to assign to the newly created zint. |
- Returns:
- SAT_OBJECT with the new zint number, or zero if it fails. When a SAT_OBJECT is given to the 'where' parameter, the same SAT_OBJECT is returned or 0 if error.
- See also:
- sat3_createzint_decn sat3_createzint_dbl sat3_createzint_llong sat3_createzint_xreal Object creation and manipulation
Create a zint from a LONGLONG.
This function creates a zint object from a 64-bit integer.
- Parameters:
-
where | Defines where to allocate memory from. Can be one of the following constants: ALLOC_HEAP Allocates from the C-heap using malloc() ALLOC_TEMPOB Allocates memory from the TEMPOB calculator area or... it can be an element (SAT_OBJECT) within a composite object, (array, list or any other). |
value | Value to assign to the newly created zint. |
- Returns:
- SAT_OBJECT with the new zint number, or zero if it fails. When a SAT_OBJECT is given to the 'where' parameter, the same SAT_OBJECT is returned or 0 if error.
- See also:
- sat3_createzint_decn sat3_createzint_dbl sat3_createzint_int sat3_createzint_xreal Object creation and manipulation
Create a ZINT from extended precision real numbers (XREAL).
This function creates a zint object from an XREAL number.
- Parameters:
-
where | Defines where to allocate memory from. Can be one of the following constants: ALLOC_HEAP Allocates from the C-heap using malloc() ALLOC_TEMPOB Allocates memory from the TEMPOB calculator area or... it can be an element (SAT_OBJECT) within a composite object, (array, list or any other). |
value | Pointer to the value to assign to the newly created number. |
- Returns:
- SAT_OBJECT with the new zint number, or zero if it fails. When a SAT_OBJECT is given to the 'where' parameter, the same SAT_OBJECT is returned, or zero if it fails.
- See also:
- sat3_createzint_decn sat3_createzint_dbl sat3_createzint_int sat3_createzint_llong Object creation and manipulation