2. The functions provided and their use#
2.1. Generality#
To help with the use of these functions, an effort has been made to codify the names of the functions using three components:
nature GGde greatness:
LB length in bits,
LO length in bytes,
MA maximum positive value,
MI minimum positive value,
GA value range.
The TT type of the size to which it applies:
The EM suffix (Machine Environment).
For length parameters (l_) the functions are of integer type. Function names are of the form: GGTTEM.
For parameters whose value depends on the type, the type of the function will be that of the value sought. In this case the function names are of the form: TTGGEM.
Since these functions are not part of the intrinsic functions of the language, it is essential to declare their type in each user program unit.
2.2. Logical type#
Standard logic type (LOGICAL)
Type of function |
Parameter provided |
Function ENVIMA |
64-bit platform |
32-bit platform |
INTEGER |
Length in bytes |
LOLSEM |
8 |
4 |
2.3. Integer type#
Standard integer type (INTEGER)
Type of function |
Parameter provided |
Function ENVIMA |
64-bit platform |
32-bit platform |
|
INTEGER |
Length in bytes |
LOISEM |
8 |
4 |
|
INTEGER |
Maximum value |
ISMAEM |
formula \({2}^{63}-1\) |
formula \({2}^{31}-1\) |
formula 2147483647 |
2.4. Real type#
*Standard real type (REAL*8)
Type of function |
Parameter provided |
Function ENVIMA |
64-bit platform |
32-bit platform |
|
REAL *8 |
Relative Accuracy |
**R8 PREM ** |
2.220D-16 |
2.220D-16 |
2.220D-16 |
REAL *8 |
Maximum Value |
**R8 MAEM ** |
1.798D+308 |
1.798D+308 |
|
REAL *8 |
Minimum value |
**R8 MIEM ** |
2.225D-308 |
2.225D-308 |
2.225D-308 |
REAL *8 |
Range |
**R8 GAEM ** |
1.340D+154 |
1.340D+154 |
2.5. File usage settings#
These settings are used because of operational constraints on servers whose resources are shared. The databases (glob.i and vola.i files) are generally created on a limited shared space (/tmp).
Type of function |
Parameter provided |
Function ENVIMA |
64-bit platform |
32-bit platform |
|
INTEGER |
Maximum file length in bytes |
LOFIEM |
12582912 |
2048000 |
|
INTEGER |
Cumulative file size in bytes |
MOFIEM |
50331648 |
50331648 |
50331648 |
2.6. Assigning binary constants#
To build masks on digital information, it is necessary to quickly access bit weights. These can be accessed by the integer function ISPBEM (bit number).
ISPBEM (4) = 0000000000000000000000001000 = \({2}^{4\mathrm{-}1}\) = 8
2.7. Assignment of mathematical or physical constants#
The particular constants are accessible from the type of the requested variable:
Type of function |
Parameter provided |
Function ENVIMA |
Value |
REAL *8 |
|
R8PI |
3.141592653589793D+00 |
REAL *8 |
|
**R8 DEPI ** |
6.283185307179586D+00 |
REAL *8 |
Radian/degree conversion |
**R8 DGRD ** |
1.745329251994330D-02 |
REAL *8 |
Degree/Radian Conversion |
**R8 RDDG ** |
5.729577951308232D+01 |
REAL *8 |
Absolute zero (temperature) |
R8T0 |
273.15 |
2.8. Special values#
These values are available on all machines with IEEE arithmetic.
Type of function |
Parameter provided |
Function ENVIMA |
Value |
INTEGER |
Value that caused an error during a float operation |
ISNNEM |
|
REAL *8 |
Value that caused an error during a float operation |
**R8 NNEM ** |
NaN |
REAL *8 |
Data structure initialization value |
**R8 VIDE ** |
1.797693134862316+308 |
2.9. Utility#
The Fortran IMPVEM subroutine makes it possible to globally edit the various characteristic values of the processing machine on the file with the logical unit number IUL. An example is given in the appendix.
CALL IMPVEM (IUL): Print all the characteristics of the standard types.
2.10. Precautions for use#
Since these functions are not part of the intrinsic functions of the language, it is essential to declare their type in each user program unit. In this case the function names are TTGGEM with TT type of the function and GG nature of the quantity (cf. example of use).
Note:
Values for integers are of the implicit integer type (functions starting with a letter L- or N-) .
<limits.h><float.h>The ENVIMA functions are available in the Code_Aster C utility library, and are mostly based on the standard C libraries: header files and [bib4].
By definition, any operation to port a subset of Code_Aster to other hardware requires the prior port of ENVIMA. The use of standard headers significantly limits a thorough search of the manufacturer’s documentation.