Re: Basic Shift Right
Posted: Tue Sep 12, 2017 3:25 am
Hi Peter
I don't see a problem like you do.
If the original numberToShift passed to the extension exceeded the (signed) 32-bit range, then an error would be returned when the GETLN support routine is used to fetch the parameter.
The resultant shifted number will always remain within 32-bits, so will return valid, albeit as a FP, normalised value. The only 'anomaly' might be that it changes sign in the process.
Or am I missing something?
I don't see a problem like you do.
If the original numberToShift passed to the extension exceeded the (signed) 32-bit range, then an error would be returned when the GETLN support routine is used to fetch the parameter.
The resultant shifted number will always remain within 32-bits, so will return valid, albeit as a FP, normalised value. The only 'anomaly' might be that it changes sign in the process.
Or am I missing something?