TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: largest number you've had to store in an application?

15 pointsby mellisover 15 years ago
For a "real" purpose (as opposed to a user banging on the keyboard). Just curious when / if / why we'll need more than 64 bits.

17 comments

peterhiover 15 years ago
I used to work for an egg wholesaler. We paid the farmers by the egg according to grade. We accounted in eggs.<p>Do you know how many eggs are sold in the UK?<p>We had to write a special class to handle eggs because we blew the unsigned integer on a VAX.
评论 #949587 未加载
cjgover 15 years ago
You don't have much space left in 64 bits for some financial numbers. FX swap trades with a billion dollars on one side and some very devalued currency on the other (e.g. zimbabwe dollars 1:60,000,000 at one point).<p>It gets worse when you start adding those numbers up.
bhouselover 15 years ago
Heh, I actually overran a signed integer 2 years ago in an app for a major financial company.<p>Yes, that's &#62; $2,147,483,647<p>Thanks, subprime mortgage crisis!
评论 #949589 未加载
mildweedover 15 years ago
Huge. Longer than 2^30 digits. I was working on statistics. Doing probabilities requires doing some crazy factorials. These often require handling large freaking numbers. I'm a PHP guy, so BC Math and GMP Math are my saviors in this area.<p>Thankfully, all the huge numbers are just in the computation of the statistics and don't need to be stored long term in a database. The thought of having to store an integer in a BLOB is frightening.
评论 #948641 未加载
评论 #948714 未加载
klonover 15 years ago
If you want universal uniqueness you should be looking at 128-bits (<a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier" rel="nofollow">http://en.wikipedia.org/wiki/Universally_Unique_Identifier</a>)
评论 #950573 未加载
Dav3xorover 15 years ago
I built an aviation mapping engine that used fixed point math for lat/lon representation. It basically used an entire 32bit signed int and gave a guaranteed minimal resolution of 3 feet. It would quite often go to the ragged edge of what you can fit in a 32 bit quantity.<p>The fun bit was that you had to use 2 combined registers (ARM) to represent a 64bit quantity so you could do multiplication and keep all your precision.<p>Oh, for the luxury of a FPU...
marcusover 15 years ago
public/private keys for RSA - 1024 bit numbers.
jamwtover 15 years ago
factorial(30..50) -- for factoradics (<a href="http://en.wikipedia.org/wiki/Factoradic" rel="nofollow">http://en.wikipedia.org/wiki/Factoradic</a>). Representing the reproducable state of a list of randomly ordered items.
aplusbiover 15 years ago
I implemented Tupper's Self-referential formula which depends on an extremely large number (although I suppose that's cheating a bit, the number is actually an encoding of a bitmap).
ErrantXover 15 years ago
I've had to build a system to theoretically handle indexes up to 1.2553643905927429e+30 but we haven't got that far yet (biggest # is a billion billion billion or so)
kbobover 15 years ago
1000000! took me about an hour to calculate on a supercomputer in 1988. It's roughly 5 million decimal digits.
ivenkysover 15 years ago
I have worked on Financial Apps where we have ended up blowing away the 64-bit threshold.
wlievensover 15 years ago
I guess astronomical modeling uses ... astronomically big numbers?
chrisaover 15 years ago
EPC Gen2 RFID tags have a 96 bit unique id that we store
mooism2over 15 years ago
Do parts of RSA keys count?
davidwover 15 years ago
twitter id's is the first thing that comes to mind.
评论 #948485 未加载
pclarkover 15 years ago
8374874823748327491