Function used to manipulate a real value (double 8 bytes), still returning a real value, but modified so that it is returned to the field of valid values for a unit of type unsigned int 32 bits (equivalent to assigning an unsigned int 32 the incoming data and then copying this data to another real variable).
Syntax |
real r2m32 (real value) |
---|---|
value |
Is a generic expression of type real that provides the function with the data to manipulate |
result |
Returns the converted value |
Validity |
Rule, Task |
Note |
Runs the module of value with the value 2^32 (4294967296):
•If value is positive, the function returns its module with the value 2^32
•If value is negative, the function executes its module with the value 2^32 of its absolute value. It then does the 2's complement of it
The rules for converting data from real to unsigned 32 result in the following table:
Value entered |
Returned value |
---|---|
0 |
0 |
17 |
17 |
4294967295 |
4294967295 |
4294967296 |
0 |
4294967297 |
1 |
-1 |
4294967295 |
-17 |
4294967279 |
-4294967295 |
1 |
-4294967296 |
0 |
-4294967297 |
4294967295 |