View Single Post
  #1  
Old 08-02-2019, 02:58 PM
AndrewEK AndrewEK is offline
Registered User
 
Join Date: Dec 2010
Posts: 35
Divide number bigger than a long

If I do integer divide on a number bigger than a long (32 bits), I get an overflow error. Is there a way to declare a number as a double? If not, how do you do arithmetic on a number bigger than a long (32 bits)?

Example - need to divide by 2^14 to strip off lower 10 bits to get
the value in bits 11-34:

inputNum = 14417936436
newNum = inputNum \ 16384 <---- Overflow error
Reply With Quote