Results 1 to 7 of 7

Thread: ZettaByte Data Type?

  1. #1

    Thread Starter
    Junior Member Guile.NET's Avatar
    Join Date
    Mar 2003
    Location
    www.voodoochat.com
    Posts
    31

    ZettaByte Data Type?

    What data type would be used to handle such a large number?

    I've tried all, even 'Object', yet it still shows an overflow error.

    [Edited to add: a ZettaByte = 1180591620717411303424 (1024 ^ 7)]
    The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I have no idea myself, but I was wondering what you are doing with such a large number?

  3. #3

    Thread Starter
    Junior Member Guile.NET's Avatar
    Join Date
    Mar 2003
    Location
    www.voodoochat.com
    Posts
    31
    Well, Windows Calculator seems to be able to do it, and I'm wondering how.
    The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.

  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    A Decimal should be able to hold that value.
    Frans

  5. #5

    Thread Starter
    Junior Member Guile.NET's Avatar
    Join Date
    Mar 2003
    Location
    www.voodoochat.com
    Posts
    31
    Nope, it still produces an overflow error.
    The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.

  6. #6
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    A Decimal should be able to do it.
    The Decimal value type represents decimal numbers ranging from positive 79,228,162,514,264,337,593,543,950,335 to negative 79,228,162,514,264,337,593,543,950,335.

    Possibly the overflow occurs before you assign the value to the variable.
    How do you assign the value? Do you use a calculation?

    Which way do you use?

    MyZettabyte = 1024 ^ 7
    or
    MyZettabyte = 1180591620717411303424

    You could try something like:

    MyZettabyte = CType(1024, Decimal) ^ 7
    Frans

  7. #7

    Thread Starter
    Junior Member Guile.NET's Avatar
    Join Date
    Mar 2003
    Location
    www.voodoochat.com
    Posts
    31
    This works:

    VB Code:
    1. Dim Zetta as decimal
    2. Zetta = CDec(1180591620717411303424)

    I'm not really using it for _anything_ - it's just one of those 'I-need-to-know-why' things, really. =|
    The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.

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