Thread: Divide

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    16
    Rep Power
    0

    Divide


    Hello all.
    can any one help me to know how can I divide two very long number . the number my be consiste of 300 digite
    thank for help.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    Hatfield
    Posts
    280
    Rep Power
    84
    What data type are you using, e.g. double, int, long, float?
    -Also what issue do you get when you do a division?

    If its just that you need syntax, then a division is the '/' symbol.
  4. #3
  5. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Switzerland
    Posts
    1,152
    Rep Power
    1901
    I sounds to me like you need a BigInteger implementation... There are a couple of them floating around on the internet. There's even one included in the j# part of the framework. It's a bit hidden but I think in .NET 4.0 it will be made more accessible.

    Comments on this post

    • mattaseymour agrees : There is a MS implementation as part of the .net 4.0 framework
    - Hugh of Borg

    The first thing young borg are taught: Keep away from Microsoft software!
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2009
    Posts
    16
    Rep Power
    0
    I need divide two very long integer number but without use library can help my
  8. #5
  9. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Switzerland
    Posts
    1,152
    Rep Power
    1901
    Originally Posted by hu_kh
    I need divide two very long integer number but without use library can help my
    Why can't you use a library?

    Assuming you really can't there are still options:
    a) search for an implementation online and use the sourcecode directly in your program.
    b) use the J# implementation in your program. Since it is an official part of .NET it shouldn't be considered a library.
    c) crack your head and write your own solution from scratch.
    - Hugh of Borg

    The first thing young borg are taught: Keep away from Microsoft software!
  10. #6
  11. Humble Learner
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2007
    Location
    Bangalore, India
    Posts
    280
    Rep Power
    119
    Originally Posted by hu_kh
    I need divide two very long integer number but without use library can help my
    You can't or you don't want to ?

    If you do not want to then it is so simple, write your own logic, that's it.

IMN logo majestic logo threadwatch logo seochat tools logo