Solved

C# Large numbers

Posted on 2006-06-23
3
285 Views
Last Modified: 2008-01-09
I'm trying to do this equastion: http://www.hackingspirits.com/cyb_forensic/fsic_articles/loc_place.html

However i keep getting a "The operation overflows at compile time in checked mode";

All are ok except for 16777216*202.  I've tried a few things, like doubles, ints longs and tried to make them unsigned aswell.  Is there a way to handle such large numbers?

If there isn't a standard .net way, my guess is i have to create my own class and catch how much overflow there is?
0
Comment
Question by:UnexplainedWays
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 16974317
please try this:
16777216m * 202m
0
 
LVL 12

Author Comment

by:UnexplainedWays
ID: 16974329
           uint aaa = 202;
            uint bbb = 16777216;
            IP_Number = aaa * bbb;

It took the 202 and left it as a normal int.

I tried the m, it turns the numbers into a decimal, and if i turn the origional number into a decimal that works 2.
Thanks.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now