First, 4*M*b of RAM or GB? If MB, I can only assume you're running DOS?
Are you getting an error, or just incorrect results?
Show your code / calculations and some sample values, what you expect and what you're getting. It could be corruption, it could be misunderstanding of what's possible...