fixToU n [D>=14]
Calculates the integer part of W and leaves it in U(n) - U(n+3) as a 24 bit signed number. This instruction is intended primarily for use with Tiny Serial Peripheral (TSP) data types Word and Long.
Although the result is in 32 bits the current implementation is limited to numbers in the range -8,388,607 to +8,388,607 (signed 2's complement 24-bit values, sign extended into the most significant byte).
Limiting cases:
- If W contains values outside the range -8,388,607 to +8,388,607, the instruction returns the largest positive or negative 32-bit signed numbers numbers possible ( '7FFFFFFF or '80000000)
- If W contains plus infinity or minus infinity, the instruction returns the largest positive or negative numbers possible ( '7FFFFFFF or '80000000).
- If W contains NaN (not a number) it returns 0.
See also result codes
(This is in keeping with the principle of non-stop computing. It is your responsibility to check for extreme cases if anything bad might otherwise happen.)
Do not confuse with fix, which is the "classic" conversion of floating point in W to integer in X.
Dialect restriction: Available only in boards with dialect 14 or greater.
See also floatFromU