Results 1 to 4 of 4

Thread: Microsoft is finally doing something right.

  1. #1

    Thread Starter
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Microsoft is finally doing something right.

    They have created a big integer class in .net4
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Microsoft is finally doing something right.

    I assume that you mean one that is bigger than a Long. Is the big integer an arbitrarily large number? Does it have to be an integer, or is it an arbitrarily large decimal value, as well?
    My usual boring signature: Nothing

  3. #3
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Microsoft is finally doing something right.

    Big Integer style classes are like Strings. They can be as large as needed; the bigger the number, the more bytes it takes up. I don't see why they couldn't make a Big Decimal as well and track significant digits. though I expect any classes like this to be horribly slow computationally.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Microsoft is finally doing something right.

    The speed depends on whether they have based it on Strings (which I doubt), or have done it fully numerically.

    Even if it is fully numerical, the speed will be worse than the normal numeric data types (due to the need to split the number into processor-sized chunks), but should be noticeably better than the vast majority of custom-made solutions.

    For simple operations (such as +-=< etc) the time could well be around double the equivalent amount of normal data types (eg: if it is 10 times the size of an Integer, the time taken will be 20 times as much as doing the same operation with an Integer). Of course the more complex operations (/*^ etc) will be much slower by comparison.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width