Lets Learn

Opinion Matters

Question Of the Day # 2

Posted by Ankush on January 27, 2011


Thanks for reading and participating in this series. I received several emails this to be made a 2 day event so from now onwards I am going to post the question in every 2 days. In case, if you also have any interesting question and would like to get it answered  here, you can email that to me @ ankush.bhatia@live.com and I will post it here!!

So, here comes the another one.

Consider a scenario, you are designing a scientific application (ex: scientific calculator) and you need to handle the very large numbers. How would you design your application to handle this situation. As there is no datatype in .net which can handle very- very large numbers and its calculation so what approch would you take to resolve this. My application is targeting .net framework 2.0.

Keep thinking!!

Answer:

So as you may be aware that .net framework 4.0 already provides a datatype  BigInteger to hold the very large numbers.

http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx

If you have to implement this at your own, you can use positional notation system.

Have a look at there for the complete implmentation :http://www.codeproject.com/KB/cs/biginteger.aspx

 

Advertisements

2 Responses to “Question Of the Day # 2”

  1. Man Mohan Sharma said

    Hi,

    In one of the interview someone asked me about types of Technical Architecture, as I know we have Client-Server, n-tier, SOA or can be refer as Application Architecture, System Architecture. I have also did googling but didn’t get anything specific.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: