Allowing numbers larger than 9.2 Quintillion.

Discussion in 'PHP' started by Nintendo, Feb 27, 2008.

  1. #1
    INT( 12 ) in mySQL database and int in script = 2,147,483,647 max.

    BIGINT( 25 ) in mySQL database and float in script = 9,223,372,036,854,775,807 max.

    How do you allow numbers even larger than 9.2 Quintillion to be added to mySQL, as a number value?

    For example, something Like varchar(255) but where the script would be able to still do calculations with it, like add and subtract using the number.
     
    Nintendo, Feb 27, 2008 IP
  2. wragge11

    wragge11 Guest

    Messages:
    2,222
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Does Quintillion come after Trillion?
     
    wragge11, Feb 27, 2008 IP
  3. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #3
    Nintendo, Feb 27, 2008 IP
  4. selling vcc

    selling vcc Peon

    Messages:
    361
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    selling vcc, Feb 27, 2008 IP
  5. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well technically PHP is totally independent of SQL in terms of numerical representations. I'm not entirely sure the float limitations of PHP, but you could always do what you said with varchar (or text) and the read the value and intval() the number and it's in good-ol' numerical representation in PHP. I have to ask though... wtf would you ever need a number that large for? I mean every additional digit you go ads a whole other level of exponential rise, I really can't see a practical use for needing that kind of a number
     
    projectshifter, Feb 27, 2008 IP
  6. sm9ai

    sm9ai Active Member

    Messages:
    746
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    60
    #6
    When I did a project on huge prime numbers in c++ we ran out of numbers very quickly.

    We had to use arrays to make the numbers appear smaller and then do operations on the arrays.

    You might need to do something similar here.
     
    sm9ai, Feb 27, 2008 IP